ttable navigation minimally working
[fanfix.git] / src / jexer / TTableWindow.java
index 0219cfc52e199fa49927e9bad23ec3b115df2f78..33b8116c17da51664adf614a92979c409acbda41 100644 (file)
@@ -88,6 +88,10 @@ public class TTableWindow extends TScrollableWindow {
     public void onFocus() {
         // Enable the table menu items.
         getApplication().enableMenuItem(TMenu.MID_CUT);
+        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_RIGHT);
@@ -117,6 +121,10 @@ public class TTableWindow extends TScrollableWindow {
     public void onUnfocus() {
         // Disable the table menu items.
         getApplication().disableMenuItem(TMenu.MID_CUT);
+        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_RIGHT);
@@ -292,7 +300,7 @@ public class TTableWindow extends TScrollableWindow {
         setTopValue(1);
         // setBottomValue(editField.getMaximumRowNumber());
         setLeftValue(1);
-        // setRightValue(editField.getMaximumColumnNumber());
+        setRightValue(tableField.getMaximumWidth());
 
         statusBar = newStatusBar(i18n.getString("statusBar"));
         statusBar.addShortcutKeypress(kbF1, cmHelp,