public abstract class AbstractBooleanField extends javax.swing.JCheckBox implements Field<java.lang.Boolean>
javax.swing.JCheckBox.AccessibleJCheckBoxjavax.swing.JToggleButton.AccessibleJToggleButton, javax.swing.JToggleButton.ToggleButtonModeljavax.swing.AbstractButton.AccessibleAbstractButton, javax.swing.AbstractButton.ButtonChangeListenerjavax.swing.JComponent.AccessibleJComponent| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
FALSE_CHAR
The string used as a boolean FALSE literal.
|
static java.lang.String |
TRUE_CHAR
The string used as a boolean TRUE literal.
|
actionListener, BORDER_PAINTED_CHANGED_PROPERTY, changeEvent, changeListener, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, itemListener, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, model, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTYaccessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT| Constructor and Description |
|---|
AbstractBooleanField(NlsDatabaseKey nls) |
AbstractBooleanField(NlsDatabaseKey nls,
boolean isNumericMode) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the content
|
java.lang.Boolean |
createValue()
Not actually used
|
javax.swing.JLabel |
getJLabel()
Returns a JLabel component labeled with the translated field name.
|
java.lang.String |
getLabel()
Returns the translated name for the field.
|
java.lang.String |
getName()
Returns the unique name of the field.
|
NlsDatabaseKey |
getNlsKey()
Returns the translation key used to name this Field
|
java.lang.String |
getStringValue()
Returns the literal boolean value 'T' or 'F' ('0' or '1' in numeric mode respectively)
|
java.awt.Component |
getUnitComponent()
Returns the unit component for this field if one is set
|
java.lang.Boolean |
getValue()
Returns the field value as an Object - or null if the field is empty.
|
AbstractBooleanField |
getWidget()
Returns a JComponent that represents the layoutable GUI component.
|
boolean |
inputEquals(boolean b)
Tests if the field input is equal to the given boolean value.
|
boolean |
inputEquals(double d)
Tests if the field input is equal to the given double number.
|
boolean |
inputEquals(int i)
Tests if the field input is equal to the given int number.
|
boolean |
inputEquals(java.lang.Object o)
Tests if the field input is equal to the given object.
|
boolean |
isEmpty()
Returns always false.
|
boolean |
isLocked()
Tells wasCancelled the field is locked for editing.
|
boolean |
isNotNull()
Returns always true for boolean fields.
|
boolean |
isPrimaryKey()
Tells whether this field is (or is part of) the primary key.
|
boolean |
isRecordTypeField()
Tells whether this field defines the record type (only valid for composed persistent
objects).
|
boolean |
isStretchableX()
Tells whether this field should fill all the horizontal space in it's container.
|
boolean |
isStretchableY()
Tells whether this field should fill all the vertical space in it's container.
|
protected boolean |
parseStringInput(java.lang.String str) |
void |
setInsertDefaultValue()
Requests the field to search for insert-default values in the 'insert_defaults' database table.
|
void |
setLocked(boolean b)
Locks the field for editing.
|
void |
setModifyFlag(ModifyFlag flag)
Gives the field a reference to a ModifyFlag which is set if the field was edited.
|
void |
setNotNull(boolean b)
Sets the field to not-null.
|
void |
setNumeric(boolean mode)
If set to numeric mode, the field will use '0' and '1' instead of 'T' and 'F'.
|
void |
setPrimaryKey(boolean isPk)
Tells this field to be the primary key (affects input checking).
|
void |
setStretchableX(boolean isStretchableX)
Tells whether this field should fill all the horizontal space in it's container.
|
void |
setStretchableY(boolean isStretchableY)
Tells whether this field should fill all the vertical space in it's container.
|
void |
setUnitComponent(java.awt.Component comp)
Sets the unit component for this field which is placed behind the field,
when the field is added to a FieldPanel
|
void |
setUnitString(java.lang.String unitStr)
Sets the unit string for this field which is placed as a JLabel behind the field,
when the field is added to a FieldPanel
|
void |
setValue(java.lang.Boolean o)
Sets the field value to the given object.
|
void |
setValue(java.lang.String str) |
java.lang.String |
toString()
Returns a string representation of the field typically it's unique name and it's current
value.
|
java.lang.String |
toString(java.lang.Object o)
Converts the object to a String according to the policy of the affected field component.
|
java.lang.Boolean |
toValue(java.lang.Object o)
Tries to convert any object value to the target data type of this field.
|
getAccessibleContext, getUIClassID, isBorderPaintedFlat, paramString, setBorderPaintedFlat, updateUIactionPropertyChanged, addActionListener, addChangeListener, addImpl, addItemListener, checkHorizontalKey, checkVerticalKey, configurePropertiesFromAction, createActionListener, createActionPropertyChangeListener, createChangeListener, createItemListener, doClick, doClick, fireActionPerformed, fireItemStateChanged, fireStateChanged, getAction, getActionCommand, getActionListeners, getChangeListeners, getDisabledIcon, getDisabledSelectedIcon, getDisplayedMnemonicIndex, getHideActionText, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getItemListeners, getMargin, getMnemonic, getModel, getMultiClickThreshhold, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getSelectedObjects, getText, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, init, isBorderPainted, isContentAreaFilled, isFocusPainted, isRolloverEnabled, isSelected, paintBorder, removeActionListener, removeChangeListener, removeItemListener, removeNotify, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setDisplayedMnemonicIndex, setEnabled, setFocusPainted, setHideActionText, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabel, setLayout, setMargin, setMnemonic, setMnemonic, setModel, setMultiClickThreshhold, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setText, setUI, setVerticalAlignment, setVerticalTextPositionaddAncestorListener, 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, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, 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, transferFocusDownCycle, validate, validateTreeaction, 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, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, 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, transferFocus, transferFocusBackward, transferFocusUpCyclepublic static final java.lang.String TRUE_CHAR
public static final java.lang.String FALSE_CHAR
public AbstractBooleanField(NlsDatabaseKey nls)
public AbstractBooleanField(NlsDatabaseKey nls, boolean isNumericMode)
public NlsDatabaseKey getNlsKey()
Fieldpublic java.lang.String getName()
Fieldtable.column.public java.lang.String getLabel()
FieldgetLabel in interface Field<java.lang.Boolean>getLabel in class javax.swing.AbstractButtonTranslationpublic java.awt.Component getUnitComponent()
FieldgetUnitComponent in interface Field<java.lang.Boolean>Field.setUnitComponent(Component)public void setUnitComponent(java.awt.Component comp)
FieldsetUnitComponent in interface Field<java.lang.Boolean>public void setUnitString(java.lang.String unitStr)
FieldsetUnitString in interface Field<java.lang.Boolean>Field.setUnitComponent(Component)public AbstractBooleanField getWidget()
Fieldpublic void setValue(java.lang.String str)
protected final boolean parseStringInput(java.lang.String str)
public void setValue(java.lang.Boolean o)
Fieldpublic void setNumeric(boolean mode)
public final java.lang.Boolean getValue()
Fieldpublic final java.lang.Boolean createValue()
throws InvalidFieldInputException
createValue in interface Field<java.lang.Boolean>InvalidFieldInputException - If the input Object cannot be created due to a parsing error.public java.lang.String getStringValue()
getStringValue in interface Field<java.lang.Boolean>public final boolean isEmpty()
public java.lang.String toString(java.lang.Object o)
Fieldpublic javax.swing.JLabel getJLabel()
Fieldpublic void setNotNull(boolean b)
FieldsetNotNull in interface Field<java.lang.Boolean>public final boolean isNotNull()
public void setLocked(boolean b)
Fieldpublic boolean isLocked()
Fieldpublic void clear()
Clearablepublic boolean inputEquals(java.lang.Object o)
FieldinputEquals in interface Field<java.lang.Boolean>public boolean inputEquals(int i)
FieldinputEquals in interface Field<java.lang.Boolean>public boolean inputEquals(double d)
FieldinputEquals in interface Field<java.lang.Boolean>public boolean inputEquals(boolean b)
FieldinputEquals in interface Field<java.lang.Boolean>public java.lang.String toString()
Fieldpublic void setInsertDefaultValue()
FieldsetInsertDefaultValue in interface Field<java.lang.Boolean>public void setModifyFlag(ModifyFlag flag)
FieldsetModifyFlag in interface Field<java.lang.Boolean>public void setPrimaryKey(boolean isPk)
FieldsetPrimaryKey in interface Field<java.lang.Boolean>public boolean isPrimaryKey()
FieldisPrimaryKey in interface Field<java.lang.Boolean>public boolean isRecordTypeField()
FieldisRecordTypeField in interface Field<java.lang.Boolean>public boolean isStretchableY()
FieldisStretchableY in interface Field<java.lang.Boolean>public boolean isStretchableX()
FieldisStretchableX in interface Field<java.lang.Boolean>public void setStretchableX(boolean isStretchableX)
FieldsetStretchableX in interface Field<java.lang.Boolean>public void setStretchableY(boolean isStretchableY)
FieldsetStretchableY in interface Field<java.lang.Boolean>public java.lang.Boolean toValue(java.lang.Object o)
FieldIllegalArgumentException is thrown when the type is not supported by the field.Copyright © 2014 EsprIT-Systems. All Rights Reserved.