X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTApplication.java;h=2537c3e4b5bbdfddb0d05837000bd6effea21a48;hb=ab8b0034fec1f17f97cfaa96d83c030180ffaa37;hp=41fbea5b8459bb147cc099f2ddbd62f7b7cabd90;hpb=b97249160c37aef40ed6ac35cea8a39748474ae1;p=fanfix.git diff --git a/src/jexer/TApplication.java b/src/jexer/TApplication.java index 41fbea5..2537c3e 100644 --- a/src/jexer/TApplication.java +++ b/src/jexer/TApplication.java @@ -2923,6 +2923,21 @@ public class TApplication implements Runnable { } } + /** + * Get the menu item associated with this ID. + * + * @param id the menu item ID + * @return the menu item, or null if not found + */ + public final TMenuItem getMenuItem(final int id) { + for (TMenuItem item: menuItems) { + if (item.getId() == id) { + return item; + } + } + return null; + } + /** * Recompute menu x positions based on their title length. */ @@ -3101,10 +3116,23 @@ public class TApplication implements Runnable { */ public final TMenu addTableMenu() { TMenu tableMenu = addMenu(i18n.getString("tableMenuTitle")); + tableMenu.addDefaultItem(TMenu.MID_TABLE_RENAME_COLUMN, false); + tableMenu.addDefaultItem(TMenu.MID_TABLE_RENAME_ROW, false); + tableMenu.addSeparator(); + + TSubMenu viewMenu = tableMenu.addSubMenu(i18n. + getString("tableSubMenuView")); + viewMenu.addDefaultItem(TMenu.MID_TABLE_VIEW_ROW_LABELS, false); + viewMenu.addDefaultItem(TMenu.MID_TABLE_VIEW_COLUMN_LABELS, false); + viewMenu.addDefaultItem(TMenu.MID_TABLE_VIEW_HIGHLIGHT_ROW, false); + viewMenu.addDefaultItem(TMenu.MID_TABLE_VIEW_HIGHLIGHT_COLUMN, false); + TSubMenu borderMenu = tableMenu.addSubMenu(i18n. getString("tableSubMenuBorders")); borderMenu.addDefaultItem(TMenu.MID_TABLE_BORDER_NONE, false); borderMenu.addDefaultItem(TMenu.MID_TABLE_BORDER_ALL, false); + borderMenu.addDefaultItem(TMenu.MID_TABLE_BORDER_CELL_NONE, false); + borderMenu.addDefaultItem(TMenu.MID_TABLE_BORDER_CELL_ALL, false); borderMenu.addDefaultItem(TMenu.MID_TABLE_BORDER_RIGHT, false); borderMenu.addDefaultItem(TMenu.MID_TABLE_BORDER_LEFT, false); borderMenu.addDefaultItem(TMenu.MID_TABLE_BORDER_TOP, false);