Class AbstractMultiInputDialog
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
com.vividsolutions.jump.workbench.ui.AbstractMultiInputDialog
- All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants
- Direct Known Subclasses:
MultiInputDialog
Flexible generic dialog to prompt the user typing input parameters. This
abstract class includes the logic from original JUMP MultiInputDialog but
does not layout components, which is done by implementing classes.
- Author:
- Michaël Michaud
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class JDialog
JDialog.AccessibleJDialogNested classes/interfaces inherited from class Dialog
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityTypeNested classes/interfaces inherited from class Window
Window.AccessibleAWTWindow, Window.TypeNested classes/interfaces inherited from class Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intFlag indicating that the main component will fill the space.static final intFlag indicating that the main component will fill the space.static final intThe label is displayed on the left of the control.static final intThe label of the control is not displayed.static final StringAttribute combobox message displayed if no valid attribute is available.static final intFlag indicating that the main component will always use its preferred size.static final intThe label is displayed on the right of the control.static final intFlag indicating that the main component will fill the space vertically.Fields inherited from class JDialog
accessibleContext, rootPane, rootPaneCheckingEnabledFields inherited from class Dialog
DEFAULT_MODALITY_TYPEFields inherited from class Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHFields inherited from interface WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractMultiInputDialog(Frame frame, String title, boolean modal) -
Method Summary
Modifier and TypeMethodDescriptionaddAttributeComboBox(String fieldName, String layerFieldName, AttributeTypeFilter filter, String toolTipText) Add a JComboBox containing attributes of the Layer selected in layerFieldNameAdds a JButton to this dialog.Adds a JButton to this dialog.addCheckBox(String fieldName, boolean initialValue) Create a CheckBox to get a boolean value from the user.addCheckBox(String fieldName, boolean initialValue, String toolTipText) Create a CheckBox to get a boolean value from the user.<T> JComboBox<T> addComboBox(String fieldName, T selectedItem, Collection<T> items, String toolTipText) Adds a JComboBox control to this dialog.protected voidaddComponent(String fieldName, Component label, Component component) addDoubleField(String fieldName, double initialValue, int approxWidthInChars) Adds a JTextField control for double values.addDoubleField(String fieldName, double initialValue, int decimals, int approxWidthInChars, String toolTipText) Adds a JTextField field for double values.addDoubleField(String fieldName, double initialValue, int approxWidthInChars, String toolTipText) Adds a JTextField control for double value inputs.addEditableLayerComboBox(String fieldName, Layer initialValue, String toolTipText, LayerManager layerManager) Add a JComboBox containing editable layers of a LayerManager.voidaddEnableChecks(String fieldName, EnableCheck... enableChecks) voidaddEnableChecks(String fieldName, Collection<EnableCheck> enableChecks) Adding enableChecks to the fieldNameToEnableCheckListMap CollectionMap.addIntegerField(String fieldName, int initialValue, int approxWidthInChars, String toolTipText) Adds a JTextField control for integer inputs.Adds a JLabel to this dialog.addLayerableComboBox(String fieldName, T initialValue, String toolTipText, LayerManager layerManager, Class<T> clazz) Add a JComboBox containing layerables of type clazz.<T> JComboBox<T> addLayerableComboBox(String fieldName, T initialValue, String toolTipText, Collection<T> layerable) generic method to load collection of layerable into JComboBox with renderer of layerable (layer icon)addLayerComboBox(String fieldName, Layer initialValue, LayerManager layerManager) Add a JComboBox containing available layers from the current LayerManager.addLayerComboBox(String fieldName, Layer initialValue, String toolTipText, LayerManager layerManager) Add a JComboBox containing available layers from the current LayerManager.addLayerComboBox(String fieldName, Layer initialValue, String toolTipText, Collection<Layer> layers) Add a JComboBox containing any collection of Layers.addLayerComboBox(String fieldName, String toolTipText, LayerManager layerManager, AttributeTypeFilter filter) Add a JComboBox containing layers containing the specified AttributeType.addNonNegativeDoubleField(String fieldName, double initialValue, int approxWidthInChars) Adds a JTextField control for positive double value inputs.addNonNegativeDoubleField(String fieldName, double initialValue, int approxWidthInChars, String toolTipText) Adds a JTextField control for positive double value inputs.addPositiveDoubleField(String fieldName, double initialValue, int approxWidthInChars) Adds a JTextField control for positive double value inputs.addPositiveDoubleField(String fieldName, double initialValue, int approxWidthInChars, String toolTipText) Adds a JTextField control for positive double value inputs.addPositiveIntegerField(String fieldName, int initialValue, int approxWidthInChars) Adds a JTextField control for positive integer inputs.addPositiveIntegerField(String fieldName, int initialValue, int approxWidthInChars, String toolTipText) Adds a JTextField control for positive integer inputs.addRadioButton(String fieldName, String buttonGroupName, boolean initialValue, String toolTipText) Adds a RadioButton to the buttonGroupName group.addRasterLayerComboBox(String fieldName, RasterImageLayer initialValue, String toolTipText, LayerManager layerManager) Add a JComboBox containing RasterImageLayers.protected abstract voidaddRow()protected abstract voidaddRow(String fieldName, JComponent label, JComponent component, EnableCheck[] enableChecks, String toolTipText, int labelPos, int fillMode) Adds a row (containing either a control or a label) to the Dialog.protected abstract voidaddRow(JComponent c) voidAdds a horizontal separator between two set of controls.addSubTitle(String text) Adds a JLabel to display a subtitle in the dialog.addTextAreaField(String fieldName, String initialValue, int rowNumber, int columnNumber, boolean scrollable, EnableCheck[] enableChecks, String toolTipText) Adds a TextArea field.addTextField(String fieldName, String initialValue, int approxWidthInChars, EnableCheck[] enableChecks, String toolTipText) Adds a JTextField control to this dialog.createDoubleCheck(String fieldName) Check if the control contains a valid Double.createIntegerCheck(String fieldName) Check if the control contains a valid Integer.createNonNegativeCheck(String fieldName) Check if the control contains a non-negative Number.createPositiveCheck(String fieldName) Check if the control contains a positive Number.protected StringbooleangetBoolean(String fieldName) Returns selected state for checkboxes, radio buttons.getCheckBox(String fieldName) Gets JCheckBox component matching this fieldName.<T> JComboBox<T> getComboBox(String fieldName) Gets JComboBox component matching this fieldName.protected ComponentgetComponent(String fieldName) doubleReturns double value from a JTextField control.getFileChooser(String fieldName) Gets JFileChooser component matching this fieldName.Returns a File Collection from a JFilechooser control.intgetInteger(String fieldName) Returns integer value from a JTextField control.Gets JLabel matching this fieldName.Returns a Layer from a control.getLayerable(String fieldName) Returns a Layerable from a control.getRadioButton(String fieldName) Gets JRadioButton component matching this fieldName.getRasterLayer(String fieldName) Returns a RasterImageLayer from a control.Gets the string value of a controlFetch the current value held by a component given.Convenience method forgetValue(Component)protected booleanprotected voidreportValidationError(String errorMessage) voidsetFieldEnabled(String fieldName, boolean enable) voidsetFieldVisible(String fieldName, boolean visible) Methods inherited from class JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, updateMethods inherited from class Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, setVisible, show, toBackMethods inherited from class Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFrontMethods inherited from class Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTreeMethods inherited from class 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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
NO_LABEL
public static final int NO_LABELThe label of the control is not displayed.- See Also:
-
LEFT_LABEL
public static final int LEFT_LABELThe label is displayed on the left of the control.- See Also:
-
RIGHT_LABEL
public static final int RIGHT_LABELThe label is displayed on the right of the control.- See Also:
-
HORIZONTAL
public static final int HORIZONTALFlag indicating that the main component will fill the space.- See Also:
-
VERTICAL
public static final int VERTICALFlag indicating that the main component will fill the space vertically.- See Also:
-
BOTH
public static final int BOTHFlag indicating that the main component will fill the space.- See Also:
-
NONE
public static final int NONEFlag indicating that the main component will always use its preferred size.- See Also:
-
NO_VALID_ATTRIBUTE
Attribute combobox message displayed if no valid attribute is available.
-
-
Constructor Details
-
AbstractMultiInputDialog
-
-
Method Details
-
createDoubleCheck
Check if the control contains a valid Double. -
createIntegerCheck
Check if the control contains a valid Integer. -
createPositiveCheck
Check if the control contains a positive Number. -
createNonNegativeCheck
Check if the control contains a non-negative Number. -
addComponent
-
getComponent
-
getLabel
-
getComboBox
-
getCheckBox
-
getRadioButton
Gets JRadioButton component matching this fieldName. -
getFileChooser
Gets JFileChooser component matching this fieldName. -
getValue
Fetch the current value held by a component given. Semi intelligent it returns - String text for text components and scrollpanes - selected Objects for combo boxes - Boolean states for buttons and checkboxes - List of files for file choosers- Parameters:
component- the Component to get the value from- Returns:
- an Object containing the value wrapped in the Component
-
getValue
Convenience method forgetValue(Component)- Parameters:
fieldName- the field name- Returns:
- an Object containing the value for this field name
-
getText
-
getBoolean
Returns selected state for checkboxes, radio buttons. -
getDouble
Returns double value from a JTextField control. -
getInteger
Returns integer value from a JTextField control. -
getLayer
-
getRasterLayer
Returns a RasterImageLayer from a control. -
getLayerable
-
getFiles
-
addEnableChecks
Adding enableChecks to the fieldNameToEnableCheckListMap CollectionMap.- Parameters:
fieldName- fieldName of the controlenableChecks- EnableCheck array to validate this control input
-
addEnableChecks
-
addTextField
public JTextField addTextField(String fieldName, String initialValue, int approxWidthInChars, EnableCheck[] enableChecks, String toolTipText) Adds a JTextField control to this dialog.- Parameters:
fieldName- field name of the controlinitialValue- initial value of the controlapproxWidthInChars- approximative width of the control in charactersenableChecks- checks to validate the input valuetoolTipText- tool tip to help the user- Returns:
- the JTextField control added to this dialog
-
addComboBox
public <T> JComboBox<T> addComboBox(String fieldName, T selectedItem, Collection<T> items, String toolTipText) Adds a JComboBox control to this dialog.- Parameters:
fieldName- field name of the controlselectedItem- initial selected itemitems- items displayed in the JComboBoxtoolTipText- tool tip to help the user- Returns:
- the JComboBox control added to this dialog
-
addLabel
-
addSubTitle
-
addButton
Adds a JButton to this dialog. Action associated to this JButton must be defined.- Parameters:
fieldName- will be used for the label text on the left of the buttontext- text to display in the JButtontoolTipText- tooltip text associated to the JButton- Returns:
- the JButton added to this dialog
-
addButton
-
addSeparator
public void addSeparator()Adds a horizontal separator between two set of controls. -
addIntegerField
public JTextField addIntegerField(String fieldName, int initialValue, int approxWidthInChars, String toolTipText) Adds a JTextField control for integer inputs.- Parameters:
fieldName- field name of the controlinitialValue- initial value of the controlapproxWidthInChars- approximative width of the control in characterstoolTipText- tool tip to help the user- Returns:
- the JTextField control added to this dialog
-
addPositiveIntegerField
public JTextField addPositiveIntegerField(String fieldName, int initialValue, int approxWidthInChars, String toolTipText) Adds a JTextField control for positive integer inputs.- Parameters:
fieldName- field name of the controlinitialValue- initial value of the controlapproxWidthInChars- approximative width of the control in characterstoolTipText- tool tip to help the user- Returns:
- the JTextField control added to this dialog
-
addPositiveIntegerField
public JTextField addPositiveIntegerField(String fieldName, int initialValue, int approxWidthInChars) Adds a JTextField control for positive integer inputs.- Parameters:
fieldName- field name of the controlinitialValue- initial value of the controlapproxWidthInChars- approximative width of the control in characters- Returns:
- the JTextField control added to this dialog
-
addDoubleField
public JTextField addDoubleField(String fieldName, double initialValue, int decimals, int approxWidthInChars, String toolTipText) Adds a JTextField field for double values. Allows limiting the number of decimals, defaulting to 0. Always shows the number as decimal and _never_ uses the scientific notation like "1.234E15"- Parameters:
fieldName- field name of the controlinitialValue- initial value of the controldecimals- number of decimals to round toapproxWidthInChars- approximative width of the control in characters- Returns:
- the JTextField control added to this dialog
-
addDoubleField
Adds a JTextField control for double values.- Parameters:
fieldName- field name of the controlinitialValue- initial value of the controlapproxWidthInChars- approximative width of the control in characters- Returns:
- the JTextField control added to this dialog
-
addDoubleField
public JTextField addDoubleField(String fieldName, double initialValue, int approxWidthInChars, String toolTipText) Adds a JTextField control for double value inputs.- Parameters:
fieldName- field name of the controlinitialValue- initial value of the controlapproxWidthInChars- approximative width of the control in characterstoolTipText- tool tip to help the user- Returns:
- the JTextField control added to this dialog
-
addPositiveDoubleField
public JTextField addPositiveDoubleField(String fieldName, double initialValue, int approxWidthInChars, String toolTipText) Adds a JTextField control for positive double value inputs.- Parameters:
fieldName- field name of the controlinitialValue- initial value of the controlapproxWidthInChars- approximative width of the control in characters- Returns:
- the JTextField control added to this dialog
-
addPositiveDoubleField
public JTextField addPositiveDoubleField(String fieldName, double initialValue, int approxWidthInChars) Adds a JTextField control for positive double value inputs.- Parameters:
fieldName- field name of the controlinitialValue- initial value of the controlapproxWidthInChars- approximative width of the control in characters- Returns:
- the JTextField control added to this dialog
-
addNonNegativeDoubleField
public JTextField addNonNegativeDoubleField(String fieldName, double initialValue, int approxWidthInChars, String toolTipText) Adds a JTextField control for positive double value inputs.- Parameters:
fieldName- field name of the controlinitialValue- initial value of the controlapproxWidthInChars- approximative width of the control in characterstoolTipText- tool tip text associated with this text field- Returns:
- the JTextField control added to this dialog
-
addNonNegativeDoubleField
public JTextField addNonNegativeDoubleField(String fieldName, double initialValue, int approxWidthInChars) Adds a JTextField control for positive double value inputs.- Parameters:
fieldName- field name of the controlinitialValue- initial value of the controlapproxWidthInChars- approximative width of the control in characters- Returns:
- the JTextField control added to this dialog
-
addLayerComboBox
public JComboBox<Layer> addLayerComboBox(String fieldName, Layer initialValue, String toolTipText, Collection<Layer> layers) Add a JComboBox containing any collection of Layers.- Parameters:
fieldName- field name of the controlinitialValue- default layer visible in the combo boxtoolTipText- tool tip text associated with this combo boxlayers- layers to be proposed in the combo box- Returns:
- the JComboBox
-
addLayerComboBox
public JComboBox<Layer> addLayerComboBox(String fieldName, Layer initialValue, LayerManager layerManager) Add a JComboBox containing available layers from the current LayerManager.- Parameters:
fieldName- field name of the controlinitialValue- default layer visible in the combo boxlayerManager- the LayerManager providing layers to the combo box- Returns:
- the JComboBox
-
addLayerComboBox
public JComboBox<Layer> addLayerComboBox(String fieldName, Layer initialValue, String toolTipText, LayerManager layerManager) Add a JComboBox containing available layers from the current LayerManager.- Parameters:
fieldName- field name of the controlinitialValue- default layer visible in the combo boxtoolTipText- tool tip text associated with this combo boxlayerManager- the LayerManager providing layers to the combo box- Returns:
- the JComboBox
-
addEditableLayerComboBox
public JComboBox<Layer> addEditableLayerComboBox(String fieldName, Layer initialValue, String toolTipText, LayerManager layerManager) Add a JComboBox containing editable layers of a LayerManager.- Parameters:
fieldName- field name of the controlinitialValue- default layer visible in the combo boxtoolTipText- tool tip text associated with this combo boxlayerManager- the LayerManager providing layers to the combo box- Returns:
- the JComboBox
-
addLayerComboBox
public JComboBox<Layer> addLayerComboBox(String fieldName, String toolTipText, LayerManager layerManager, AttributeTypeFilter filter) Add a JComboBox containing layers containing the specified AttributeType.- Parameters:
fieldName- field name of the controltoolTipText- tool tip text associated with this combo boxlayerManager- the LayerManager providing layers to the combo boxfilter- a filter to select layers with specified AttributeTypes- Returns:
- the JComboBox
-
addRasterLayerComboBox
public JComboBox<RasterImageLayer> addRasterLayerComboBox(String fieldName, RasterImageLayer initialValue, String toolTipText, LayerManager layerManager) Add a JComboBox containing RasterImageLayers.- Parameters:
fieldName- field name of the controltoolTipText- tool tip text associated with this combo boxlayerManager- the LayerManager providing RasterImageLayers to the combo box- Returns:
- the JComboBox
-
addLayerableComboBox
public <T extends Layerable> JComboBox<T> addLayerableComboBox(String fieldName, T initialValue, String toolTipText, LayerManager layerManager, Class<T> clazz) Add a JComboBox containing layerables of type clazz.- Parameters:
fieldName- field name of the controltoolTipText- tool tip text associated with this combo boxlayerManager- the LayerManager providing layers to the combo boxclazz- class of the layerables- Returns:
- the JComboBox
-
addAttributeComboBox
public JComboBox<String> addAttributeComboBox(String fieldName, String layerFieldName, AttributeTypeFilter filter, String toolTipText) Add a JComboBox containing attributes of the Layer selected in layerFieldName- Parameters:
fieldName- field name for the attributelayerFieldName- field name of the ComboBox used to choose the layerfilter- filter valid attributes from their typetoolTipText- a toolTip for this JComboBox- Returns:
- the JComboBox
-
addCheckBox
-
addCheckBox
Create a CheckBox to get a boolean value from the user.- Parameters:
fieldName- field name of the controlinitialValue- default boolean valuetoolTipText- tool tip text associated with this check box- Returns:
- the JCheckBox
-
addRadioButton
public JRadioButton addRadioButton(String fieldName, String buttonGroupName, boolean initialValue, String toolTipText) Adds a RadioButton to the buttonGroupName group.- Parameters:
fieldName- field name of the controlbuttonGroupName- buttonGroupName of this RadioButtoninitialValue- default boolean valuetoolTipText- tool tip text associated with this check box- Returns:
- the JRadioButton
-
addTextAreaField
public JTextArea addTextAreaField(String fieldName, String initialValue, int rowNumber, int columnNumber, boolean scrollable, EnableCheck[] enableChecks, String toolTipText) Adds a TextArea field.- Parameters:
fieldName- field name of the controlinitialValue- default boolean valuerowNumber- initial row numbercolumnNumber- initial column numberscrollable- if true, the textArea is embeded into a JScrollPaneenableChecks- checks to validate the input valuetoolTipText- tool tip text associated with this check box- Returns:
- the JTextArea
-
addRow
protected abstract void addRow(String fieldName, JComponent label, JComponent component, EnableCheck[] enableChecks, String toolTipText, int labelPos, int fillMode) Adds a row (containing either a control or a label) to the Dialog.- Parameters:
fieldName- field name of the control (used as a key)label- label of the controlcomponent- the control itself (may also be a label or a separator)enableChecks- checks to validate inputstoolTipText- ToolTip textlabelPos- 0, 1 or 2 depending on whether the label is hidden, on the left side or on the right side of the componentfillMode- true if the component must fill the available space
-
addRow
-
addRow
protected abstract void addRow() -
setFieldEnabled
-
setFieldVisible
-
reportValidationError
-
isInputValid
protected boolean isInputValid() -
firstValidationErrorMessage
-
addLayerableComboBox
public <T> JComboBox<T> addLayerableComboBox(String fieldName, T initialValue, String toolTipText, Collection<T> layerable) generic method to load collection of layerable into JComboBox with renderer of layerable (layer icon)- Parameters:
fieldName- field name of the controlinitialValue- default layer visible in the combo boxtoolTipText- tool tip text associated with this combo boxlayerable- layers to be proposed in the combo box- Returns:
- the JComboBox
-