public class SettingsPanel
extends javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
private javax.swing.JButton |
background
Background color button.
|
static java.lang.String |
BGC_TXT
Label text for the background color button.
|
static java.lang.String |
COLS_TXT
Label text for the columns field.
|
private javax.swing.JFormattedTextField |
columns
Columns field.
|
static java.lang.String |
FGC_TXT
Label text for the foreground color button.
|
static java.lang.String |
FN_TXT
Label text for the font name field.
|
private javax.swing.JSpinner |
fontname
Font name field.
|
private javax.swing.JFormattedTextField |
fontsize
Font size field.
|
private javax.swing.JButton |
foreground
Foreground color button.
|
static java.lang.String |
FS_TXT
Label text for the font size field.
|
private TerminalOptions |
options
Configuration being edited.
|
private javax.swing.JFormattedTextField |
rows
Rows field.
|
static java.lang.String |
ROWS_TXT
Label text for the rows field.
|
static java.lang.String |
SELC_TXT
Label text for the selection color button.
|
private javax.swing.JButton |
selection
Selection color button.
|
static java.lang.String |
SETTINGS_TITLE
Dialog title for the this panel.
|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Modifier | Constructor and Description |
---|---|
private |
SettingsPanel(TerminalOptions options)
Create a new instance to edit the given terminal options.
|
Modifier and Type | Method and Description |
---|---|
private javax.swing.JButton |
addColorButton(java.lang.String descr,
java.awt.Color val,
javax.swing.JComponent[][] cells,
int row)
Add a JLabel and JButton control for color selection, into the specified
row of a 2 column layout of controls.
|
private javax.swing.JSpinner |
addFontSpinner(java.lang.String descr,
java.lang.String val,
javax.swing.JComponent[][] cells,
int row)
Add a JLabel and JSpinner control for the fonts list, into the specified
row of a 2 column layout of controls.
|
private javax.swing.JFormattedTextField |
addIntegerEditor(java.lang.String descr,
java.lang.Integer val,
javax.swing.JComponent[][] cells,
int row)
Add a JLabel and JFormattedTextField control for integer editing, into
the specified row of a 2 column layout of controls.
|
static TerminalOptions |
edit(java.awt.Window window,
TerminalOptions options)
Create a new instance of the settings panel class, display it as a
modal dialog box allowing edits and return the resulting edited options.
|
private TerminalOptions |
getEdits()
Obtain any changes made in the editor.
|
private java.lang.String |
largestFontName()
Helper to calculate which of the font names is the largest.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public static final java.lang.String SETTINGS_TITLE
public static final java.lang.String ROWS_TXT
public static final java.lang.String COLS_TXT
public static final java.lang.String FN_TXT
public static final java.lang.String FS_TXT
public static final java.lang.String BGC_TXT
public static final java.lang.String FGC_TXT
public static final java.lang.String SELC_TXT
private TerminalOptions options
private javax.swing.JFormattedTextField rows
private javax.swing.JFormattedTextField columns
private javax.swing.JSpinner fontname
private javax.swing.JFormattedTextField fontsize
private javax.swing.JButton background
private javax.swing.JButton foreground
private javax.swing.JButton selection
private SettingsPanel(TerminalOptions options)
options
- The configuration to edit.public static TerminalOptions edit(java.awt.Window window, TerminalOptions options)
window
- The parent window.options
- The configuration to edit.private TerminalOptions getEdits()
private javax.swing.JFormattedTextField addIntegerEditor(java.lang.String descr, java.lang.Integer val, javax.swing.JComponent[][] cells, int row)
descr
- The text of the label which will be in the first column.val
- The default value for the field.cells
- The two-dimensional array of components to edit.row
- The row in which to insert the controls.private javax.swing.JButton addColorButton(java.lang.String descr, java.awt.Color val, javax.swing.JComponent[][] cells, int row)
JColorChooser
dialog.descr
- The text of the label which will be in the first column.val
- The background color for the button.cells
- The two-dimensional array of components to edit.row
- The row in which to insert the controls.private javax.swing.JSpinner addFontSpinner(java.lang.String descr, java.lang.String val, javax.swing.JComponent[][] cells, int row)
descr
- The text of the label which will be in the first column.val
- The default value of the spinner.cells
- The two-dimensional array of components to edit.row
- The row in which to insert the controls.private java.lang.String largestFontName()
null
if the font list
is empty.