public TristateButtonModel(TristateState initial, TristateCheckBox tristateCheckBox, boolean original) { setState(TristateState.DESELECTED); this.tristateCheckBox = tristateCheckBox; icon = new TristateCheckBoxIcon(); this.original = original; }
public boolean isIndeterminate() { return getTristateModel().isIndeterminate(); }
/** * @param value initial value * @return {@link JSyntaxTextArea} */ private JSyntaxTextArea createRenderer(String value) { JSyntaxTextArea textArea = JSyntaxTextArea.getInstance(2, 50); textArea.setLanguage("text"); //$NON-NLS-1$ textArea.setInitialText(value); return textArea; }
/** * */ public TextAreaEditor() { super(); textUI = JSyntaxTextArea.getInstance(20, 20); scroller = JTextScrollPane.getInstance(textUI, true); init(); }
private Object[] createDefaultRow() { Object[] rowData = new Object[getColumnCount()]; for (int i = 0; i < rowData.length; i++) { rowData[i] = createDefaultValue(i); } return rowData; }
public TristateState getState() { return getTristateModel().getState(); }
/** * Dialog text box */ public TextBoxDialoger() { // Empty box init(""); //$NON-NLS-1$ }
/** * Set the menu that should be used for the Edit menu. * * @param menu * the new Edit menu */ public void setEditMenu(JPopupMenu menu) { menuBar.setEditMenu(menu); }
/** * Specify whether or not the Edit|Add menu item should be enabled. * * @param enabled * true if the menu item should be enabled, false otherwise */ public void setEditAddEnabled(boolean enabled) { menuBar.setEditAddEnabled(enabled); }
/** * Forwards the message from the <code>CellEditor</code> to the * <code>delegate</code>. * * @see EditorDelegate#getCellEditorValue */ @Override public Object getCellEditorValue() { return delegate.getCellEditorValue(); }
/** * Specify whether or not the File|Save menu item should be enabled. * * @param enabled * true if the menu item should be enabled, false otherwise */ public void setFileSaveEnabled(boolean enabled) { menuBar.setFileSaveEnabled(enabled); }
/** * Set the menu that should be used for the Edit|Add menu. * * @param menu * the new Edit|Add menu */ public void setEditAddMenu(JMenu menu) { menuBar.setEditAddMenu(menu); }
/** * Forwards the message from the <code>CellEditor</code> to the * <code>delegate</code>. * * @see EditorDelegate#shouldSelectCell(EventObject) */ @Override public boolean shouldSelectCell(EventObject anEvent) { return delegate.shouldSelectCell(anEvent); }
/** * When an item's state changes, editing is ended. * * @param e * the action event * @see #stopCellEditing */ public void itemStateChanged(ItemEvent e) { TextAreaTableCellEditor.this.stopCellEditing(); }
/** * Update Undo/Redo icons state * * @param canUndo Flag whether the undo button should be enabled * @param canRedo Flag whether the redo button should be enabled */ public void updateUndoRedoIcons(boolean canUndo, boolean canRedo) { toolbar.updateUndoRedoIcons(canUndo, canRedo); } }
/** * Forwards the message from the <code>CellEditor</code> to the * <code>delegate</code>. * * @see EditorDelegate#isCellEditable(EventObject) */ @Override public boolean isCellEditable(EventObject anEvent) { return delegate.isCellEditable(anEvent); }
/** * Dialog text box * @param text - text to display in a box */ public TextBoxDialoger(String text) { init(text); }