OSDN Git Service

TweetTabbedTableに関して,テーブルをタブの何番目にセットするかを設定できるように改良
authorspark_xp <spark_xp@d8c9ecd3-d47d-4367-8645-de82c00e513f>
Mon, 13 Sep 2010 10:15:32 +0000 (10:15 +0000)
committerspark_xp <spark_xp@d8c9ecd3-d47d-4367-8645-de82c00e513f>
Mon, 13 Sep 2010 10:15:32 +0000 (10:15 +0000)
git-svn-id: http://svn.sourceforge.jp/svnroot/nt-manager/NishioTweetManager/trunk@15 d8c9ecd3-d47d-4367-8645-de82c00e513f

src/twitter/gui/component/TweetTabbedTable.java

index 0896c0f..97b2b4b 100644 (file)
@@ -37,6 +37,8 @@ public class TweetTabbedTable {
     private String title;
     //タブ
     private JTabbedPane tabbedPane;
+    //何番目のタブにテーブルをセットするか
+    private int tabSetNum;
     //スクロールペーン
     private JScrollPane scrollPane;
     //ツイートを管理するクラス
@@ -58,6 +60,7 @@ public class TweetTabbedTable {
      * @param tweetGetter tweet取得時に行うアクション
      * @param title タブに表示するタイトル
      * @param tabbedPane テーブルを追加するタブ
+     * @param tabSetNum 何番目のタブにセットするか
      * @param tableElementHeight テーブルの高さ
      * @param tweetManager ツイート管理クラス
      * @param mainAction メインアクション
@@ -65,12 +68,13 @@ public class TweetTabbedTable {
      * @param tableElementMaxSize テーブルに格納できる要素の最大数
      */
     public TweetTabbedTable(TweetGetter tweetGetter,
-            String title, JTabbedPane tabbedPane, int tableElementHeight,
+            String title, JTabbedPane tabbedPane, int tabSetNum, int tableElementHeight,
             TweetManager tweetManager, TweetMainAction mainAction, Color newTableColor,
             int tableElementMaxSize) {
         this.tweetGetter = tweetGetter;
         this.title = title;
         this.tabbedPane = tabbedPane;
+        this.tabSetNum = tabSetNum;
         this.tweetManager = tweetManager;
         this.mainAction = mainAction;
         this.tableElementHeight = tableElementHeight;
@@ -119,7 +123,7 @@ public class TweetTabbedTable {
 
             // まだチェックしていないtweetの数をタブにも表示
             if (this.uncheckedTweet > 0) {
-                tabbedPane.setTitleAt(0, this.title + "("
+                tabbedPane.setTitleAt(this.tabSetNum, this.title + "("
                         + this.uncheckedTweet + ")");
             }
             // ツイートをテーブルに追加