undoRedo.setLimit(500); notesEditor.getDocument().addUndoableEditListener(e -> undoRedo.addEdit(e.getEdit()));
public UndoHistory() { manager.setLimit(HISTORY_SIZE); }
public UndoManager() { delegate.setLimit(preferences.getInt("undoLimit", -1)); }
public UndoMonitor(SwingUndoSupport undo,CyProperty<Properties> cyProps) { this.undo = undo; this.props = cyProps.getProperties(); undo.getUndoManager().setLimit( getLimit() ); }
private void clearPane() { target = null; manager.discardAllEdits(); manager.setLimit(0); text.setText(""); setTextEditableRoutine(false); }
public void saveToTarget() { manager.discardAllEdits(); manager.setLimit(0); if (controller != null) { if (((PdfDictionary) target.getPdfObject()).containsKey(PdfName.Filter)) { controller.deleteTreeNodeDictChild(target, PdfName.Filter); } } ((PdfStream) target.getPdfObject()).setData(text.getText().getBytes()); if (controller != null) { controller.selectNode(target); } manager.setLimit(MAX_NUMBER_OF_EDITS); }
public RenderPanel(IChemModel chemModel, int width, int height, boolean fitToScreen, boolean debug, boolean isViewer, JChemPaintAbstractApplet applet) throws IOException { this.debug = debug; this.setupMachinery(chemModel, fitToScreen, isViewer, applet); this.setupPanel(width, height); this.fitToScreen = fitToScreen; int limit = Integer.parseInt(JCPPropertyHandler.getInstance(true) .getJCPProperties().getProperty("General.UndoStackSize")); undoManager.setLimit(limit); JCPPropertyHandler.getInstance(true).setRenderingPreferences(this.renderer.getRenderer2DModel()); }
props.setProperty("General.UndoStackSize", undoStackSize.getText()); jcpPanel.getRenderPanel().getUndoManager().setLimit(size); }catch(Exception ex){ JOptionPane.showMessageDialog(this, GT.get("Number of undoable operations")+" "+GT.get("must be a number from 1 to 100"), GT.get("Number of undoable operations"), JOptionPane.WARNING_MESSAGE);
undoManager.setLimit(10000); getDocument().addUndoableEditListener(undoManager); InputMap im = getInputMap();
/** * Constructs a SyntaxHighlightedStreamPane. * * @param controller the pdf reader controller * @param pluginMode the plugin mode */ public SyntaxHighlightedStreamPane(PdfReaderController controller, boolean pluginMode) { super(); initAttributes(); text = new ColorTextPane(); setViewportView(text); this.controller = controller; popupMenu = new StreamPanelContextMenu(text, this, pluginMode); text.setComponentPopupMenu(popupMenu); text.addMouseListener(new ContextMenuMouseListener(popupMenu, text)); manager = new UndoManager(); manager.setLimit(MAX_NUMBER_OF_EDITS); text.getDocument().addUndoableEditListener(manager); text.registerKeyboardAction(new UndoAction(manager), KeyStroke.getKeyStroke(KeyEvent.VK_Z, InputEvent.CTRL_MASK), JComponent.WHEN_FOCUSED); text.registerKeyboardAction(new RedoAction(manager), KeyStroke.getKeyStroke(KeyEvent.VK_Y, InputEvent.CTRL_MASK), JComponent.WHEN_FOCUSED); }
TextArea.undo.setLimit(500);
textArea.setWrapStyleWord(true); undoManager = new UndoManager(); undoManager.setLimit(1000); textArea.getDocument().addUndoableEditListener(undoManager); textArea.addKeyListener(new KeyAdapter() {