com.vividsolutions.jump.workbench.ui
Class MultiInputDialog
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
com.vividsolutions.jump.workbench.ui.MultiInputDialog
- All Implemented Interfaces:
- javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable, javax.swing.WindowConstants
- public class MultiInputDialog
- extends javax.swing.JDialog
Flexible generic dialog for prompting the user to type in several values.
- See Also:
- Serialized Form
| Nested classes inherited from class javax.swing.JDialog |
javax.swing.JDialog.AccessibleJDialog |
| Nested classes inherited from class java.awt.Dialog |
java.awt.Dialog.AccessibleAWTDialog |
| Nested classes inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Fields inherited from class javax.swing.JDialog |
accessibleContext, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.WindowConstants |
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
|
Method Summary |
javax.swing.JButton |
addButton(java.lang.String text)
|
javax.swing.JCheckBox |
addCheckBox(java.lang.String fieldName,
boolean initialValue)
|
javax.swing.JCheckBox |
addCheckBox(java.lang.String fieldName,
boolean initialValue,
java.lang.String toolTipText)
|
javax.swing.JComboBox |
addComboBox(java.lang.String fieldName,
java.lang.Object selectedItem,
java.util.Collection items,
java.lang.String toolTipText)
|
javax.swing.JTextField |
addDoubleField(java.lang.String fieldName,
double initialValue,
int approxWidthInChars)
|
javax.swing.JTextField |
addDoubleField(java.lang.String fieldName,
double initialValue,
int approxWidthInChars,
java.lang.String toolTipText)
|
javax.swing.JComboBox |
addEditableLayerComboBox(java.lang.String fieldName,
Layer initialValue,
java.lang.String toolTipText,
LayerManager layerManager)
|
void |
addEnableChecks(java.lang.String fieldName,
java.util.Collection enableChecks)
|
javax.swing.JTextField |
addIntegerField(java.lang.String fieldName,
int initialValue,
int approxWidthInChars,
java.lang.String toolTipText)
|
javax.swing.JLabel |
addLabel(java.lang.String text)
|
javax.swing.JComboBox |
addLayerComboBox(java.lang.String fieldName,
Layer initialValue,
LayerManager layerManager)
|
javax.swing.JComboBox |
addLayerComboBox(java.lang.String fieldName,
Layer initialValue,
java.lang.String toolTipText,
java.util.Collection layers)
|
javax.swing.JComboBox |
addLayerComboBox(java.lang.String fieldName,
Layer initialValue,
java.lang.String toolTipText,
LayerManager layerManager)
|
javax.swing.JTextField |
addNonNegativeDoubleField(java.lang.String fieldName,
double initialValue,
int approxWidthInChars)
|
javax.swing.JTextField |
addPositiveDoubleField(java.lang.String fieldName,
double initialValue,
int approxWidthInChars)
|
javax.swing.JTextField |
addPositiveIntegerField(java.lang.String fieldName,
int initialValue,
int approxWidthInChars)
|
javax.swing.JRadioButton |
addRadioButton(java.lang.String fieldName,
java.lang.String buttonGroupName,
boolean initialValue,
java.lang.String toolTipText)
|
void |
addRow(javax.swing.JComponent c)
|
void |
addRow(java.lang.String fieldName,
javax.swing.JComponent label,
javax.swing.JComponent component,
EnableCheck[] enableChecks,
java.lang.String toolTipText)
|
void |
addSeparator()
|
javax.swing.JTextField |
addTextField(java.lang.String fieldName,
java.lang.String initialValue,
int approxWidthInChars,
EnableCheck[] enableChecks,
java.lang.String toolTipText)
|
EnableCheck |
createDoubleCheck(java.lang.String fieldName)
|
EnableCheck |
createIntegerCheck(java.lang.String fieldName)
|
EnableCheck |
createNonNegativeCheck(java.lang.String fieldName)
|
EnableCheck |
createPositiveCheck(java.lang.String fieldName)
|
boolean |
getBoolean(java.lang.String fieldName)
Returns selected state for checkboxes, radio buttons. |
javax.swing.JCheckBox |
getCheckBox(java.lang.String fieldName)
|
javax.swing.JComboBox |
getComboBox(java.lang.String fieldName)
|
double |
getDouble(java.lang.String fieldName)
|
int |
getInteger(java.lang.String fieldName)
|
javax.swing.JComponent |
getLabel(java.lang.String fieldName)
|
Layer |
getLayer(java.lang.String fieldName)
|
javax.swing.JRadioButton |
getRadioButton(java.lang.String fieldName)
|
java.lang.String |
getText(java.lang.String fieldName)
Gets the string value of a control |
void |
indentLabel(java.lang.String comboBoxFieldName)
|
static void |
main(java.lang.String[] args)
|
void |
setInset(int inset)
If the dialog contains a single tabbed panel, it looks better to have a 0
inset. |
void |
setSideBarDescription(java.lang.String description)
|
void |
setSideBarImage(javax.swing.Icon icon)
|
void |
setVisible(boolean visible)
|
void |
startNewColumn()
This method can be called once only. |
boolean |
wasOKPressed()
|
| Methods inherited from class javax.swing.JDialog |
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
| Methods inherited from class java.awt.Dialog |
addNotify, dispose, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setResizable, setTitle, setUndecorated, show |
| Methods inherited from class java.awt.Window |
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, finalize, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, toBack, toFront |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, removeNotify, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MultiInputDialog
public MultiInputDialog(java.awt.Frame frame,
java.lang.String title,
boolean modal)
- Parameters:
frame - the frame on which to make this dialog modal and centred
MultiInputDialog
public MultiInputDialog()
createDoubleCheck
public EnableCheck createDoubleCheck(java.lang.String fieldName)
createIntegerCheck
public EnableCheck createIntegerCheck(java.lang.String fieldName)
createPositiveCheck
public EnableCheck createPositiveCheck(java.lang.String fieldName)
createNonNegativeCheck
public EnableCheck createNonNegativeCheck(java.lang.String fieldName)
getComboBox
public javax.swing.JComboBox getComboBox(java.lang.String fieldName)
getCheckBox
public javax.swing.JCheckBox getCheckBox(java.lang.String fieldName)
getRadioButton
public javax.swing.JRadioButton getRadioButton(java.lang.String fieldName)
getLabel
public javax.swing.JComponent getLabel(java.lang.String fieldName)
setVisible
public void setVisible(boolean visible)
getText
public java.lang.String getText(java.lang.String fieldName)
- Gets the string value of a control
- Parameters:
fieldName - control to read
- Returns:
- the string value of the control
getBoolean
public boolean getBoolean(java.lang.String fieldName)
- Returns selected state for checkboxes, radio buttons.
- Parameters:
fieldName - the name of the control to test
- Returns:
- the selected state of the control
getDouble
public double getDouble(java.lang.String fieldName)
getInteger
public int getInteger(java.lang.String fieldName)
getLayer
public Layer getLayer(java.lang.String fieldName)
addTextField
public javax.swing.JTextField addTextField(java.lang.String fieldName,
java.lang.String initialValue,
int approxWidthInChars,
EnableCheck[] enableChecks,
java.lang.String toolTipText)
addComboBox
public javax.swing.JComboBox addComboBox(java.lang.String fieldName,
java.lang.Object selectedItem,
java.util.Collection items,
java.lang.String toolTipText)
addLabel
public javax.swing.JLabel addLabel(java.lang.String text)
addButton
public javax.swing.JButton addButton(java.lang.String text)
addRow
public void addRow(javax.swing.JComponent c)
addSeparator
public void addSeparator()
addIntegerField
public javax.swing.JTextField addIntegerField(java.lang.String fieldName,
int initialValue,
int approxWidthInChars,
java.lang.String toolTipText)
addPositiveIntegerField
public javax.swing.JTextField addPositiveIntegerField(java.lang.String fieldName,
int initialValue,
int approxWidthInChars)
addDoubleField
public javax.swing.JTextField addDoubleField(java.lang.String fieldName,
double initialValue,
int approxWidthInChars)
addDoubleField
public javax.swing.JTextField addDoubleField(java.lang.String fieldName,
double initialValue,
int approxWidthInChars,
java.lang.String toolTipText)
addPositiveDoubleField
public javax.swing.JTextField addPositiveDoubleField(java.lang.String fieldName,
double initialValue,
int approxWidthInChars)
addNonNegativeDoubleField
public javax.swing.JTextField addNonNegativeDoubleField(java.lang.String fieldName,
double initialValue,
int approxWidthInChars)
main
public static void main(java.lang.String[] args)
addLayerComboBox
public javax.swing.JComboBox addLayerComboBox(java.lang.String fieldName,
Layer initialValue,
LayerManager layerManager)
addLayerComboBox
public javax.swing.JComboBox addLayerComboBox(java.lang.String fieldName,
Layer initialValue,
java.lang.String toolTipText,
LayerManager layerManager)
addEditableLayerComboBox
public javax.swing.JComboBox addEditableLayerComboBox(java.lang.String fieldName,
Layer initialValue,
java.lang.String toolTipText,
LayerManager layerManager)
addLayerComboBox
public javax.swing.JComboBox addLayerComboBox(java.lang.String fieldName,
Layer initialValue,
java.lang.String toolTipText,
java.util.Collection layers)
addCheckBox
public javax.swing.JCheckBox addCheckBox(java.lang.String fieldName,
boolean initialValue)
addCheckBox
public javax.swing.JCheckBox addCheckBox(java.lang.String fieldName,
boolean initialValue,
java.lang.String toolTipText)
addRadioButton
public javax.swing.JRadioButton addRadioButton(java.lang.String fieldName,
java.lang.String buttonGroupName,
boolean initialValue,
java.lang.String toolTipText)
setSideBarImage
public void setSideBarImage(javax.swing.Icon icon)
setSideBarDescription
public void setSideBarDescription(java.lang.String description)
wasOKPressed
public boolean wasOKPressed()
setInset
public void setInset(int inset)
- If the dialog contains a single tabbed panel, it looks better to have a 0
inset.
startNewColumn
public void startNewColumn()
- This method can be called once only.
addRow
public void addRow(java.lang.String fieldName,
javax.swing.JComponent label,
javax.swing.JComponent component,
EnableCheck[] enableChecks,
java.lang.String toolTipText)
addEnableChecks
public void addEnableChecks(java.lang.String fieldName,
java.util.Collection enableChecks)
indentLabel
public void indentLabel(java.lang.String comboBoxFieldName)