public abstract class DesktopAbstractField<C extends javax.swing.JComponent> extends DesktopAbstractComponent<C> implements Field
Field.Validator
Component.ActionOwner, Component.ActionsHolder, Component.Alignment, Component.BelongToFrame, Component.Buffered, Component.ChildEditableController, Component.Collapsable, Component.Container, Component.Disposable, Component.Editable, Component.EditableChangeEvent, Component.EditableChangeListener, Component.EditableChangeNotifier, Component.ExpandedStateChangeEvent, Component.ExpandedStateChangeListener, Component.Focusable, Component.HasBorder, Component.HasButtonsPanel, Component.HasCaption, Component.HasFormatter, Component.HasIcon, Component.HasInputPrompt, Component.HasNamedComponents, Component.HasPresentations, Component.HasRowsCount, Component.HasSettings, Component.HasValue, Component.HasXmlDescriptor, Component.LayoutClickEvent, Component.LayoutClickListener, Component.LayoutClickNotifier, Component.Margin, Component.MouseEventDetails, Component.OrderedContainer, Component.OuterMargin, Component.SecuredActionsHolder, Component.ShortcutAction, Component.ShortcutNotifier, Component.ShortcutTriggeredEvent, Component.Spacing, Component.UiPermissionAware, Component.Validatable, Component.ValueChangeEvent, Component.ValueChangeListener, Component.Wrapper
SWING_PROPERTY_CLASS, SWING_PROPERTY_ID
AUTO_SIZE, AUTO_SIZE_PX, UNITS_PERCENTAGE, UNITS_PIXELS
Constructor and Description |
---|
DesktopAbstractField() |
Modifier and Type | Method and Description |
---|---|
void |
addListener(ValueListener listener) |
void |
addValidator(Field.Validator validator)
Add
Field.Validator instance. |
void |
addValueChangeListener(Component.ValueChangeListener listener) |
java.lang.String |
getRequiredMessage() |
java.util.Collection<Field.Validator> |
getValidators() |
boolean |
isEditable() |
boolean |
isRequired() |
boolean |
isValid() |
void |
removeListener(ValueListener listener) |
void |
removeValidator(Field.Validator validator) |
void |
removeValueChangeListener(Component.ValueChangeListener listener) |
void |
setEditable(boolean editable) |
void |
setParent(Component parent)
INTERNAL.
Component.Container.add(Component) is normally used for adding components
to a parent and the used method will call this method implicitly. |
void |
setRequired(boolean required) |
void |
setRequiredMessage(java.lang.String msg)
A message that will be displayed to user if the field is required but has null value
|
void |
updateMissingValueState() |
void |
validate() |
addStyleName, assignAutoDebugId, getAlignment, getCaption, getComponent, getComposition, getDebugId, getFrame, getHeight, getHeightUnits, getIcon, getId, getParent, getStyleName, getTabIndex, getWidth, getWidthUnits, getXmlDescriptor, isComponentVisible, isEnabled, isEnabledItself, isParentEnabled, isResponsive, isVisible, isVisibleItself, removeStyleName, requestFocus, setAlignment, setCaption, setContainer, setDebugId, setEnabled, setExpanded, setFrame, setHeight, setIcon, setId, setParentEnabled, setResponsive, setStyleName, setTabIndex, setVisible, setWidth, setXmlDescriptor, unwrap, unwrapComposition
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDatasource, getMetaProperty, getMetaPropertyPath, setDatasource
getValue, setValue
isEditableWithParent
getFrame, setFrame
addStyleName, getAlignment, getDebugId, getHeight, getHeightUnits, getId, getParent, getStyleName, getWidth, getWidthUnits, isEnabled, isEnabledItself, isResponsive, isVisible, isVisibleItself, removeStyleName, requestFocus, setAlignment, setDebugId, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition
getCaption, getDescription, setCaption, setDescription
isValidateOnCommit
getIcon, setIcon
public void addListener(ValueListener listener)
addListener
in interface Component.HasValue
public void removeListener(ValueListener listener)
removeListener
in interface Component.HasValue
public void addValueChangeListener(Component.ValueChangeListener listener)
addValueChangeListener
in interface Component.HasValue
public void removeValueChangeListener(Component.ValueChangeListener listener)
removeValueChangeListener
in interface Component.HasValue
public void addValidator(Field.Validator validator)
Field
Field.Validator
instance.addValidator
in interface Field
public void removeValidator(Field.Validator validator)
removeValidator
in interface Field
public java.util.Collection<Field.Validator> getValidators()
getValidators
in interface Field
public boolean isValid()
isValid
in interface Component.Validatable
public void validate() throws ValidationException
validate
in interface Component.Validatable
ValidationException
public boolean isRequired()
isRequired
in interface Field
public void setRequired(boolean required)
setRequired
in interface Field
public void updateMissingValueState()
public void setRequiredMessage(java.lang.String msg)
Field
setRequiredMessage
in interface Field
public java.lang.String getRequiredMessage()
getRequiredMessage
in interface Field
public boolean isEditable()
isEditable
in interface Component.Editable
public void setEditable(boolean editable)
setEditable
in interface Component.Editable
public void setParent(Component parent)
Component
Component.Container.add(Component)
is normally used for adding components
to a parent and the used method will call this method implicitly.setParent
in interface Component
setParent
in class DesktopAbstractComponent<C extends javax.swing.JComponent>
parent
- Parent component