public class ButtonGroupDataField extends IdentifiedAbstractFormComponent implements DataComponent, ValueChangeDataComponent
| Modifier and Type | Class and Description |
|---|---|
static class |
ButtonGroupDataField.CustomButtonGroup |
class |
ButtonGroupDataField.SelectedButtonListener |
JComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
protected int |
alignment |
static String |
BOOLEAN_TYPE |
protected boolean |
booleanType |
protected ButtonGroup |
buttonGroup |
protected Hashtable |
buttons |
protected Vector |
changedListeners |
static String |
CHECK |
static String |
defaultFalseValue |
static String |
defaultTrueValue |
static String |
FALSE_VALUE |
protected String |
falseValue |
protected Color |
fontColor
The default font color.
|
static int |
HORIZONTAL_ORIENTATION |
static String |
HORIZONTAL_ORIENTATION_VALUE |
static String |
HORIZONTAL_TEXT_POSITION |
protected int |
horizontalTextPosition |
protected boolean |
modifiable |
protected boolean |
opaque |
protected int |
orientation |
static String |
ORIENTATION |
static String |
RADIO |
protected boolean |
required
The condition to indicate when field is required.
|
protected boolean |
returnBoolean
The returned boolean.
|
protected boolean |
returnString
The returned string.
|
protected ButtonGroupDataField.SelectedButtonListener |
selectedListener |
protected boolean |
show
The condition to indicate whether must be shown.
|
static String |
TOGGLE |
static String |
TRUE_VALUE |
protected String |
trueValue |
static String |
TYPE |
protected List |
valueList |
static String |
VALUES |
protected Object |
valueSave
The variable to store the field value when
setValue() is
called. |
protected String |
valueType |
static int |
VERTICAL_ORIENTATION |
static String |
VERTICAL_ORIENTATION_VALUE |
attribute, enabledPermission, parentForm, restricted, visiblePermissiondefaultBottomMargin, defaultLeftMargin, defaultRightMargin, defaultTopMarginaccessibleContext, 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_ALIGNMENTCOMP_FOCUS_YELLOW, GREEN_VERY_LIGHT, LIGHT_GRAY_BLUE, LIGHT_GREYISH_BLUE, VERY_LIGHT_BLUE, VERY_LIGHT_GRAY, VERY_LIGHT_PINK, VERY_LIGHT_RED, VERY_LIGHT_SKYBLUE, VERY_LIGHT_YELLOW, VERY_LIGHT_YELLOW_2DEBUG_LANGUAGEDESACTIVATE_COMPONENT_BY_PERMISSION_TIPABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
ButtonGroupDataField(Hashtable parameters) |
| Modifier and Type | Method and Description |
|---|---|
void |
addValueChangeListener(ValueChangeListener arg0) |
protected AbstractButton |
createButton(String text) |
protected void |
createDataField() |
void |
deleteData()
The method to delete data for component.
|
void |
fireValueChanged(Object newValue,
Object oldValue,
int type) |
ButtonGroup |
getButtonGroup() |
Object |
getConstraints(LayoutManager parentLayout)
Description method to return the
constraints component to
place correctly in parent container. |
String |
getLabelComponentText()
Returns the label text component.
|
int |
getSQLDataType()
Returns the
sql data type according to
java.sql.Types
|
Object |
getValue()
Gets the value of a component.
|
protected String |
getValueFromButtonModel(ButtonModel model) |
void |
init(Hashtable parameters)
Initializes parameters.
|
boolean |
isEmpty()
Checks the data existence in component.
|
boolean |
isHidden()
Indicates to check the visibility condition for a component.
|
boolean |
isModifiable()
Checks the modifiable condition for a component.
|
boolean |
isModified()
This method should be return
true when data have been
modified. |
boolean |
isRequired()
Indicates the required condition for a component.
|
protected void |
layoutButtons() |
void |
removeValueChangeListener(ValueChangeListener arg0) |
void |
setEnabled(boolean enabled)
Description method to set enabled or not the component according the
boolean condition in parameter.
|
void |
setModifiable(boolean modifiable)
Establishes the modifiable condition for a component.
|
void |
setRequired(boolean required)
Sets required a component according to condition.
|
void |
setResourceBundle(ResourceBundle res)
Sets the language resource bundle.
|
void |
setValue(Object value)
Sets the value for component.
|
checkEnabledPermission, checkVisiblePermission, getAttribute, getParentForm, initPermissions, isRestricted, setParentFormgetTextsToTranslate, setComponentLocaleaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, 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, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, 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, update, updateUIadd, add, add, add, add, addContainerListener, addImpl, 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, setLayout, 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, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, 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, toString, transferFocus, transferFocusBackward, transferFocusUpCycleclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisEnabled, setVisiblegetTextsToTranslate, setComponentLocalegetAttributeinitPermissions, isRestrictedpublic static final String TYPE
public static final String TOGGLE
public static final String RADIO
public static final String CHECK
public static final String HORIZONTAL_TEXT_POSITION
protected String valueType
public static final String VALUES
public static final String TRUE_VALUE
public static final String FALSE_VALUE
public static final String VERTICAL_ORIENTATION_VALUE
public static final String HORIZONTAL_ORIENTATION_VALUE
public static final String ORIENTATION
public static final int HORIZONTAL_ORIENTATION
public static final int VERTICAL_ORIENTATION
protected int orientation
public static final String BOOLEAN_TYPE
protected boolean booleanType
protected boolean modifiable
protected Vector changedListeners
protected int horizontalTextPosition
protected Color fontColor
protected Object valueSave
setValue() is
called.protected boolean required
protected boolean show
protected boolean returnBoolean
protected boolean returnString
protected boolean opaque
protected int alignment
protected List valueList
protected String trueValue
protected String falseValue
public static String defaultTrueValue
public static String defaultFalseValue
protected ButtonGroup buttonGroup
protected Hashtable buttons
protected ButtonGroupDataField.SelectedButtonListener selectedListener
public ButtonGroupDataField(Hashtable parameters)
public void init(Hashtable parameters)
init in interface FormComponentinit in class IdentifiedAbstractFormComponentparameters - the Hashtable with parameters
| attribute | values | default | required | meaning |
| align | center/left/right | center | no | The alignment for field. |
| attr | yes | The attribute to manage the field. | ||
| buttontype | radio/toggle/check | radio | no | Indicates the type of button will be showed. The possibilities are ToggleButton, RadioButtons or CheckBoxs. |
| booleantype | yes/no | no | no | Indicates that this field supports two values. One value is represented by the true and another by the false. |
| returnboolean | yes/no | no | no | Indicates when field value is returned like a Boolean. |
| returnstring | yes/no | no | no | Indicates when field value is returned like a string. It could be used to fill with zeros. |
| orientation | vertical/horizontal | horizontal | no | Indicates the alignment of the components. |
| values | value1;value2;... | no | Indicates the values can set on the element | |
| truevalue | value | no (only with booleantype="yes") | Indicates the value chosen when the field is "true" | |
| falsevalue | value | no (only with booleantype="yes") | Indicates the value chosen when the field is "false" |
public ButtonGroup getButtonGroup()
protected void createDataField()
protected AbstractButton createButton(String text)
protected void layoutButtons()
public void deleteData()
DataComponentdeleteData in interface DataComponentpublic String getLabelComponentText()
DataComponentLocale.
getLabelComponentText in interface DataComponentpublic int getSQLDataType()
DataComponentsql data type according to
java.sql.Types
getSQLDataType in interface DataComponentInteger typeprotected String getValueFromButtonModel(ButtonModel model)
public Object getValue()
DataComponentgetValue in interface DataComponentobject with value.public boolean isEmpty()
DataComponentisEmpty in interface DataComponenttrue when component is emptypublic boolean isHidden()
DataComponentisHidden in interface DataComponentpublic boolean isModifiable()
DataComponentisModifiable in interface DataComponenttrue when component is modifiablepublic boolean isModified()
DataComponenttrue when data have been
modified. The method setValue() should be change this
condition.
isModified in interface DataComponentpublic boolean isRequired()
DataComponentisRequired in interface DataComponentpublic void setModifiable(boolean modifiable)
DataComponentDeleteFields call.
setModifiable in interface DataComponentmodifiable - the boolean conditionpublic void setRequired(boolean required)
DataComponentsetRequired in interface DataComponentrequired - the required conditionpublic void setValue(Object value)
DataComponentsetValue in interface DataComponentvalue - the object with value to setpublic void addValueChangeListener(ValueChangeListener arg0)
addValueChangeListener in interface ValueChangeDataComponentpublic void removeValueChangeListener(ValueChangeListener arg0)
removeValueChangeListener in interface ValueChangeDataComponentpublic void setResourceBundle(ResourceBundle res)
InternationalizationsetResourceBundle in interface InternationalizationsetResourceBundle in class AbstractFormComponentres - the new language bundle.public void setEnabled(boolean enabled)
FormComponentsetEnabled in interface FormComponentsetEnabled in class JComponentenabled - the enabled conditionpublic Object getConstraints(LayoutManager parentLayout)
FormComponentconstraints component to
place correctly in parent container.
getConstraints in interface FormComponentgetConstraints in class AbstractFormComponentparentLayout - the parent container referenceCopyright © 2016 Imatia Innovation S.L.. All rights reserved.