X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTTableWindow.java;h=d42ed097773459e3dcf33df3158fda038f0810d4;hb=ab8b0034fec1f17f97cfaa96d83c030180ffaa37;hp=47a5b9ec37368537e11c89afabb414c28f68a4bb;hpb=759cb83ebad2f861e50f39dab34f70eaafe6d6ed;p=fanfix.git diff --git a/src/jexer/TTableWindow.java b/src/jexer/TTableWindow.java index 47a5b9e..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,12 +90,16 @@ 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); getApplication().enableMenuItem(TMenu.MID_TABLE_VIEW_HIGHLIGHT_COLUMN); getApplication().enableMenuItem(TMenu.MID_TABLE_BORDER_NONE); getApplication().enableMenuItem(TMenu.MID_TABLE_BORDER_ALL); + getApplication().enableMenuItem(TMenu.MID_TABLE_BORDER_CELL_NONE); + getApplication().enableMenuItem(TMenu.MID_TABLE_BORDER_CELL_ALL); getApplication().enableMenuItem(TMenu.MID_TABLE_BORDER_RIGHT); getApplication().enableMenuItem(TMenu.MID_TABLE_BORDER_LEFT); getApplication().enableMenuItem(TMenu.MID_TABLE_BORDER_TOP); @@ -123,12 +127,16 @@ 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); getApplication().disableMenuItem(TMenu.MID_TABLE_VIEW_HIGHLIGHT_COLUMN); getApplication().disableMenuItem(TMenu.MID_TABLE_BORDER_NONE); getApplication().disableMenuItem(TMenu.MID_TABLE_BORDER_ALL); + getApplication().disableMenuItem(TMenu.MID_TABLE_BORDER_CELL_NONE); + getApplication().disableMenuItem(TMenu.MID_TABLE_BORDER_CELL_ALL); getApplication().disableMenuItem(TMenu.MID_TABLE_BORDER_RIGHT); getApplication().disableMenuItem(TMenu.MID_TABLE_BORDER_LEFT); getApplication().disableMenuItem(TMenu.MID_TABLE_BORDER_TOP);