public void awake() { if (shouldDisplayMainMenuBar()) { mainMenuBar = XJMainMenuBar.createInstance(); mainMenuBar.setCustomizer(this); mainMenuBar.setDelegate(this); mainMenuBar.createMenuBar(); setMainMenuBar(mainMenuBar); undoEngine.setMainMenuBar(mainMenuBar); } }
public void menuItemState(XJMenuItem item) { switch (item.getTag()) { case XJMainMenuBar.MI_NEW: item.setTitle( XJLocalizable.getXJString("New") + ((XJApplication.shared().getDocumentExtensions().size() > 1) ? "..." : "")); break; case XJMainMenuBar.MI_UNDO: case XJMainMenuBar.MI_REDO: getMainMenuBar().menuUndoRedoItemState(undoEngine.getCurrentUndo()); break; } }
public XJUndo getUndo(JTextPane textPane) { return undoEngine.getUndo(textPane); }
public XJUndo getCurrentUndo() { return undoEngine.getCurrentUndo(); }
public void registerUndo(XJUndoDelegate delegate, JTextPane textPane) { undoEngine.registerUndo(new XJUndo(undoEngine, delegate), textPane); }