X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTApplication.java;h=b44664ee7d5926fd00dca5240115a9dcafb61738;hb=49380c21bc74308370dd85d30f7c0c689eb1cab8;hp=927f1f713a37c053ca4e0efbcbb2ed9cbbc8e5bc;hpb=e9bb3c1e57e52ea19a153059a3f42656ea6ed51c;p=fanfix.git diff --git a/src/jexer/TApplication.java b/src/jexer/TApplication.java index 927f1f7..b44664e 100644 --- a/src/jexer/TApplication.java +++ b/src/jexer/TApplication.java @@ -283,11 +283,6 @@ public class TApplication implements Runnable { */ private boolean focusFollowsMouse = false; - /** - * The images that might be displayed. Note package private access. - */ - private List images; - /** * The list of commands to run before the next I/O check. */ @@ -606,7 +601,6 @@ public class TApplication implements Runnable { accelerators = new HashMap(); menuItems = new LinkedList(); desktop = new TDesktop(this); - images = new LinkedList(); // Special case: the Swing backend needs to have a timer to drive its // blink state. @@ -1489,7 +1483,7 @@ public class TApplication implements Runnable { String version = getClass().getPackage().getImplementationVersion(); if (version == null) { // This is Java 9+, use a hardcoded string here. - version = "0.3.1"; + version = "0.3.2"; } messageBox(i18n.getString("aboutDialogTitle"), MessageFormat.format(i18n.getString("aboutDialogText"), version), @@ -1617,7 +1611,7 @@ public class TApplication implements Runnable { getScreen().putCharXY(oldDrawnMouseX, oldDrawnMouseY, oldDrawnMouseCell); oldDrawnMouseCell = getScreen().getCharXY(mouseX, mouseY); - if ((images.size() > 0) && (backend instanceof ECMA48Backend)) { + if (backend instanceof ECMA48Backend) { // Special case: the entire row containing the mouse has // to be re-drawn if it has any image data, AND any rows // in between. @@ -1644,7 +1638,7 @@ public class TApplication implements Runnable { oldDrawnMouseX = mouseX; oldDrawnMouseY = mouseY; } - if ((images.size() > 0) || getScreen().isDirty()) { + if (getScreen().isDirty()) { backend.flushScreen(); } return; @@ -1746,7 +1740,7 @@ public class TApplication implements Runnable { oldDrawnMouseX, oldDrawnMouseY); } oldDrawnMouseCell = getScreen().getCharXY(mouseX, mouseY); - if ((images.size() > 0) && (backend instanceof ECMA48Backend)) { + if (backend instanceof ECMA48Backend) { // Special case: the entire row containing the mouse has to be // re-drawn if it has any image data, AND any rows in between. if (oldDrawnMouseY != mouseY) { @@ -1797,7 +1791,7 @@ public class TApplication implements Runnable { } // Flush the screen contents - if ((images.size() > 0) || getScreen().isDirty()) { + if (getScreen().isDirty()) { if (debugThreads) { System.err.printf("%d %s backend.flushScreen()\n", System.currentTimeMillis(), Thread.currentThread()); @@ -2529,46 +2523,6 @@ public class TApplication implements Runnable { window.setY(windowY); } - // ------------------------------------------------------------------------ - // TImage management ------------------------------------------------------ - // ------------------------------------------------------------------------ - - /** - * Add an image to the list. Note package private access. - * - * @param image the image to add - * @throws IllegalArgumentException if the image is already used in - * another TApplication - */ - final void addImage(final TImage image) { - if ((image.getApplication() != null) - && (image.getApplication() != this) - ) { - throw new IllegalArgumentException("Image " + image + - " is already " + "part of application " + - image.getApplication()); - } - images.add(image); - } - - /** - * Remove an image from the list. Note package private access. - * - * @param image the image to remove - * @throws IllegalArgumentException if the image is already used in - * another TApplication - */ - final void removeImage(final TImage image) { - if ((image.getApplication() != null) - && (image.getApplication() != this) - ) { - throw new IllegalArgumentException("Image " + image + - " is already " + "part of application " + - image.getApplication()); - } - images.remove(image); - } - // ------------------------------------------------------------------------ // TMenu management ------------------------------------------------------- // ------------------------------------------------------------------------ @@ -3116,6 +3070,10 @@ 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); @@ -3153,6 +3111,7 @@ public class TApplication implements Runnable { columnMenu.addDefaultItem(TMenu.MID_TABLE_COLUMN_WIDEN, false); TSubMenu fileMenu = tableMenu.addSubMenu(i18n. getString("tableSubMenuFile")); + fileMenu.addDefaultItem(TMenu.MID_TABLE_FILE_OPEN_CSV, false); fileMenu.addDefaultItem(TMenu.MID_TABLE_FILE_SAVE_CSV, false); fileMenu.addDefaultItem(TMenu.MID_TABLE_FILE_SAVE_TEXT, false);