public class ReferenceComboDataField extends ComboDataField implements AdvancedDataComponent, ReferenceComponent, CachedComponent, IFilterElement, ReferenceDataComponent, ITemplateField
| Modifier and Type | Class and Description |
|---|---|
protected class |
ReferenceComboDataField.CodeFieldListener
The code field listener to manage the codeChange value in function of
events.
|
protected class |
ReferenceComboDataField.DeployedList |
protected static class |
ReferenceComboDataField.ExtCustomComboBox |
class |
ReferenceComboDataField.MultiColumnComboRenderer
Class for a multicolumn combo renderer.
|
ComboDataField.CustomComboBox, ComboDataField.CustomComboBoxEditor, ComboDataField.DefaultCustomComboBoxRenderer, ComboDataField.ExtKeySelectionManager, ComboDataField.InnerListenerDataField.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 |
|---|---|
protected JMenuItem |
advancedQuery
A menu for an advanced query text.
|
protected String |
applyMask
The mask to apply, by default, null.
|
protected String |
attrAux
A reference for a possible auxiliary attribute.
|
protected CacheManager |
cacheManager
The reference to cache manager.
|
protected int |
cacheTime
The cache time.
|
protected String |
code
The string code.
|
protected JTextField |
codeField
A reference to code field.
|
protected ReferenceComboDataField.CodeFieldListener |
codeFieldListener
A reference to code field listener.
|
protected boolean |
codeNumber
The condition about existence of code number.
|
protected int |
codeNumberClass
The code number class.
|
protected String |
codeQueryField
The code query field key.
|
protected boolean |
codVisible
The condition about visible cod.
|
protected Vector |
cols
The columns vector.
|
protected Hashtable |
dataCache
The dataCache implementation.
|
protected boolean |
dataCacheInitialized
The condition about data cache initialization.
|
protected boolean |
dataRecordListenerReady
True when DataRecordListener is registered in the detail form
|
static boolean |
defaultDeleteButton |
static boolean |
defaultDisableOnParentkeyNull |
static boolean |
defaultIgnoreNullOnSetValueSet |
static boolean |
defaultParentkeyListener |
static String |
defaultParentkeyListenerEvent |
protected static String |
DELETE_BUTTON_ATTR |
protected JButton |
deleteButton
The Field button for delete.
|
protected ReferenceComboDataField.DeployedList |
deployedList
A reference to deployed list.
|
protected JButton |
detailButton
A reference to detail button.
|
protected CreateFormInDialog |
detailButtonListener
A reference for detail button listener.
|
static String |
DISABLE_ON_PARENTKEY_NULL |
protected boolean |
disableonparentkeynull
Indicates whether this field has disabled when parentkey field is null.
|
protected String |
entityName
The entity name.
|
protected String |
formName
The form name.
|
protected Hashtable |
hOnSetValueSetEquivalences
This object is used to store onsetvalueset attributes and equivalences
(for these fields in entity) when structure of parameter
onsetvalueset is:
"fieldonset1:fieldentitypk1;fieldonset2:fieldentitypk2;...fieldonsetn:fieldentitypkn" |
protected Hashtable |
hParentkeyEquivalences
This object is used to store parentkeys and equivalences (for these
fields in entity) when structure of parameter
parentkeys is:
"fieldpk1:fieldentitypk1;fieldpk2:fieldentitypk2;...fieldpkn:fieldentitypkn" |
static String |
IGNORE_NULL_ONSETVALUESET
Key used for xml parameter 'ignorenullonsetvalueset'
|
protected boolean |
ignorenullonsetvalueset
Indicates if fields contained into 'onsetvalueset' have to be deleted on
null value of the field.
|
protected boolean |
initCacheOnSetValue
The condition about initialize cache on set value.
|
protected boolean |
integerValue
The condition of integer value.
|
protected long |
lastCacheTime
The last cache time variable.
|
protected EntityReferenceLocator |
locator
The locator reference.
|
protected boolean |
multilanguage
The condition to disable cache
|
static String |
MULTILANGUAGE |
protected ReferenceExtDataField.MultipleResultWindow |
multipleResultWindow
The reference to multiple result window.
|
protected Vector |
onsetvaluesetAttributes
The vector with attributes to update when data field value changed.
|
protected Frame |
parentFrame
The parent Frame.
|
static String |
PARENTKEY_LISTENER |
static String |
PARENTKEY_LISTENER_EVENT
Key used for xml parameter 'parentkeylistenerevent'
|
static String |
PARENTKEY_LISTENER_EVENT_ALL |
static String |
PARENTKEY_LISTENER_EVENT_PROGRAMMATIC |
static String |
PARENTKEY_LISTENER_EVENT_USER |
protected boolean |
parentkeyCache |
protected boolean |
parentkeyListener
Indicates whether this field has registered a listener for each parentkey
fields to reset it when one of the values of these parentkeys change
(when parentkey field that changes is null it is not reset).
|
protected String |
parentkeyListenerEvent
Indicates the type of event that is taken into consideration on parentkey
listener changes.
|
protected Vector |
parentKeys
The parent Keys vector.
|
protected Vector |
queryValues
A vector for query values.
|
protected ReferenceComboDataField.MultiColumnComboRenderer |
renderer
A multiple column combo renderer reference.
|
protected String |
separator
The separator.
|
protected boolean |
showErrorMessages
The condition to show error messages.
|
static String |
UPDATE_DATA
The key to update data.
|
protected JMenuItem |
updateData
A menu with update data text.
|
protected boolean |
useCacheManager
The condition about cache manager use.
|
protected boolean |
visibleArrowButton
The condition about visible arrow button.
|
protected boolean |
visibleCodeSearch
The condition of code visibility of the code in the detail window.
|
protected Vector |
visibleColumns
The visible columns vector.
|
DATEFORMAT, FORMAT, formatPattern, innerListener, localeComponente, NULL_SELECTION, nullSelection, valuesadvancedQueryMode, 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_ALIGNMENTADVANCED_QUERYCOMP_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_2DESACTIVATE_COMPONENT_BY_PERMISSION_TIPDEBUG_LANGUAGEDATA_TYPE_FIELD, DATA_TYPE_FIELD_ATTR, DATA_TYPE_IMAGE, DATA_TYPE_IMAGE_ATTR, DATA_TYPE_TABLE, DATA_TYPE_TABLE_ATTR, TEMPLATE_DATA_TYPEABORT, ALLBITS, ERROR, FRAMEBITS, PROPERTIES, SOMEBITS| Constructor and Description |
|---|
ReferenceComboDataField(Hashtable parameters)
The constructor for component.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
advancedQuery()
Performs an advanced query.
|
protected void |
createDataRecordListener(Form form)
Adds a
DataRecordListener listener to the detail form. |
protected void |
createDeleteButton() |
protected void |
createMultipleResultsWindow(Table t)
Creates the multiple result window.
|
protected void |
createPopupMenu()
Creates a pop-up menu.
|
void |
deleteData()
The method to delete data for component.
|
void |
deleteUserData() |
protected boolean |
existFieldsToUpdate(Hashtable changes,
Hashtable keys)
Checks the keys and the record values in a register to establish if
fields in
onsetvaluesetAttributes must be updated |
Vector |
getAttributes() |
String |
getCodeDescription(Object c)
Gets tje code description.
|
JTextField |
getCodeField()
Gets the code field.
|
String |
getCodeFieldName()
The name of the code.
|
protected Object |
getCodeFieldValue()
Gets the code field value.
|
String |
getCodeSearchField() |
String |
getCodeSearchFieldName()
Gets the code search field name.
|
Hashtable |
getDataCache()
Gets the data cache.
|
String |
getDebugInfo() |
ActionListener |
getDetailButtonListener()
Gets the detail button listener.
|
String |
getEntity() |
protected long |
getLastCacheTime()
Gets the last cache time.
|
Table |
getMultipleResultTable()
Gets the reference to table with multiple results.
|
List |
getOnSetValueSetAttributes() |
Hashtable |
getOnSetValueSetEquivalences() |
Hashtable |
getParentkeyEquivalences()
Returns a Hashtable with key-value corresponding with result to apply two
'tokenizer' actions over parentkeys parameter.
|
Vector |
getParentKeyList() |
protected Object |
getParentKeyValue(String parentkey)
Gets the parent key value.
|
Hashtable |
getParentKeyValues() |
ReferenceComboDataField.MultiColumnComboRenderer |
getRenderer()
Gets the renderer.
|
int |
getSQLDataType()
Returns the
sql data type according to
java.sql.Types
|
int |
getTemplateDataType()
Returns the data type.
|
Object |
getTemplateDataValue()
Gets the value to show in the template
|
String |
getText()
Gets text.
|
Vector |
getTextsToTranslate()
Returns all the texts in the element suitable for being translated.
|
String |
getToolTipText(MouseEvent e) |
protected Object |
getTypedInnerValue(Object s)
Obtains the typed value from parameter.
|
Object |
getValue()
Gets the value for combo.
|
Hashtable |
getValuesToCode(Object code)
Returns the associated combo values for a code.
|
boolean |
hasParentKeys() |
void |
init(Hashtable parameters)
Initializes parameters.
|
void |
initCache()
Inits cache.
|
protected void |
initDeployedList() |
protected void |
installInnerListener()
Installs the inner listener.
|
protected void |
installPopupMenuListener()
Installs a pop-up menu listener.
|
void |
invalidateCache()
Invalidates the data cache.
|
boolean |
isCacheManagerUsed()
Returns whether cache manager is used.
|
boolean |
isCodeFieldVisible()
Checks whether the codefield is visible.
|
boolean |
isCodeSearchVisible()
Checks whether the code search is visible.
|
boolean |
isEmpty()
Checks the data existence in component.
|
boolean |
isParentkeyListener() |
protected void |
listWillShow()
Shows the pop-up combo.
|
protected void |
popupWillHide()
Hides the pop-up combo.
|
protected void |
popupWillShow()
Pops up the combo when pop-up button is pressed.
|
EntityResult |
queryBy(String column,
Object value)
Establishes the query
|
protected EntityResult |
queryByCod(Object code)
Performs a query by cod.
|
void |
registerParentkeyValueChangeListeners() |
Hashtable |
replaceParentkeyByEquivalence(Hashtable hParentkeyEquivalences) |
void |
setAdvancedQueryMode(boolean enabled)
This method must establish the advanced query state, to support advanced
query conditions.
|
void |
setCacheManager(CacheManager cm) |
protected void |
setCode(Object codeValue,
int valueEventType)
Sets the code in function of event value.
|
void |
setEnabled(boolean en)
Enables the field to insert data.
|
void |
setFormBuilder(FormBuilder builder) |
protected void |
setInnerListenerEnabled(boolean enabled)
This method allows to enable/disable the ValueEvent events notifier.
|
void |
setParentForm(Form f)
Method declaration to set the form that contains the component.
|
void |
setParentFrame(Frame parentFrame)
This method is called from Form for each component that implements this
interface.
|
void |
setParentkeyListener(boolean parentkeyListener) |
void |
setQueryValues(Vector v) |
void |
setReferenceLocator(EntityReferenceLocator busc)
Establishes the reference locator that will be used by component.
|
void |
setResourceBundle(ResourceBundle resources)
Sets the language resource bundle.
|
void |
setUseCacheManager(boolean cacheManager)
Sets the cache manager.
|
void |
setValue(Object value)
Establishes the combo values.
|
void |
setValue(Object value,
boolean inner)
Establishes the field value.
|
protected void |
showPopupMenu(Component c,
int x,
int y)
Shows the pop-up menu.
|
protected void |
updateBackgroundColor()
Updates the background color.
|
protected void |
updateDataCache(Hashtable updateAttributes,
Hashtable updateKeys)
Updates the data cache with specified values
|
protected void |
updateOnSetValueSetAttributes(Hashtable data)
Parameters on this method are used to update the fields whose attributes
are contained in
onsetvaluesetAttributes |
free, getInnerValue, getValues, isInnerValueEqual, isModified, setComponentLocale, setInnerValue, setSelected, setValues, updateUIaddFocusListener, addHelpMenuPopup, addValueChangeListener, changeButton, changeOpacity, checkDefineHelpPermission, checkEnabledPermission, checkVisiblePermission, configurePopupMenuHelp, createFocusListener, createInstanceConditionCombo, defineHelpField, finalize, fireValueChanged, getAttribute, getBorder, getConstraints, getDataField, getDisabledbgcolor, getFontColor, getHelpIdString, getHelpPreferenceKey, getLabelComponent, getLabelComponentText, getLabelFontColor, getLabelText, getParentForm, getPreferenceHelpText, getPreferredSize, getValueChangeListeners, hasHelpInPreferences, initPermissions, initPreferences, installFocusListener, installHelpId, installPreferenceHelpListener, isAdvancedQueryMode, isEnabled, isHidden, isLabelVisible, isModifiable, isRequired, isRestricted, parseBoolean, preferenceChanged, removeFocusListener, removeValueChangeListener, requestFocus, seeHelpField, setBold, setDisabledbgcolor, setFont, setFontColor, setFontSize, setLabelFontColor, setModifiable, setRequired, setRequiredFieldBackground, setVisible, updateBackgroundColor, updateFont, updateTip, 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, 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, waitgetParentFormgetLabelComponentText, isHidden, isModifiable, isModified, isRequired, setModifiable, setRequiredgetAttributeinitPermissions, isRestrictedgetConstraints, isEnabled, setVisiblesetComponentLocalepublic static final String PARENTKEY_LISTENER
public static final String DISABLE_ON_PARENTKEY_NULL
public static final String PARENTKEY_LISTENER_EVENT
public static final String PARENTKEY_LISTENER_EVENT_ALL
public static final String PARENTKEY_LISTENER_EVENT_USER
public static final String PARENTKEY_LISTENER_EVENT_PROGRAMMATIC
public static String defaultParentkeyListenerEvent
public static boolean defaultParentkeyListener
public static boolean defaultDisableOnParentkeyNull
public static final String IGNORE_NULL_ONSETVALUESET
public static boolean defaultIgnoreNullOnSetValueSet
protected Frame parentFrame
protected ReferenceExtDataField.MultipleResultWindow multipleResultWindow
protected boolean visibleCodeSearch
protected Hashtable hOnSetValueSetEquivalences
onsetvalueset is:
"fieldonset1:fieldentitypk1;fieldonset2:fieldentitypk2;...fieldonsetn:fieldentitypkn"public static String UPDATE_DATA
protected String codeQueryField
protected ReferenceComboDataField.DeployedList deployedList
protected Vector queryValues
protected Hashtable hParentkeyEquivalences
parentkeys is:
"fieldpk1:fieldentitypk1;fieldpk2:fieldentitypk2;...fieldpkn:fieldentitypkn"protected boolean showErrorMessages
protected JButton detailButton
protected JButton deleteButton
protected static final String DELETE_BUTTON_ATTR
public static boolean defaultDeleteButton
protected String formName
protected boolean dataRecordListenerReady
protected Vector onsetvaluesetAttributes
protected boolean ignorenullonsetvalueset
protected boolean parentkeyListener
protected String parentkeyListenerEvent
protected boolean disableonparentkeynull
protected ReferenceComboDataField.CodeFieldListener codeFieldListener
protected ReferenceComboDataField.MultiColumnComboRenderer renderer
protected boolean integerValue
protected boolean codeNumber
protected int codeNumberClass
protected String code
protected EntityReferenceLocator locator
protected JTextField codeField
protected Vector parentKeys
protected String entityName
protected String attrAux
protected Vector cols
protected Vector visibleColumns
protected boolean codVisible
protected String applyMask
protected int cacheTime
protected boolean parentkeyCache
protected long lastCacheTime
protected Hashtable dataCache
protected String separator
protected JMenuItem updateData
protected JMenuItem advancedQuery
protected boolean visibleArrowButton
protected CacheManager cacheManager
protected boolean useCacheManager
protected boolean initCacheOnSetValue
protected boolean dataCacheInitialized
public static final String MULTILANGUAGE
protected boolean multilanguage
protected CreateFormInDialog detailButtonListener
public ReferenceComboDataField(Hashtable parameters)
init(Hashtable).
parameters - the hashtable with parameterspublic String getDebugInfo()
public String getToolTipText(MouseEvent e)
getToolTipText in class JComponentprotected void updateOnSetValueSetAttributes(Hashtable data)
onsetvaluesetAttributesdata - Values to updatepublic List getOnSetValueSetAttributes()
public Hashtable getOnSetValueSetEquivalences()
protected void createDataRecordListener(Form form)
DataRecordListener listener to the detail form. This
one checks when event is an update event and it is necessary to refresh
the data cache and fields contained in onsetvaluesetAttributesform - Form where event is firedprotected boolean existFieldsToUpdate(Hashtable changes, Hashtable keys)
onsetvaluesetAttributes must be updatedchanges - Changes to updatekeys - Keys for record to updateprotected void updateDataCache(Hashtable updateAttributes, Hashtable updateKeys)
updateAttributes - Update valuesupdateKeys - Keys for records to updatepublic void init(Hashtable parameters)
| attribute | values | default | required | meaning |
| attr | cod | no | The field attribute. | |
| entity | yes | Associated entity. | ||
| dateformat | A Java date pattern | no | Java Date pattern to use in format parameter. |
|
| format | message;column_1;...;column_N | no | The field shows the translation with the given message and columns.
Example: -User has a reference combo field that queries an entity with three fields ID;INITIALDATE;ENDDATE. ID is the code of field. -User wants to format description of this field to show: Period starts: INITIALDATE and ends: ENDDATE -He only needs to store in bundle a key, e.g., refComboKey= Period starts: {0} and ends: {1} -He must specify in parameter format="refComboKey;INITIALDATE;ENDDATE" |
|
| cod | yes | The entity column name that matches with the attr. | ||
| csize | no | The number of characters for code field. | ||
| parentkeys | fieldpk1:fieldentitypk1;fieldpk2:fieldentitypk2;...fieldpkn :fieldentitypkn (since version 5.2057EN-1.4) | yes | The field that is parentkey and correspondent associated field in entity. It is accepted to indicate only the fieldpki when it is equal to fieldentitypki, e.g. : fieldpk1;fieldpk2:fieldentitypk2 ;...fieldpkn:fieldentitypkn | |
| cols | cols1;cols2;...;colsn | yes | Columns associated to the code. It forms the description field. | |
| cachetime | 10 minutes | no | The time data remains in cache. | |
| codnumber | yes/no | no | no | Allows to specify that code column is numerical but not an integer value. |
| codnumberclass | BigDecimal/Integer/Long... | Integer | no | Only used when codnumber="yes". String value associated defining code number class (All values are mapped in ParseUtils class: ParseUtils.INTEGER/ParseUtils.BIG_INTEGER/...) |
| deletebutton | true/false | false | no | A button to delete field |
| separator | " " | no | The separator character for columns. | |
| usecachemanager | yes/no | yes | no | With "no" parameter, field will have its own cache. |
| visiblecols | vcols1,vcols2,...,vcolsn | The visible cols from cols. With empty parameter all columns are visible. | ||
| form | no | The form that is opened in detail. On init, update mode will be its state. | ||
| parentkeylistener | yes/no | no | no | Register a listener for each parentkey field to delete data of this
field when one of the parentkey values changes (when new value of the
parentkey field is null, field value is not reset, excepts if
'disableonparentkeynull' is true). If you use this parameter then you
need to use the setvalueorder for the Form @see
Form.init(Hashtable) |
| disableonparentkeynull | yes/no | no | no | Disable field when parentkey is null. |
| onsetvalueset | fieldonset1:fieldentitypk1;fieldonset2:fieldentitypk2;...fieldonsetn :fieldentitypkn (since version 5.2057EN-1.4) | no | Field attributes whose value will be set when data on field change. | |
| codsearch | no | It specifies the field name for searching when user introduces a search value. | ||
| parentkeylistenerevent | user/programmatic | both | no | The type of event that is taken into consideration on parentkey listener changes. E.g. if 'user' value is set, just the events generated by user changes are taken into consideration. |
| ignorenullonsetvalueset | yes/no | no | no | It specifies whether the fields included into 'onsetvalueset' are deleted when null value is set in this field. If value is true the fields contained into 'onsetvalueset' are not deleted on null value. |
| multilanguage | yes/no | no | no | If yes, invalidate the cache data. |
init in interface FormComponentinit in class ComboDataFieldparameters - the hashtable with parameters
| attribute | values | default | required | meaning |
| dateformat | A Java date pattern | no | Java Date pattern to use in format parameter.
|
|
| format | message;column_1;...;column_N | no | The field shows the translation with the given message and columns. | |
| nullselection | yes | no | Since 5.2057EN-0.3. By default, combo contains an empty value in first position of deployed list. With this parameter is possible to delete this value and show only field values. |
protected long getLastCacheTime()
protected void createDeleteButton()
public void setValue(Object value)
ComboDataFieldsetValue in interface DataComponentsetValue in class ComboDataFieldvalue - the object to set the value.public void setValue(Object value, boolean inner)
protected void setCode(Object codeValue, int valueEventType)
codeValue - the value to setvalueEventType - the type of eventsetValue(Object, boolean)public Object getValue()
ComboDataFieldgetValue in interface DataComponentgetValue in class ComboDataFieldJComboBox.getSelectedItem()protected void popupWillShow()
throws Exception
Exception - when a Exception occursprotected void listWillShow()
throws Exception
popupWillShow()
Exception - when Exception occurspublic void initCache()
public EntityResult queryBy(String column, Object value)
queryBy in interface ReferenceDataComponentcolumn - the col namevalue - the value to add to keyvalues hashtable, with the form
(col,value)protected EntityResult queryByCod(Object code)
code - the code to queryprotected void popupWillHide()
public void setReferenceLocator(EntityReferenceLocator busc)
ReferenceComponentsetReferenceLocator in interface ReferenceComponentbusc - a reference locator to set in componentpublic int getSQLDataType()
DataComponentsql data type according to
java.sql.Types
getSQLDataType in interface DataComponentInteger typepublic void setEnabled(boolean en)
DataFieldsetEnabled in interface FormComponentsetEnabled in class DataFielden - the condition to set enablepublic void setResourceBundle(ResourceBundle resources)
InternationalizationsetResourceBundle in interface InternationalizationsetResourceBundle in class ComboDataFieldresources - the new language bundle.public void invalidateCache()
protected void initDeployedList()
protected void advancedQuery()
throws Exception
Exception - when Exception occursprotected void createPopupMenu()
DataFieldcreatePopupMenu in class DataFieldprotected void installPopupMenuListener()
DataFieldinstallPopupMenuListener in class DataFieldprotected void showPopupMenu(Component c, int x, int y)
DataFieldshowPopupMenu in class DataFieldc - the componentx - the x coordinatey - the y coordinatepublic Hashtable getValuesToCode(Object code)
code - the object where code are specifiedpublic boolean isCacheManagerUsed()
public void setUseCacheManager(boolean cacheManager)
cacheManager - the cache manager conditionpublic Vector getTextsToTranslate()
InternationalizationgetTextsToTranslate in interface InternationalizationgetTextsToTranslate in class DataFieldpublic boolean isEmpty()
DataComponentisEmpty in interface DataComponentisEmpty in class ComboDataFieldtrue when component is emptypublic void deleteData()
DataComponentdeleteData in interface DataComponentdeleteData in class ComboDataFieldpublic void deleteUserData()
public void setAdvancedQueryMode(boolean enabled)
AdvancedDataComponentsetAdvancedQueryMode in interface AdvancedDataComponentenabled - the condition to enable this statepublic String getEntity()
getEntity in interface CachedComponentpublic Vector getAttributes()
getAttributes in interface CachedComponentpublic void setCacheManager(CacheManager cm)
setCacheManager in interface CachedComponentpublic void setQueryValues(Vector v)
public String getCodeDescription(Object c)
c - the object to get the descriptionpublic ActionListener getDetailButtonListener()
protected Object getParentKeyValue(String parentkey)
parentkey - the parent key namepublic ReferenceComboDataField.MultiColumnComboRenderer getRenderer()
public Hashtable getDataCache()
public boolean hasParentKeys()
hasParentKeys in interface IFilterElementpublic Hashtable getParentKeyValues()
getParentKeyValues in interface IFilterElementpublic Vector getParentKeyList()
getParentKeyList in interface IFilterElementpublic Hashtable getParentkeyEquivalences()
string="formfieldpk1:equivalententityfieldpk1;formfieldpk2:equivalententityfieldpk2;...;formfieldpkn:equivalententityfieldpkn"
Hashtable: parentkeys - the string with valuesHashtable with key-valuepublic Hashtable replaceParentkeyByEquivalence(Hashtable hParentkeyEquivalences)
protected void updateBackgroundColor()
DataFieldupdateBackgroundColor in class DataFieldprotected Object getCodeFieldValue()
protected Object getTypedInnerValue(Object s)
s - the object to obtain the typepublic JTextField getCodeField()
ReferenceDataComponentgetCodeField in interface ReferenceDataComponentJTextField with the code field.public String getCodeSearchField()
public boolean isCodeFieldVisible()
ReferenceDataComponentisCodeFieldVisible in interface ReferenceDataComponentpublic boolean isCodeSearchVisible()
ReferenceDataComponentisCodeSearchVisible in interface ReferenceDataComponentpublic String getCodeFieldName()
ReferenceDataComponentgetCodeFieldName in interface ReferenceDataComponentString with the code name.public String getCodeSearchFieldName()
ReferenceDataComponentgetCodeSearchFieldName in interface ReferenceDataComponentString with the search field name.protected void createMultipleResultsWindow(Table t)
t - the tablepublic Table getMultipleResultTable()
public void setFormBuilder(FormBuilder builder)
setFormBuilder in interface CreateFormspublic void setParentForm(Form f)
AccessFormsetParentForm in interface AccessFormsetParentForm in class DataFieldf - the form referencepublic void registerParentkeyValueChangeListeners()
public boolean isParentkeyListener()
public void setParentkeyListener(boolean parentkeyListener)
public void setParentFrame(Frame parentFrame)
OpenDialogsetParentFrame in interface OpenDialogparentFrame - the frameprotected void setInnerListenerEnabled(boolean enabled)
ComboDataFieldsetInnerListenerEnabled in class ComboDataFieldenabled - the condition to enable/disable the inner listener.protected void installInnerListener()
ComboDataFieldinstallInnerListener in class ComboDataFieldpublic int getTemplateDataType()
ITemplateFieldITemplateField.DATA_TYPE_FIELD ITemplateField.DATA_TYPE_IMAGE
ITemplateField.DATA_TYPE_TABLEgetTemplateDataType in interface ITemplateFieldint with the data type.public Object getTemplateDataValue()
ITemplateFieldgetTemplateDataValue in interface ITemplateFieldCopyright © 2016 Imatia Innovation S.L.. All rights reserved.