4 * License : The MIT License
5 * Copyright(c) 2009 olyutorskii
8 package jp.sfjp.jindolf.summary;
10 import java.awt.Container;
11 import java.awt.Dimension;
12 import java.awt.EventQueue;
13 import java.awt.Frame;
14 import java.awt.GridBagConstraints;
15 import java.awt.GridBagLayout;
16 import java.awt.Image;
17 import java.awt.Insets;
18 import java.awt.LayoutManager;
19 import java.awt.Rectangle;
20 import java.awt.event.ActionEvent;
21 import java.awt.event.ActionListener;
22 import java.awt.event.ItemEvent;
23 import java.awt.event.ItemListener;
24 import java.awt.event.WindowAdapter;
25 import java.awt.event.WindowEvent;
26 import java.text.DateFormat;
27 import java.util.Date;
28 import java.util.List;
29 import javax.swing.BorderFactory;
30 import javax.swing.DefaultComboBoxModel;
31 import javax.swing.ImageIcon;
32 import javax.swing.JButton;
33 import javax.swing.JComboBox;
34 import javax.swing.JComponent;
35 import javax.swing.JDialog;
36 import javax.swing.JLabel;
37 import javax.swing.JPanel;
38 import javax.swing.JPopupMenu;
39 import javax.swing.JScrollPane;
40 import javax.swing.JTabbedPane;
41 import javax.swing.JTextArea;
42 import javax.swing.JViewport;
43 import javax.swing.border.Border;
44 import jp.sfjp.jindolf.data.Avatar;
45 import jp.sfjp.jindolf.data.Period;
46 import jp.sfjp.jindolf.data.Player;
47 import jp.sfjp.jindolf.data.Village;
48 import jp.sfjp.jindolf.dxchg.ClipboardAction;
49 import jp.sfjp.jindolf.dxchg.FaceIconSet;
50 import jp.sfjp.jindolf.dxchg.TextPopup;
51 import jp.sfjp.jindolf.dxchg.WebButton;
52 import jp.sfjp.jindolf.dxchg.WolfBBS;
53 import jp.sfjp.jindolf.util.GUIUtils;
54 import jp.sfjp.jindolf.util.Monodizer;
55 import jp.sfjp.jindolf.view.AvatarPics;
56 import jp.sourceforge.jindolf.corelib.GameRole;
57 import jp.sourceforge.jindolf.corelib.Team;
60 * 決着のついた村のダイジェストを表示する。
62 @SuppressWarnings("serial")
63 public class VillageDigest
65 implements ActionListener,
68 private static final String ITEMDELIM = " : ";
71 private final JComponent summaryPanel = buildSummaryPanel();
73 private final JLabel faceLabel = new JLabel();
74 private final ImageIcon faceIcon = new ImageIcon();
75 private final JComboBox<Avatar> playerBox = new JComboBox<>();
76 private final DefaultComboBoxModel<Avatar> playerListModel =
77 new DefaultComboBoxModel<>();
78 private final JButton prevPlayer = new JButton("↑");
79 private final JButton nextPlayer = new JButton("↓");
80 private final JLabel roleLabel = new JLabel();
81 private final JLabel destinyLabel = new JLabel();
82 private final JLabel specialSkillLabel = new JLabel();
83 private final JLabel entryLabel = new JLabel();
84 private final JLabel idLabel = new JLabel();
85 private final WebButton urlLine = new WebButton();
86 private final JComponent playerPanel = buildPlayerPanel();
88 private final JComboBox<FaceIconSet> iconSetBox = new JComboBox<>();
89 private final DefaultComboBoxModel<FaceIconSet> iconSetListModel =
90 new DefaultComboBoxModel<>();
91 private final JLabel authorLabel = new JLabel();
92 private final JLabel authorUrlLabel = new JLabel();
93 private final WebButton iconCatalog = new WebButton();
94 private final JButton genCastTableButton =
95 new JButton("キャスト表Wiki生成");
96 private final JButton copyClipButton =
97 new JButton("クリップボードにコピー");
98 private final JTextArea templateArea = new JTextArea();
99 private final JButton voteButton = new JButton("投票Wiki生成");
100 private final JButton vlgWikiButton = new JButton("村詳細Wiki生成");
101 private final JComponent clipboardPanel = buildClipboardPanel();
103 private final JButton closeButton = new JButton("閉じる");
105 private Village village;
107 private GameSummary gameSummary;
114 public VillageDigest(Frame owner){
118 GUIUtils.modifyWindowAttributes(this, true, false, true);
120 setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
121 addWindowListener(new WindowAdapter(){
123 public void windowClosing(WindowEvent event){
129 this.faceLabel.setIcon(this.faceIcon);
131 this.playerBox.setModel(this.playerListModel);
132 this.playerBox.addItemListener(this);
134 this.prevPlayer.setMargin(new Insets(1, 1, 1, 1));
135 this.prevPlayer.addActionListener(this);
136 this.prevPlayer.setToolTipText("前のプレイヤー");
138 this.nextPlayer.setMargin(new Insets(1, 1, 1, 1));
139 this.nextPlayer.addActionListener(this);
140 this.nextPlayer.setToolTipText("次のプレイヤー");
142 this.iconSetBox.setModel(this.iconSetListModel);
143 this.iconSetBox.addItemListener(this);
144 for(FaceIconSet iconSet : WolfBBS.getFaceIconSetList()){
145 this.iconSetListModel.addElement(iconSet);
148 this.iconCatalog.setURLText(
150 +"%A4%DE%A4%C8%A4%E1%A5%B5%A5%A4%A5%C8%A4%C7"
151 +"%CD%F8%CD%D1%B2%C4%C7%BD%A4%CA%A5%A2%A5%A4"
152 +"%A5%B3%A5%F3%B2%E8%C1%FC.html");
153 this.iconCatalog.setCaption("顔アイコン見本ページ");
155 this.templateArea.setEditable(true);
156 this.templateArea.setLineWrap(true);
157 Monodizer.monodize(this.templateArea);
158 JPopupMenu popup = new TextPopup();
159 this.templateArea.setComponentPopupMenu(popup);
161 this.genCastTableButton.addActionListener(this);
162 this.voteButton.addActionListener(this);
163 this.vlgWikiButton.addActionListener(this);
164 this.copyClipButton.addActionListener(this);
166 this.closeButton.addActionListener(this);
168 Monodizer.monodize(this.idLabel);
169 Monodizer.monodize(this.authorUrlLabel);
171 Container content = getContentPane();
179 * キャプション付き項目をコンテナに追加。
180 * @param container コンテナ
181 * @param caption 項目キャプション名
182 * @param delimiter デリミタ文字
185 private static void addCaptionedItem(Container container,
186 CharSequence caption,
187 CharSequence delimiter,
189 LayoutManager layout = container.getLayout();
190 if( ! (layout instanceof GridBagLayout) ){
191 throw new IllegalArgumentException();
194 JLabel captionLabel = new JLabel(caption.toString());
195 JLabel delimiterLabel = new JLabel(delimiter.toString());
197 if(item instanceof JComponent){
198 itemComp = (JComponent) item;
200 itemComp = new JLabel(item.toString());
203 GridBagConstraints constraints = new GridBagConstraints();
205 constraints.weightx = 0.0;
206 constraints.weighty = 0.0;
207 constraints.fill = GridBagConstraints.NONE;
208 constraints.insets = new Insets(2, 2, 2, 2);
210 constraints.gridwidth = 1;
211 constraints.anchor = GridBagConstraints.NORTHEAST;
212 container.add(captionLabel, constraints);
213 container.add(delimiterLabel, constraints);
215 constraints.weightx = 1.0;
216 constraints.gridwidth = GridBagConstraints.REMAINDER;
217 constraints.anchor = GridBagConstraints.NORTHWEST;
218 container.add(itemComp, constraints);
224 * キャプション付き項目をコンテナに追加。
225 * @param container コンテナ
226 * @param caption 項目キャプション名
229 private static void addCaptionedItem(Container container,
230 CharSequence caption,
232 addCaptionedItem(container, caption, ITEMDELIM, item);
238 * @param container コンテナ
240 private static void addFatPad(Container container){
241 LayoutManager layout = container.getLayout();
242 if( ! (layout instanceof GridBagLayout) ){
243 throw new IllegalArgumentException();
246 JComponent pad = new JPanel();
248 GridBagConstraints constraints = new GridBagConstraints();
249 constraints.weightx = 1.0;
250 constraints.weighty = 1.0;
251 constraints.fill = GridBagConstraints.BOTH;
252 constraints.gridwidth = GridBagConstraints.REMAINDER;
253 container.add(pad, constraints);
259 * GridBagLayoutでレイアウトする空コンポーネントを生成する。
262 private static JComponent createGridBagComponent(){
263 JComponent result = new JPanel();
264 LayoutManager layout = new GridBagLayout();
265 result.setLayout(layout);
273 private JComponent buildSummaryPanel(){
274 JComponent result = createGridBagComponent();
276 Border border = BorderFactory.createEmptyBorder(5, 5, 5, 5);
277 result.setBorder(border);
286 private JComponent buildPlayerPanel(){
287 JComponent result = createGridBagComponent();
288 GridBagConstraints constraints = new GridBagConstraints();
290 constraints.weightx = 0.0;
291 constraints.weighty = 0.0;
292 constraints.fill = GridBagConstraints.NONE;
293 constraints.anchor = GridBagConstraints.NORTHEAST;
294 constraints.insets = new Insets(2, 2, 2, 2);
295 result.add(this.faceLabel, constraints);
297 result.add(new JLabel(ITEMDELIM), constraints);
299 constraints.anchor = GridBagConstraints.NORTHWEST;
300 result.add(this.playerBox, constraints);
301 result.add(this.prevPlayer, constraints);
302 constraints.gridwidth = GridBagConstraints.REMAINDER;
303 result.add(this.nextPlayer, constraints);
305 addCaptionedItem(result, "役職", this.roleLabel);
306 addCaptionedItem(result, "運命", this.destinyLabel);
307 addCaptionedItem(result, "特殊技能", this.specialSkillLabel);
308 addCaptionedItem(result, "エントリ#", this.entryLabel);
309 addCaptionedItem(result, "ID", this.idLabel);
310 addCaptionedItem(result, "URL", this.urlLine);
312 constraints.weightx = 1.0;
313 constraints.weighty = 1.0;
314 constraints.fill = GridBagConstraints.BOTH;
315 constraints.gridwidth = GridBagConstraints.REMAINDER;
316 result.add(new JPanel(), constraints);
318 Border border = BorderFactory.createEmptyBorder(5, 5, 5, 5);
319 result.setBorder(border);
328 private JComponent buildCastPanel(){
329 JComponent result = createGridBagComponent();
330 GridBagConstraints constraints = new GridBagConstraints();
332 constraints.anchor = GridBagConstraints.NORTHEAST;
333 constraints.gridwidth = GridBagConstraints.REMAINDER;
334 constraints.insets = new Insets(2, 2, 2, 2);
335 result.add(this.iconCatalog, constraints);
337 addCaptionedItem(result, "顔アイコンセットを選択", this.iconSetBox);
338 addCaptionedItem(result, "作者", this.authorLabel);
339 addCaptionedItem(result, "URL", this.authorUrlLabel);
341 constraints.weightx = 1.0;
342 constraints.weighty = 0.0;
343 constraints.fill = GridBagConstraints.NONE;
344 constraints.insets = new Insets(2, 2, 2, 2);
345 constraints.anchor = GridBagConstraints.NORTHEAST;
346 constraints.gridwidth = GridBagConstraints.REMAINDER;
347 result.add(this.genCastTableButton, constraints);
349 Border border = BorderFactory.createTitledBorder("キャスト表Wiki生成");
350 result.setBorder(border);
359 private JComponent buildVotePanel(){
360 JComponent result = createGridBagComponent();
361 GridBagConstraints constraints = new GridBagConstraints();
363 constraints.weightx = 1.0;
364 constraints.weighty = 0.0;
365 constraints.fill = GridBagConstraints.NONE;
366 constraints.anchor = GridBagConstraints.NORTHEAST;
367 constraints.gridwidth = GridBagConstraints.REMAINDER;
368 constraints.insets = new Insets(2, 2, 2, 2);
369 result.add(this.voteButton, constraints);
371 Border border = BorderFactory.createTitledBorder("投票Wiki生成");
372 result.setBorder(border);
379 * @return 村詳細Wiki生成画面
381 private JComponent buildVillageWikiPanel(){
382 JComponent result = createGridBagComponent();
383 GridBagConstraints constraints = new GridBagConstraints();
385 constraints.weightx = 1.0;
386 constraints.weighty = 0.0;
387 constraints.fill = GridBagConstraints.NONE;
388 constraints.anchor = GridBagConstraints.NORTHEAST;
389 constraints.gridwidth = GridBagConstraints.REMAINDER;
390 constraints.insets = new Insets(2, 2, 2, 2);
391 result.add(this.vlgWikiButton, constraints);
393 Border border = BorderFactory.createTitledBorder("村詳細Wiki生成");
394 result.setBorder(border);
401 * @return Wikiテキスト領域GUI
403 private JComponent buildClipText(){
404 JComponent result = createGridBagComponent();
405 GridBagConstraints constraints = new GridBagConstraints();
409 constraints.insets = new Insets(2, 2, 2, 2);
411 constraints.weightx = 0.0;
412 constraints.weighty = 0.0;
413 constraints.fill = GridBagConstraints.NONE;
414 constraints.anchor = GridBagConstraints.NORTHEAST;
415 constraints.gridwidth = GridBagConstraints.REMAINDER;
416 result.add(this.copyClipButton, constraints);
418 border = BorderFactory.createEmptyBorder(2, 2, 2, 2);
419 this.templateArea.setBorder(border);
420 JScrollPane scroller = new JScrollPane();
421 JViewport viewPort = scroller.getViewport();
422 viewPort.setView(this.templateArea);
423 scroller.setHorizontalScrollBarPolicy(
424 JScrollPane.HORIZONTAL_SCROLLBAR_NEVER
426 scroller.setMinimumSize(new Dimension(10, 50));
428 constraints.weightx = 1.0;
429 constraints.weighty = 1.0;
430 constraints.fill = GridBagConstraints.BOTH;
431 constraints.gridwidth = GridBagConstraints.REMAINDER;
432 result.add(scroller, constraints);
434 border = BorderFactory.createTitledBorder("PukiWikiテキスト");
435 result.setBorder(border);
444 private JComponent buildClipboardPanel(){
445 JComponent result = createGridBagComponent();
446 GridBagConstraints constraints = new GridBagConstraints();
448 constraints.insets = new Insets(3, 3, 3, 3);
450 constraints.weightx = 1.0;
451 constraints.weighty = 0.0;
452 constraints.fill = GridBagConstraints.HORIZONTAL;
453 constraints.anchor = GridBagConstraints.NORTHWEST;
454 constraints.gridwidth = GridBagConstraints.REMAINDER;
456 JComponent castPanel = buildCastPanel();
457 result.add(castPanel, constraints);
459 JComponent vlgWikiPanel = buildVillageWikiPanel();
460 result.add(vlgWikiPanel, constraints);
462 JComponent votePanel = buildVotePanel();
463 result.add(votePanel, constraints);
465 constraints.fill = GridBagConstraints.NONE;
466 constraints.anchor = GridBagConstraints.CENTER;
467 result.add(new JLabel("↓↓↓"), constraints);
468 constraints.fill = GridBagConstraints.HORIZONTAL;
469 constraints.anchor = GridBagConstraints.NORTHWEST;
471 constraints.weightx = 1.0;
472 constraints.weighty = 1.0;
473 constraints.fill = GridBagConstraints.BOTH;
474 constraints.gridwidth = GridBagConstraints.REMAINDER;
475 JComponent clipText = buildClipText();
476 result.add(clipText, constraints);
483 * @param container コンテナ
485 private void design(Container container){
486 LayoutManager layout = new GridBagLayout();
487 GridBagConstraints constraints = new GridBagConstraints();
489 container.setLayout(layout);
491 JScrollPane scroller1 = new JScrollPane();
492 scroller1.getVerticalScrollBar().setUnitIncrement(15);
493 scroller1.getHorizontalScrollBar().setUnitIncrement(15);
494 JViewport viewPort1 = scroller1.getViewport();
495 viewPort1.setView(this.summaryPanel);
497 JScrollPane scroller2 = new JScrollPane();
498 scroller2.getVerticalScrollBar().setUnitIncrement(15);
499 scroller2.getHorizontalScrollBar().setUnitIncrement(15);
500 JViewport viewPort2 = scroller2.getViewport();
501 viewPort2.setView(this.playerPanel);
503 JTabbedPane tabComp = new JTabbedPane();
504 tabComp.add("村詳細", scroller1);
505 tabComp.add("プレイヤー詳細", scroller2);
506 tabComp.add("まとめサイト用Wiki生成", this.clipboardPanel);
508 constraints.weightx = 1.0;
509 constraints.weighty = 1.0;
510 constraints.fill = GridBagConstraints.BOTH;
511 constraints.anchor = GridBagConstraints.NORTHWEST;
512 constraints.gridwidth = GridBagConstraints.REMAINDER;
513 container.add(tabComp, constraints);
515 constraints.insets = new Insets(3, 3, 3, 3);
516 constraints.weightx = 0.0;
517 constraints.weighty = 0.0;
518 constraints.fill = GridBagConstraints.NONE;
519 constraints.anchor = GridBagConstraints.SOUTHEAST;
520 container.add(this.closeButton, constraints);
528 private void actionClose(){
538 public void setVillage(Village village){
541 this.village = village;
542 if(village == null) return;
544 this.gameSummary = new GameSummary(this.village);
548 for(Player player : this.gameSummary.getPlayerList()){
549 Avatar avatar = player.getAvatar();
550 this.playerListModel.addElement(avatar);
553 if(this.playerListModel.getSize() >= 2){ // 強制イベント発生
554 Object player2nd = this.playerListModel.getElementAt(1);
555 this.playerListModel.setSelectedItem(player2nd);
556 Object player1st = this.playerListModel.getElementAt(0);
557 this.playerListModel.setSelectedItem(player1st);
566 private void updateSummary(){
567 String villageName = this.village.getVillageFullName();
569 Team winnerTeam = this.gameSummary.getWinnerTeam();
570 String wonTeam = winnerTeam.getTeamName();
572 int avatarNum = this.gameSummary.countAvatarNum();
573 String totalMember = "ゲルト + " + (avatarNum - 1) + "名 = "
576 JComponent roleDetail = createGridBagComponent();
577 for(GameRole role : GameRole.values()){
578 List<Player> players = this.gameSummary.getRoledPlayerList(role);
579 if(players.size() <= 0) continue;
580 String roleName = role.getRoleName();
581 addCaptionedItem(roleDetail, roleName, " × ", players.size());
584 String suddenDeath = this.gameSummary.countSuddenDeath() + "名";
587 DateFormat.getDateTimeInstance(DateFormat.FULL,
590 date = this.gameSummary.get1stTalkDate();
591 String talk1st = dform.format(date);
592 date = this.gameSummary.getLastTalkDate();
593 String talkLast = dform.format(date);
595 int limitHour = this.village.getLimitHour();
596 int limitMinute = this.village.getLimitMinute();
597 StringBuilder limit = new StringBuilder();
598 if(limitHour < 10) limit.append('0');
599 limit.append(limitHour).append(':');
600 if(limitMinute < 10) limit.append('0');
601 limit.append(limitMinute);
603 JComponent transition = createGridBagComponent();
604 for(int day = 1; day < this.village.getPeriodSize(); day++){
605 List<Player> players = this.gameSummary.getSurvivorList(day);
606 CharSequence roleSeq =
607 GameSummary.getRoleBalanceSequence(players);
609 Period period = this.village.getPeriod(day);
610 daySeq = period.getCaption();
611 addCaptionedItem(transition, daySeq, roleSeq);
614 StringBuilder schedule = new StringBuilder();
615 int progressDays = this.village.getProgressDays();
616 schedule.append("プロローグ + ")
617 .append(progressDays)
618 .append("日 + エピローグ");
620 CharSequence exeInfo = this.gameSummary.dumpExecutionInfo();
621 CharSequence eatInfo = this.gameSummary.dumpAssaultInfo();
622 CharSequence scoreSeer = this.gameSummary.dumpSeerActivity();
623 CharSequence scoreHunter = this.gameSummary.dumpHunterActivity();
625 this.summaryPanel.removeAll();
627 addCaptionedItem(this.summaryPanel, "村名", villageName);
628 addCaptionedItem(this.summaryPanel, "勝者", wonTeam);
629 addCaptionedItem(this.summaryPanel, "所要日数", schedule);
630 addCaptionedItem(this.summaryPanel, "更新時刻", limit);
631 addCaptionedItem(this.summaryPanel, "発言開始", talk1st);
632 addCaptionedItem(this.summaryPanel, "最終発言", talkLast);
633 addCaptionedItem(this.summaryPanel, "参加人数", totalMember);
634 addCaptionedItem(this.summaryPanel, "役職内訳", roleDetail);
635 addCaptionedItem(this.summaryPanel, "処刑内訳", exeInfo);
636 addCaptionedItem(this.summaryPanel, "襲撃内訳", eatInfo);
637 addCaptionedItem(this.summaryPanel, "突然死", suddenDeath);
638 addCaptionedItem(this.summaryPanel, "人口推移", transition);
639 addCaptionedItem(this.summaryPanel, "占成績", scoreSeer);
640 addCaptionedItem(this.summaryPanel, "狩成績", scoreHunter);
642 addFatPad(this.summaryPanel);
649 * @param event アクションイベント
652 public void actionPerformed(ActionEvent event){
653 Object source = event.getSource();
655 if(source == this.closeButton){
657 }else if(source == this.copyClipButton){
658 actionCopyToClipboard();
659 }else if(source == this.genCastTableButton){
660 actionGenCastTable();
661 }else if(source == this.voteButton){
663 }else if(source == this.vlgWikiButton){
664 actionGenVillageWiki();
665 }else if(source == this.prevPlayer){
666 int index = this.playerBox.getSelectedIndex();
667 if(index <= 0) return;
669 this.playerBox.setSelectedIndex(index);
670 }else if(source == this.nextPlayer){
671 int index = this.playerBox.getSelectedIndex();
672 int playerNum = this.playerBox.getItemCount();
673 if(index >= playerNum - 1) return;
675 this.playerBox.setSelectedIndex(index);
682 * キャスト表Wikiデータの生成を行う。
684 private void actionGenCastTable(){
685 Object selected = this.iconSetListModel.getSelectedItem();
686 if( ! (selected instanceof FaceIconSet) ) return;
687 FaceIconSet iconSet = (FaceIconSet) selected;
689 CharSequence wikiText = this.gameSummary.dumpCastingBoard(iconSet);
691 putWikiText(wikiText);
699 private void actionGenVoteBox(){
700 CharSequence wikiText = this.gameSummary.dumpVoteBox();
701 putWikiText(wikiText);
708 private void actionGenVillageWiki(){
709 CharSequence wikiText = this.gameSummary.dumpVillageWiki();
710 putWikiText(wikiText);
715 * Wikiテキストをテキストボックスに出力する。
717 * @param wikiText Wikiテキスト
719 private void putWikiText(CharSequence wikiText){
720 this.templateArea.setText(wikiText.toString());
722 EventQueue.invokeLater(new Runnable(){
725 JTextArea area = VillageDigest.this.templateArea;
726 area.scrollRectToVisible(new Rectangle());
729 // TODO あらかじめテキストを全選択させておきたい
734 * Wiki文字列をクリップボードへコピーする。
736 private void actionCopyToClipboard(){
737 CharSequence text = this.templateArea.getText();
738 ClipboardAction.copyToClipboard(text);
744 * @param avatar 選択されたAvatar
746 private void selectPlayer(Avatar avatar){
747 if(avatar == this.playerBox.getItemAt(0)){
748 this.prevPlayer.setEnabled(false);
750 this.prevPlayer.setEnabled(true);
753 int playerNum = this.playerBox.getItemCount();
754 if(avatar == this.playerBox.getItemAt(playerNum - 1)){
755 this.nextPlayer.setEnabled(false);
757 this.nextPlayer.setEnabled(true);
760 AvatarPics avatarPics = this.village.getAvatarPics();
761 Image image = avatarPics.getAvatarFaceImage(avatar);
762 this.faceIcon.setImage(image);
763 this.faceLabel.setIcon(null); // なぜかこれが必要
764 this.faceLabel.setIcon(this.faceIcon);
766 Player player = this.gameSummary.getPlayer(avatar);
768 GameRole role = player.getRole();
769 this.roleLabel.setText(role.getRoleName());
771 String destinyMessage = player.getDestinyMessage();
772 this.destinyLabel.setText(destinyMessage);
774 CharSequence specialSkill = "";
777 specialSkill = this.gameSummary.dumpSeerActivity();
780 specialSkill = this.gameSummary.dumpHunterActivity();
785 this.specialSkillLabel.setText(specialSkill.toString());
787 this.entryLabel.setText(String.valueOf(player.getEntryNo()));
789 String userId = player.getIdName();
790 this.idLabel.setText(userId);
792 String urlText = player.getUrlText();
793 String caption = urlText;
795 if(urlText == null || urlText.length() <= 0){
796 urlText = WolfBBS.encodeURLFromId(userId);
797 caption = "もしかして " + urlText;
800 this.urlLine.setURLText(urlText);
801 this.urlLine.setCaption(caption);
808 * @param iconSet 顔アイコンセット
810 private void selectIconSet(FaceIconSet iconSet){
811 String author = iconSet.getAuthor();
812 String urlText = iconSet.getUrlText();
813 this.authorLabel .setText(author + "氏");
814 this.authorUrlLabel.setText(urlText);
820 * @param event コンボボックス操作イベント
823 public void itemStateChanged(ItemEvent event){
824 int state = event.getStateChange();
825 if(state != ItemEvent.SELECTED) return;
827 Object source = event.getSource();
828 Object item = event.getItem();
829 if(item == null) return;
831 if(source == this.playerBox){
832 if( ! (item instanceof Avatar) ) return;
833 Avatar avatar = (Avatar) item;
834 selectPlayer(avatar);
835 }else if(source == this.iconSetBox){
836 if( ! (item instanceof FaceIconSet) ) return;
837 FaceIconSet iconSet = (FaceIconSet) item;
838 selectIconSet(iconSet);
847 private void clear(){
848 this.templateArea.setText("");
849 this.playerListModel.removeAllElements();