X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTTableWindow.java;h=d42ed097773459e3dcf33df3158fda038f0810d4;hb=ad5849667b51ab27d7e4f31ba62b0447c94f1715;hp=ad96543dbfe7e5750018bdbc2c6631403c10a3ee;hpb=e9bb3c1e57e52ea19a153059a3f42656ea6ed51c;p=fanfix.git diff --git a/src/jexer/TTableWindow.java b/src/jexer/TTableWindow.java index ad96543..d42ed09 100644 --- a/src/jexer/TTableWindow.java +++ b/src/jexer/TTableWindow.java @@ -75,7 +75,7 @@ public class TTableWindow extends TScrollableWindow { super(parent, title, 0, 0, parent.getScreen().getWidth() / 2, parent.getScreen().getHeight() / 2 - 2, RESIZABLE | CENTERED); - tableField = new TTableWidget(this, 0, 0, getWidth() - 2, getHeight() - 2); + tableField = addTable(0, 0, getWidth() - 2, getHeight() - 2); setupAfterTable(); } @@ -90,6 +90,8 @@ public class TTableWindow extends TScrollableWindow { public void onFocus() { // Enable the table menu items. getApplication().enableMenuItem(TMenu.MID_CUT); + getApplication().enableMenuItem(TMenu.MID_TABLE_RENAME_COLUMN); + getApplication().enableMenuItem(TMenu.MID_TABLE_RENAME_ROW); getApplication().enableMenuItem(TMenu.MID_TABLE_VIEW_ROW_LABELS); getApplication().enableMenuItem(TMenu.MID_TABLE_VIEW_COLUMN_LABELS); getApplication().enableMenuItem(TMenu.MID_TABLE_VIEW_HIGHLIGHT_ROW); @@ -125,6 +127,8 @@ public class TTableWindow extends TScrollableWindow { public void onUnfocus() { // Disable the table menu items. getApplication().disableMenuItem(TMenu.MID_CUT); + getApplication().disableMenuItem(TMenu.MID_TABLE_RENAME_COLUMN); + getApplication().disableMenuItem(TMenu.MID_TABLE_RENAME_ROW); getApplication().disableMenuItem(TMenu.MID_TABLE_VIEW_ROW_LABELS); getApplication().disableMenuItem(TMenu.MID_TABLE_VIEW_COLUMN_LABELS); getApplication().disableMenuItem(TMenu.MID_TABLE_VIEW_HIGHLIGHT_ROW);