public class ColorDataField extends TextFieldDataField
| Modifier and Type | Class and Description |
|---|---|
protected class |
ColorDataField.ColorInnerDocumentListener
The main class to listen the document inner color.
|
protected class |
ColorDataField.JPanelColor
The main class for creating a color panel.
|
TextFieldDataField.EJTextField, TextFieldDataField.InnerDocumentListenerDataField.AuxPanel, DataField.CopyActionListener, DataField.ELabel, DataField.FieldButton, DataField.FieldFocusListener, DataField.InfoMouseListener, DataField.ToggleButtonJPanel.AccessibleJPanelJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
static String |
COLOR_TYPE_VALUE
Color type value property.
|
protected JButton |
colorButton
The color button.
|
protected static JColorChooser |
colorChooser
The static Color chooser.
|
protected ColorDocument |
colorDocument
The Color document.
|
static boolean |
DEBUG
Only for DEBUG mode.
|
protected JButton |
deleteButton
The delete button.
|
static String |
ENABLED_TEXT_FIELD_PROPERTY
Enabled text field property.
|
static String |
INTEGER_TYPE_VALUE
Integer type value property.
|
static String |
NO
No property.
|
static String |
NUMBER_TYPE_VALUE
Number type value property.
|
protected ColorDataField.JPanelColor |
panelColor
The panel Color.
|
static String |
RETURN_TYPE_PROPERTY
Return type property.
|
protected int |
returnType
The return color.
|
static String |
SHOW_DELETE_BUTTON_PROPERTY
Show delete button property.
|
static String |
SHOW_TEXT_FIELD_PROPERTY
Show text field property.
|
static String |
STRING_HEX_TYPE_VALUE
String Hex type value property.
|
static String |
STRING_RGB_TYPE_VALUE
String RGB type value property.
|
protected boolean |
textFieldEnabled
The condition to enable text field.
|
static String |
YES
Yes property.
|
disabledTextColor, innerListeneradvancedQueryMode, ALIGN, ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, alignment, ASTERISK_REQUIRED_STYLE, ATTR, attribute, backgroundColor, BGCOLOR, bold, BOLD, BORDER, BORDER_REQUIRED_STYLE, borderText, BOTTOM, CENTER, CLIPBOARD_COPY, CLIPBOARD_COPY_es_ES, CLIPBOARD_CUT, CLIPBOARD_CUT_es_ES, CLIPBOARD_PASTE, CLIPBOARD_PASTE_es_ES, conditions, dataField, DEFAULT_BORDER, DEFAULT_BOTTOM_MARGIN, DEFAULT_FIELD_LEFT_MARGIN, DEFAULT_FIELD_RIGHT_MARGIN, DEFAULT_LABEL_LEFT_MARGIN, DEFAULT_LABEL_RIGHT_MARGIN, DEFAULT_PARENT_MARGIN, DEFAULT_PARENT_MARGIN_FOR_SCROLL, DEFAULT_TOP_MARGIN, defaultAsteriskColor, DEFAULTBORDER, defaultDisableBackgroundColor, defaultFieldButtonHigh, defaultPreferenceTextNotRetrievedFromPreferences, DEFINE_HELP_FIELD_PREFERENCE, dim, DIM, disabledbgcolor, DISABLEDBGCOLOR, empty, enabled, ENABLED, EXPAND, FIELD_HELP_TIP, fieldlistenerFocus, fieldSize, fireValueEvents, FOCUS_BACKGROUNDCOLOR, FONT, fontColor, FONTCOLOR, fontSize, FONTSIZE, height, HEIGHT, incrementalFont, initPreferenceHelpText, INSETS, isEnabled, LABELALIGN, labelComponent, LABELFONT, LABELFONTCOLOR, labelPosition, LABELPOSITION, LABELSIZE, labelText, LABELVISIBLE, LEFT, locale, LOWERED, menuCopy, menuCut, menuDefineHelpPreference, menuHelpPreferences, menuPaste, modifiable, NO_STR, NONE, noRequiredBorder, OPAQUE, originalSize, OUTBORDER, panel, parentForm, permissionActivate, permissionVisible, popupMenu, PREF_WIDTH, prefWidth, RAISED, redimensionPanel, redimensJTextField, required, REQUIRED, requiredBorder, REQUIREDBORDER, requiredFieldBackgroundColor, requiredFieldForegroundColor, resources, restricted, RIGHT, show, showLabel, SIZE, TEXT_STR, TEXTALIGN, textAlignment, textHelpPreference, TIP, tipKey, TOP, validData, VALIGN, Valignment, valueListener, valueSave, VISIBLE, VISUALIZE_HELP_FIELD_PREFERENCE, weightDataFieldH, weightPanelH, width, WIDTH, x, X, y, Y, YES_STRaccessibleContext, 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, PROPERTIES, SOMEBITS| Constructor and Description |
|---|
ColorDataField(Hashtable parameters)
The class constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
deleteData()
Deletes data.
|
JButton |
getColorButton()
Gets the JButton color.
|
ColorDataField.JPanelColor |
getColorPanel()
Gets the JPanel Color.
|
Color |
getColorValue()
The method to get the color value from a document reference.
|
JButton |
getDeleteButton()
Gets the delete button.
|
String |
getHEXValue()
The method to get the HEX RGB color from a document reference.
|
Number |
getNumericalValue()
The method to get the number color.
|
String |
getRGBValue()
The method to get the RGB color from a document reference.
|
int |
getSQLDataType()
The method to get the integer SQL types for color, rgb string, hex
string, number or integer.
|
Object |
getValue()
The method to get the number color in a object.
|
void |
init(Hashtable parameters)
Calls to super() to init parameters.
|
protected void |
installInnerListener()
The method to add a new inner listener.
|
boolean |
isEmpty()
The empty or no empty condition according to method
getValue(). |
void |
setEnabled(boolean enabled)
Checks permissions and enables the buttons according to @param.
|
void |
setValue(Object value)
The main method to set the color values.
|
createDataField, getAttribute, getInnerListenerEnabled, getInnerValue, getLabelComponentText, getText, isInnerValueEqual, isModifiable, isRequired, isSelectedAll, setInnerListenerEnabled, setInnerValueaddFocusListener, addHelpMenuPopup, addValueChangeListener, changeButton, changeOpacity, checkDefineHelpPermission, checkEnabledPermission, checkVisiblePermission, configurePopupMenuHelp, createFocusListener, createInstanceConditionCombo, createPopupMenu, defineHelpField, finalize, fireValueChanged, getBorder, getConstraints, getDataField, getDisabledbgcolor, getFontColor, getHelpIdString, getHelpPreferenceKey, getLabelComponent, getLabelFontColor, getLabelText, getParentForm, getPreferenceHelpText, getPreferredSize, getTextsToTranslate, getValueChangeListeners, hasHelpInPreferences, initPermissions, initPreferences, installFocusListener, installHelpId, installPopupMenuListener, installPreferenceHelpListener, isAdvancedQueryMode, isEnabled, isHidden, isLabelVisible, isModified, isRestricted, parseBoolean, preferenceChanged, removeFocusListener, removeValueChangeListener, requestFocus, seeHelpField, setBold, setComponentLocale, setDisabledbgcolor, setFont, setFontColor, setFontSize, setLabelFontColor, setModifiable, setParentForm, setRequired, setRequiredFieldBackground, setResourceBundle, setVisible, showPopupMenu, updateBackgroundColor, updateBackgroundColor, updateFont, updateTip, updateUI, validateComponentPositionsgetAccessibleContext, getUI, getUIClassID, paramString, setUIaddAncestorListener, 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, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, updateadd, 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, 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, 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, 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, transferFocusUpCyclepublic static boolean DEBUG
public static final String RETURN_TYPE_PROPERTY
public static final String COLOR_TYPE_VALUE
public static final String STRING_RGB_TYPE_VALUE
public static final String STRING_HEX_TYPE_VALUE
public static final String NUMBER_TYPE_VALUE
public static final String INTEGER_TYPE_VALUE
public static final String SHOW_TEXT_FIELD_PROPERTY
public static final String YES
public static final String NO
public static final String ENABLED_TEXT_FIELD_PROPERTY
public static final String SHOW_DELETE_BUTTON_PROPERTY
protected JButton colorButton
protected JButton deleteButton
protected ColorDataField.JPanelColor panelColor
protected static JColorChooser colorChooser
protected int returnType
ColorDocument.RETURN_COLORprotected boolean textFieldEnabled
protected ColorDocument colorDocument
public ColorDataField(Hashtable parameters)
parameters - the Hashtable with parameters from XML
definition.public void init(Hashtable parameters)
init in interface FormComponentinit in class TextFieldDataFieldparameters - the Hashtable with parameters
| attribute | values | default | required | meaning |
| returnedtype | stringrgb;stringhex;number;integer | no | The returned type:
|
|
| showtextfield | yes/no | Condition to show the text field. | ||
| enabledtextfield | yes/no | Condition to activate the text field | ||
| showdeletebutton | yes/no | Condition to show the delete button | ||
| colorwidth | Width in pixels of color bar showed in this field. | |||
| colorheight | Height in pixels of color bar showed in this field. | |||
| borderbuttons | yes/no | yes | no | Condition about border of buttons for this field. by default, borders are enabled. |
| opaquebuttons | yes/no | yes | no | Condition about opacity of buttons for this field. by default, buttons are opaques. |
| highlightbuttons | yes/no | no | no | Condition about highlight of buttons for this field. by default, hightlight is disabled. |
public ColorDataField.JPanelColor getColorPanel()
public JButton getColorButton()
public JButton getDeleteButton()
protected void installInnerListener()
installInnerListener in class TextFieldDataFieldpublic int getSQLDataType()
public boolean isEmpty()
getValue().
isEmpty in interface DataComponentisEmpty in class TextFieldDataFieldgetValue()public Color getColorValue()
JTextComponent.getDocument()public String getRGBValue()
JTextComponent.getDocument()public String getHEXValue()
JTextComponent.getDocument()public Number getNumericalValue()
JTextComponent.getDocument()public Object getValue()
JTextComponent.getDocument()public void setValue(Object value)
value - the object where the values(color,number,...) are placedpublic void deleteData()
deleteData in interface DataComponentdeleteData in class TextFieldDataFieldpublic void setEnabled(boolean enabled)
setEnabled in interface FormComponentsetEnabled in class DataFieldenabled - the condition to enable componentsCopyright © 2016 Imatia Innovation S.L.. All rights reserved.