public abstract class DataField extends JPanel implements DataComponent, AccessForm, HasHelpIdComponent, ApplicationPreferencesListener, HasPreferenceComponent, ValueChangeDataComponent
| Modifier and Type | Class and Description |
|---|---|
protected static class |
DataField.AuxPanel
This class implements an auxiliary panel for field.
|
protected class |
DataField.CopyActionListener |
static class |
DataField.ELabel |
static class |
DataField.FieldButton
This class creates a field button.
|
protected class |
DataField.FieldFocusListener
This class implements a field focus listener.
|
protected static class |
DataField.InfoMouseListener
This class manages the mouse events in data field.
|
static class |
DataField.ToggleButton
This class creates a toggle field button.
|
JPanel.AccessibleJPanelJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
protected boolean |
advancedQueryMode
The condition about advanced query mode state.
|
static String |
ALIGN
The key for alignment.
|
static int |
ALIGN_CENTER
The default center alignment.
|
static int |
ALIGN_LEFT
The default left alignment.
|
static int |
ALIGN_RIGHT
The default right alignment.
|
protected int |
alignment
The field alignment.
|
static boolean |
ASTERISK_REQUIRED_STYLE
The condition about asterisk required style.
|
static String |
ATTR
The attribute key.
|
protected Object |
attribute
The reference to attribute.
|
protected Color |
backgroundColor
The default background color.
|
static String |
BGCOLOR
The key to manage the background color.
|
protected boolean |
bold
The bold condition.
|
static String |
BOLD
The key to manage the bold writing.
|
static String |
BORDER
The key to manage the border.
|
static boolean |
BORDER_REQUIRED_STYLE |
protected String |
borderText
The reference for border text.
|
static String |
BOTTOM
The key for bottom alignment.
|
static String |
CENTER
The key for center alignment.
|
static String |
CLIPBOARD_COPY
The key to manage the copy operation to the clipboard.
|
static String |
CLIPBOARD_COPY_es_ES |
static String |
CLIPBOARD_CUT
The key to manage the cut operation to the clipboard.
|
static String |
CLIPBOARD_CUT_es_ES |
static String |
CLIPBOARD_PASTE
The key to manage the paste operation to the clipboard.
|
static String |
CLIPBOARD_PASTE_es_ES |
protected JComboBox |
conditions
The conditions for combo box.
|
protected JComponent |
dataField
Component for data insertions.
|
static String |
DEFAULT_BORDER
The reference for default border.
|
static int |
DEFAULT_BOTTOM_MARGIN
The default bottom margin.
|
static int |
DEFAULT_FIELD_LEFT_MARGIN
The default left margin for fields.
|
static int |
DEFAULT_FIELD_RIGHT_MARGIN
The default right margin for fields.
|
static int |
DEFAULT_LABEL_LEFT_MARGIN
The default label left margin.
|
static int |
DEFAULT_LABEL_RIGHT_MARGIN
The default label right margin.
|
static int |
DEFAULT_PARENT_MARGIN
The default parent margin.
|
static int |
DEFAULT_PARENT_MARGIN_FOR_SCROLL
The default parent margin for scrolling.
|
static int |
DEFAULT_TOP_MARGIN
The default top margin.
|
static Color |
defaultAsteriskColor |
static String |
DEFAULTBORDER
The key for default border.
|
static Color |
defaultDisableBackgroundColor
The default background color when field is disable.
|
static int |
defaultFieldButtonHigh |
static boolean |
defaultPreferenceTextNotRetrievedFromPreferences
Default value to retrieve or not the help text from preferences.
|
static String |
DEFINE_HELP_FIELD_PREFERENCE
The key to manage the definition of help preferences.
|
protected int |
dim
Variable to indicate the field resize.
|
static String |
DIM
The key for dimension component.
|
protected Color |
disabledbgcolor |
static String |
DISABLEDBGCOLOR
The key to manage the background color when field is disabled.
|
protected boolean |
empty
The condition to indicate when field is empty.
|
protected boolean |
enabled
The condition to indicate when field is active.
|
static String |
ENABLED
The key to manage the enabled condition.
|
static String |
EXPAND
The key for expand component.
|
static String |
FIELD_HELP_TIP
The key to manage the help tip for field.
|
protected DataField.FieldFocusListener |
fieldlistenerFocus
The reference for field focus listener.
|
protected int |
fieldSize
The size of field in number of characters.
|
protected boolean |
fireValueEvents
The condition to activate field events.
|
static Color |
FOCUS_BACKGROUNDCOLOR
The instance of focus background color RGB(255,255,230)
|
static String |
FONT |
protected Color |
fontColor
The default font color.
|
static String |
FONTCOLOR
The key to manage the font color.
|
protected int |
fontSize
The default font size.
|
static String |
FONTSIZE
The key to manage the font size.
|
protected int |
height |
static String |
HEIGHT |
protected boolean |
incrementalFont
The condition to active the incremental font.
|
protected boolean |
initPreferenceHelpText
The condition about the help text has been retrieved from preferences.
|
static String |
INSETS |
protected boolean |
isEnabled |
static String |
LABELALIGN
The key to manage the label alignment.
|
protected DataField.ELabel |
labelComponent
A instance of a label component.
|
static String |
LABELFONT |
static String |
LABELFONTCOLOR |
protected int |
labelPosition
The label position.
|
static String |
LABELPOSITION
The key to specify the label position.
|
static String |
LABELSIZE
The key to specify the label size.
|
protected String |
labelText
The label text reference.
|
static String |
LABELVISIBLE
The key to manage the label visibility.
|
static String |
LEFT
The key for left alignment.
|
protected Locale |
locale
The default locale application.
|
static String |
LOWERED
The key for lowered border.
|
protected JMenuItem |
menuCopy
A menu item reference for copy operation.
|
protected JMenuItem |
menuCut
A menu item reference for cut operation.
|
protected JMenuItem |
menuDefineHelpPreference
A menu item reference for defining help preferences.
|
protected JMenuItem |
menuHelpPreferences
A menu item reference for help preferences.
|
protected JMenuItem |
menuPaste
A menu item reference for paste operation.
|
protected boolean |
modifiable
The condition to indicate when field is editable.
|
static String |
NO_STR
The key for resizing.
|
static String |
NONE
The key for none border.
|
protected Border |
noRequiredBorder |
static String |
OPAQUE |
protected int |
originalSize
The reference for original size.
|
static String |
OUTBORDER
The key to manage the out border.
|
protected JPanel |
panel
An instance of an auxiliary panel.
|
protected Form |
parentForm
The reference to parent form.
|
protected FormPermission |
permissionActivate
The reference to activate permission.
|
protected FormPermission |
permissionVisible
The reference to visible permission in form.
|
protected ExtendedJPopupMenu |
popupMenu
The reference for a pop-up menu.
|
static String |
PREF_WIDTH
The key to specify a specific preferred width (5.2074EN).
|
protected int |
prefWidth
Allows to set a common preferred width to align fields in containers.
|
static String |
RAISED
The key for raised border.
|
protected int |
redimensionPanel
The resize panel value.
|
protected int |
redimensJTextField
The resize text field value.
|
protected boolean |
required
The condition to indicate when field is required.
|
static String |
REQUIRED
The key for required condition.
|
protected String |
requiredBorder
The name of the border to use in the required fields.
|
static String |
REQUIREDBORDER |
static Color |
requiredFieldBackgroundColor
The background color for a required field.
|
static Color |
requiredFieldForegroundColor |
protected ResourceBundle |
resources
The reference for resources file.
|
protected boolean |
restricted
The restricted condition.
|
static String |
RIGHT
The key for right alignment.
|
protected boolean |
show
The condition to indicate whether must be shown.
|
protected boolean |
showLabel
The condition to show the label field.
|
static String |
SIZE
The key for size specification.
|
static String |
TEXT_STR
The key for resizing.
|
static String |
TEXTALIGN
The key to manage the text alignment.
|
protected int |
textAlignment
The default text alignment.
|
protected String |
textHelpPreference
The text help preference.
|
static String |
TIP
The key to manage the tip.
|
protected String |
tipKey
The reference for tip.
|
static String |
TOP
The key for top alignment.
|
protected boolean |
validData
The condition to indicate when data are valid.
|
static String |
VALIGN
The key to manage the vertical alignment.
|
protected int |
Valignment
The vertical field alignment.
|
protected Vector |
valueListener
The vector instance for a value listener.
|
protected Object |
valueSave
The variable to store the field value when
setValue() is
called. |
static String |
VISIBLE
The key for visible condition.
|
static String |
VISUALIZE_HELP_FIELD_PREFERENCE
The key to manage the visualization of help preferences.
|
protected int |
weightDataFieldH
The horizontal weight of data field.
|
protected int |
weightPanelH
The horizontal weight of panel.
|
protected int |
width |
static String |
WIDTH |
protected int |
x |
static String |
X |
protected int |
y |
static String |
Y |
static String |
YES_STR
The key for resizing.
|
accessibleContext, 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 |
|---|
DataField()
Class constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFocusListener(FocusListener l) |
protected void |
addHelpMenuPopup(JPopupMenu m)
Adds the help menu pop-up.
|
void |
addValueChangeListener(ValueChangeListener l) |
protected void |
changeButton(AbstractButton button,
boolean borderbuttons,
boolean opaquebuttons,
MouseListener listenerHighlightButtons) |
static void |
changeOpacity(JComponent c,
boolean opaque) |
protected boolean |
checkDefineHelpPermission()
Checks the definition help permission.
|
protected boolean |
checkEnabledPermission()
Check enabled permission.
|
protected boolean |
checkVisiblePermission()
Return the visible permission condition.
|
protected void |
configurePopupMenuHelp()
Configures the pop-up menu help.
|
protected DataField.FieldFocusListener |
createFocusListener()
Creates a field focus listener.
|
protected void |
createInstanceConditionCombo()
Creates a conditional(<,>,=,>=...) combo
|
protected void |
createPopupMenu()
Creates a pop-up menu.
|
protected void |
defineHelpField()
Defines the help field.
|
protected void |
finalize() |
protected void |
fireValueChanged(Object newValue,
Object oldValue,
int type)
Detects fire value events.
|
Object |
getAttribute()
Gets the object attribute.
|
protected Border |
getBorder(String border)
Gets the border.
|
Object |
getConstraints(LayoutManager parentLayout)
Gets the constraints needed to adapt the field to the container from
init
|
JComponent |
getDataField()
Returns a reference for data field.
|
Color |
getDisabledbgcolor() |
Color |
getFontColor()
Gets the font color.
|
String |
getHelpIdString()
Gets the help identifier string.
|
protected String |
getHelpPreferenceKey()
Gets the help preference key.
|
JLabel |
getLabelComponent()
Gets the label component.
|
String |
getLabelComponentText()
Returns the label text.
|
Color |
getLabelFontColor() |
String |
getLabelText()
Gets the label text.
|
Form |
getParentForm()
Gets the parent form.
|
protected String |
getPreferenceHelpText() |
Dimension |
getPreferredSize() |
String |
getText()
Gets text.
|
Vector |
getTextsToTranslate()
Returns all the texts in the element suitable for being translated.
|
List |
getValueChangeListeners() |
protected boolean |
hasHelpInPreferences()
Checks whether help exists in preferences.
|
void |
init(Hashtable parameters)
Inits parameters.
|
void |
initPermissions() |
void |
initPreferences(ApplicationPreferences aPrefs,
String user) |
protected void |
installFocusListener()
Adds the focus listener to the data field.
|
void |
installHelpId() |
protected void |
installPopupMenuListener()
Installs a pop-up menu listener.
|
protected void |
installPreferenceHelpListener()
Installs the preferences for help listener.
|
boolean |
isAdvancedQueryMode()
Returns
true whether advanced query is enabled for
component. |
boolean |
isEnabled()
Returns true when field is enabled.
|
boolean |
isHidden()
Returns true when field is hidden.
|
boolean |
isLabelVisible()
Checks whether data field label is visible.
|
boolean |
isModifiable()
Returns true when field is modifiable for this form.
|
boolean |
isModified()
This method should be return
true when data have been
modified. |
boolean |
isRequired()
Returns true when field is required.
|
boolean |
isRestricted() |
static boolean |
parseBoolean(String s,
boolean defaultValue)
Parses strings to boolean conditions converting yes/no or true/false
strings to true/false boolean values.
|
void |
preferenceChanged(PreferenceEvent e)
Invoked when a preference change event occurs.
|
void |
removeFocusListener(FocusListener l) |
void |
removeValueChangeListener(ValueChangeListener l) |
void |
requestFocus() |
protected void |
seeHelpField()
Shows the help field dialog.
|
void |
setBold(boolean bold)
Sets bold writing.
|
void |
setComponentLocale(Locale l) |
void |
setDisabledbgcolor(Color disabledbgcolor) |
void |
setEnabled(boolean enabled)
Enables the field to insert data.
|
void |
setFont(Font font) |
void |
setFontColor(Color fontColor)
Sets the font color.
|
void |
setFontSize(int fontSize)
Sets font size to size parameter.
|
void |
setLabelFontColor(Color fontColor) |
void |
setModifiable(boolean modifiable)
Sets modifiable the field.
|
void |
setParentForm(Form f)
Method declaration to set the form that contains the component.
|
void |
setRequired(boolean required)
Sets required a component according to condition.
|
static void |
setRequiredFieldBackground(Color c)
Sets required the background color to field.
|
void |
setResourceBundle(ResourceBundle resource)
Sets the language resource bundle.
|
void |
setVisible(boolean visible)
Description method to set visible or not the component according the
boolean condition in parameter.
|
protected void |
showPopupMenu(Component source,
int x,
int y)
Shows the pop-up menu.
|
protected void |
updateBackgroundColor()
Updates the background color.
|
protected void |
updateBackgroundColor(boolean enabled)
Updates the background color according to the condition.
|
void |
updateFont()
Updates font size.
|
protected void |
updateTip()
Updates the tip for field.
|
void |
updateUI() |
protected void |
validateComponentPositions()
Validates the component positions.
|
getAccessibleContext, 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, transferFocusUpCycleclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitdeleteData, getSQLDataType, getValue, isEmpty, setValuepublic static int DEFAULT_TOP_MARGIN
public static int DEFAULT_BOTTOM_MARGIN
public static int DEFAULT_LABEL_LEFT_MARGIN
public static int DEFAULT_LABEL_RIGHT_MARGIN
public static int DEFAULT_FIELD_LEFT_MARGIN
public static int DEFAULT_FIELD_RIGHT_MARGIN
public static int DEFAULT_PARENT_MARGIN
public static int DEFAULT_PARENT_MARGIN_FOR_SCROLL
public static boolean ASTERISK_REQUIRED_STYLE
public static boolean BORDER_REQUIRED_STYLE
public static Color defaultAsteriskColor
public static int defaultFieldButtonHigh
public static String DEFAULT_BORDER
public static final String X
public static final String Y
public static final String WIDTH
public static final String HEIGHT
protected int x
protected int y
protected int width
protected int height
protected int prefWidth
public static final String DEFAULTBORDER
public static final String NONE
public static final String RAISED
public static final String LOWERED
public static final String DIM
public static final String EXPAND
public static final String YES_STR
public static final String TEXT_STR
public static final String NO_STR
public static final String ATTR
public static final String INSETS
public static final String ALIGN
public static final String LEFT
public static final String RIGHT
public static final String TOP
public static final String BOTTOM
public static final String CENTER
public static final String SIZE
public static final String VISIBLE
public static final String REQUIRED
public static final String FONTSIZE
public static final String BOLD
public static final String FONTCOLOR
public static final String LABELFONTCOLOR
public static final String FONT
public static final String OPAQUE
public static final String LABELFONT
public static final String LABELSIZE
public static final String LABELPOSITION
public static final String PREF_WIDTH
public static final String LABELVISIBLE
public static final String BORDER
public static final String REQUIREDBORDER
public static final String BGCOLOR
public static final String DISABLEDBGCOLOR
public static final String TIP
public static final String TEXTALIGN
public static final String VALIGN
public static final String OUTBORDER
public static final String ENABLED
public static final String LABELALIGN
public static final int ALIGN_LEFT
public static final int ALIGN_CENTER
public static final int ALIGN_RIGHT
public static final String CLIPBOARD_COPY
public static final String CLIPBOARD_COPY_es_ES
public static final String CLIPBOARD_CUT
public static final String CLIPBOARD_CUT_es_ES
public static final String CLIPBOARD_PASTE
public static final String CLIPBOARD_PASTE_es_ES
public static final String VISUALIZE_HELP_FIELD_PREFERENCE
public static final String DEFINE_HELP_FIELD_PREFERENCE
public static final String FIELD_HELP_TIP
public static boolean defaultPreferenceTextNotRetrievedFromPreferences
public static Color FOCUS_BACKGROUNDCOLOR
public static Color requiredFieldBackgroundColor
DataComponent#VERY_LIGHT_SKYBLUE.public static Color requiredFieldForegroundColor
protected ExtendedJPopupMenu popupMenu
protected JMenuItem menuCopy
protected JMenuItem menuPaste
protected JMenuItem menuCut
protected JMenuItem menuHelpPreferences
protected JMenuItem menuDefineHelpPreference
protected String textHelpPreference
protected boolean initPreferenceHelpText
protected boolean advancedQueryMode
protected Vector valueListener
protected boolean enabled
protected boolean isEnabled
protected boolean required
protected boolean empty
protected boolean modifiable
protected boolean validData
protected boolean show
protected boolean showLabel
protected Form parentForm
protected int textAlignment
protected String borderText
protected int labelPosition
protected boolean fireValueEvents
protected String labelText
protected String requiredBorder
protected Border noRequiredBorder
protected DataField.ELabel labelComponent
protected JPanel panel
protected JComboBox conditions
protected JComponent dataField
protected int fieldSize
protected Object attribute
protected Object valueSave
setValue() is
called.protected int dim
protected int alignment
protected int Valignment
protected int redimensionPanel
protected int redimensJTextField
protected int weightPanelH
protected int weightDataFieldH
protected ResourceBundle resources
protected String tipKey
protected int fontSize
protected int originalSize
protected boolean incrementalFont
protected Color fontColor
public static Color defaultDisableBackgroundColor
protected Color disabledbgcolor
protected boolean bold
protected Color backgroundColor
protected Locale locale
Locale.getDefault()protected FormPermission permissionVisible
protected FormPermission permissionActivate
protected DataField.FieldFocusListener fieldlistenerFocus
protected boolean restricted
public DataField()
JComponent.setOpaque(boolean)public void init(Hashtable parameters)
init in interface FormComponentparameters - the Hashtable with parameters
| attribute | values | default | required | meaning |
| attr | yes | The attribute to manage the field. | ||
| dim | no/text/yes | no | no | The resize possibilities (no resize, resize the insertion space, resize the space between label and text ). |
| prefwidth | -1 | no | Allows to fix a preferred width for fields in order to
make easier alignment. |
|
| size | 10 | no | The size of text in number of characters. | |
| align | center/left/right | center | no | The alignment for field. |
| visible | yes/no | yes | no | The visibility condition. |
| required | yes/no | no | no | The required condition. |
| fontsize | no | The font size. | ||
| fontcolor | no | The font color. | ||
| bgcolor | no | The background color. | ||
| labelsize | no | The label size in number of characters. | ||
| labelvisible | yes/no | yes | The label visibility. | |
| border | default/none/raised/lowered or a color
defined in ColorConstants. Moreover, it is also allowed a
border defined in #BorderManager | no | The border for datafield | |
| tip | no | The tip for data field. | ||
| textalign | center/right/left | no | The text alignment. | |
| labelposition | top/bottom/right/left | no | The label position. | |
| outborder | default/none/raised/lowered or a color
defined in ColorConstants | no | The out border. | |
| enabled | yes/no | yes | no | The field activation. |
| text | attr | no | Alternative for attr text. | |
| labelalign | left/right/center | left | no | The label alignment. |
| labelfontcolor | black | no | The font color for label in field | |
| font | A string like : 'Arial-BOLD-18' (See #Font.decode()) | The default font for system | no | Font for data field. |
| opaque | yes/no | no | no | Data field opacity condition |
| labelfont | no | The type of font for label of data field | ||
| requiredborder | yes/no | no | no | The border requirement condition. If it is specified to 'yes', it will be fixed to #BorderManager.DEFAULT_DATA_FIELD_REQUIRED_BORDE |
| disabledbgcolor | no | The background color when data field is disabled. |
protected void installPreferenceHelpListener()
protected void validateComponentPositions()
public Object getConstraints(LayoutManager parentLayout)
init
getConstraints in interface FormComponentparentLayout - the parent layoutpublic String getText()
public String getLabelText()
public void setComponentLocale(Locale l)
setComponentLocale in interface Internationalizationpublic boolean isEnabled()
isEnabled in interface FormComponentisEnabled in class Componentpublic boolean isHidden()
isHidden in interface DataComponentpublic boolean isRequired()
isRequired in interface DataComponentpublic boolean isModifiable()
isModifiable in interface DataComponenttrue when component is modifiablepublic void setModifiable(boolean modifiable)
setModifiable in interface DataComponentmodifiable - modif the modifiable conditionpublic void setEnabled(boolean enabled)
setEnabled in interface FormComponentsetEnabled in class JComponentenabled - the condition to set enablepublic JComponent getDataField()
public String getLabelComponentText()
getLabelComponentText in interface DataComponentpublic JLabel getLabelComponent()
public Object getAttribute()
IdentifiedElementgetAttribute in interface IdentifiedElementpublic void requestFocus()
requestFocus in class JComponentprotected void finalize()
throws Throwable
public Dimension getPreferredSize()
getPreferredSize in class JComponentpublic boolean isModified()
DataComponenttrue when data have been
modified. The method setValue() should be change this
condition.
isModified in interface DataComponentpublic void updateFont()
public void setFontSize(int fontSize)
fontSize - the font size parameterpublic void setFontColor(Color fontColor)
fontColor - the color parameterpublic void setLabelFontColor(Color fontColor)
public Color getFontColor()
public Color getLabelFontColor()
public void setBold(boolean bold)
bold - the condition to set bold writingpublic void setResourceBundle(ResourceBundle resource)
InternationalizationsetResourceBundle in interface Internationalizationresource - the new language bundle.public void addValueChangeListener(ValueChangeListener l)
addValueChangeListener in interface ValueChangeDataComponentpublic void addFocusListener(FocusListener l)
addFocusListener in class Componentpublic void removeFocusListener(FocusListener l)
removeFocusListener in class Componentpublic void removeValueChangeListener(ValueChangeListener l)
removeValueChangeListener in interface ValueChangeDataComponentpublic List getValueChangeListeners()
protected void fireValueChanged(Object newValue, Object oldValue, int type)
newValue - the new valueoldValue - the previous valuetype - the type of value eventpublic void setFont(Font font)
setFont in class JComponentpublic Vector getTextsToTranslate()
InternationalizationgetTextsToTranslate in interface Internationalizationpublic void setVisible(boolean visible)
FormComponentsetVisible in interface FormComponentsetVisible in class JComponentvisible - the visibility conditionpublic void setRequired(boolean required)
DataComponentsetRequired in interface DataComponentrequired - the required conditionprotected void updateBackgroundColor()
protected void updateBackgroundColor(boolean enabled)
enabled - the condition to update the background colorprotected void createInstanceConditionCombo()
protected void updateTip()
public void setParentForm(Form f)
AccessFormsetParentForm in interface AccessFormf - the form referencepublic Form getParentForm()
protected boolean checkVisiblePermission()
protected boolean checkEnabledPermission()
protected boolean checkDefineHelpPermission()
public void initPermissions()
initPermissions in interface SecureElementprotected void createPopupMenu()
protected void seeHelpField()
protected void defineHelpField()
protected String getPreferenceHelpText()
protected boolean hasHelpInPreferences()
protected String getHelpPreferenceKey()
protected void addHelpMenuPopup(JPopupMenu m)
m - the pop-up menuprotected void configurePopupMenuHelp()
protected void showPopupMenu(Component source, int x, int y)
source - the componentx - the x coordinatey - the y coordinateprotected void installPopupMenuListener()
protected DataField.FieldFocusListener createFocusListener()
protected void installFocusListener()
public String getHelpIdString()
getHelpIdString in interface HasHelpIdComponentpublic void installHelpId()
installHelpId in interface HasHelpIdComponentpublic boolean isLabelVisible()
public boolean isRestricted()
isRestricted in interface SecureElementpublic boolean isAdvancedQueryMode()
true whether advanced query is enabled for
component.public static boolean parseBoolean(String s, boolean defaultValue)
s - the string to parsedefaultValue - the default value to return no successfullypublic static void setRequiredFieldBackground(Color c)
c - the color to setpublic Color getDisabledbgcolor()
public void setDisabledbgcolor(Color disabledbgcolor)
public void preferenceChanged(PreferenceEvent e)
ApplicationPreferencesListenerpreferenceChanged in interface ApplicationPreferencesListenerpublic void initPreferences(ApplicationPreferences aPrefs, String user)
initPreferences in interface HasPreferenceComponentprotected Border getBorder(String border)
border - the string with border keys (NONE, RAISED, ...)public static void changeOpacity(JComponent c, boolean opaque)
protected void changeButton(AbstractButton button, boolean borderbuttons, boolean opaquebuttons, MouseListener listenerHighlightButtons)
Copyright © 2016 Imatia Innovation S.L.. All rights reserved.