public class DefaultFieldEditor<T> extends ToolDialog implements FieldEditor<T>
FieldEditor
interface.FieldEditor
,
Serialized Formjavax.swing.JDialog.AccessibleJDialog
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
accessibleContext, rootPane, rootPaneCheckingEnabled
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
CENTER, EAST, NORTH, SOUTH, WEST
Constructor and Description |
---|
DefaultFieldEditor(java.awt.Window hook,
javax.swing.JButton callerButton) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the content
|
protected javax.swing.JPanel |
createMainPanel() |
protected void |
doOnApply()
Should be overridden in order to provide an apply action
|
protected javax.swing.JButton |
getCallerButton() |
T |
getValue()
Returns the current value or null if no content exists.
|
protected boolean |
hasApplyButton()
Defines whether an Apply button should be displayed (default false).
|
protected boolean |
hasCancelButton()
Defines whether a Cancel button should be displayed (default false).
|
boolean |
isEmpty()
Tells whether the editor has any content.
|
boolean |
isInputValid()
Performs a check whether the editor's input is valid.
|
boolean |
isLocked()
Tells whether the editor is currently locked.
|
boolean |
isNotNull()
Tells whether the editor requires input.
|
void |
popup(javax.swing.JComponent hook,
T value)
Pops up the editor to become visible (it is usually a dialog or a frame).
|
void |
setInsertDefaultValue()
Requests the editor to lookup for an insert default value and loads it.
|
void |
setLocked(boolean isLocked)
Locks the editor and makes editing impossible.
|
void |
setNotNull(boolean isNotNull)
Sets the editor's input to mandatory.
|
void |
setValue(T value)
Loads the data content which refers to a particular object.
|
addApplyListener, apply, cancel, close, closeByIcon, createButtonPanel, createWindowAdapter, doOnApplyError, doOnCancel, doOnClose, doOnPopup, getApplicationContext, getApplier, getApplyAndCloseButton, getApplyButton, getButtonPanel, getCaller, getCancelButton, getClearButton, getCloseButton, getLogChannel, getPreferredWindowAlignment, getWindowAdapter, hasApplyAndCloseButton, hasButtonPanel, hasClearButton, hasCloseButton, isClosedOnApply, isLogDebug, isLogVerbose, locate, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, pack, popup, removeApplyListener, setDefaultButton, setLogChannel, setRelocateOnPopup, wasCancelled
dispose, getMinimumHeight, getMinimumWidth, isDisposeOnClose, isErrorAttachable, isLocated, isPacked, registerSubDialog, repack, setLocation, setLocationRelativeTo, setLocationRelativeTo, setLocationToCenter, setTitle, setVisible, shiftLocation, toDumpString, toDumpString, toString, toString
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, update
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBack
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, 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, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocationByPlatform, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFront
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, validateTree
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, 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, 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, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getLocation, getMinimumHeight, getMinimumWidth, getSize, getTitle, getToolkit, isPacked, pack, popup, setLocation, setLocationRelativeTo, setMinimumSize, setPreferredSize, shiftLocation
toDumpString, toDumpString, toString, toString
getRootPane
public DefaultFieldEditor(java.awt.Window hook, javax.swing.JButton callerButton)
protected javax.swing.JButton getCallerButton()
protected final javax.swing.JPanel createMainPanel()
protected boolean hasCancelButton()
ToolDialog
hasCancelButton
in class ToolDialog
protected boolean hasApplyButton()
ToolDialog
hasApplyButton
in class ToolDialog
public void clear()
Clearable
clear
in interface FieldEditor<T>
clear
in interface Clearable
clear
in class ToolDialog
public void setValue(T value)
FieldEditor
setValue
in interface FieldEditor<T>
public boolean isInputValid()
FieldEditor
isInputValid
in interface FieldEditor<T>
public boolean isLocked()
FieldEditor
isLocked
in interface FieldEditor<T>
public boolean isNotNull()
FieldEditor
isNotNull
in interface FieldEditor<T>
public boolean isEmpty()
FieldEditor
isEmpty
in interface FieldEditor<T>
public void setLocked(boolean isLocked)
FieldEditor
setLocked
in interface FieldEditor<T>
public void setNotNull(boolean isNotNull)
FieldEditor
setNotNull
in interface FieldEditor<T>
public void setInsertDefaultValue()
FieldEditor
setInsertDefaultValue
in interface FieldEditor<T>
public void popup(javax.swing.JComponent hook, T value)
FieldEditor
popup
in interface FieldEditor<T>
protected void doOnApply() throws java.lang.Exception
ToolDialog
doOnApply
in class ToolDialog
java.lang.Exception
public T getValue()
FieldEditor
getValue
in interface FieldEditor<T>
Copyright © 2014 EsprIT-Systems. All Rights Reserved.