|
Ontimize 5.2072EN | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.ontimize.gui.field.DataField
com.ontimize.gui.field.ComboDataField
com.ontimize.gui.field.ReferenceComboDataField
The main class to create a classic Reference Data Field except that the data deployment is implemented in the combo. This component also implements a data cache.
| Nested Class Summary | |
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. |
| Nested classes inherited from class com.ontimize.gui.field.ComboDataField |
ComboDataField.CustomComboBox, ComboDataField.CustomComboBoxEditor, ComboDataField.DefaultCustomComboBoxRenderer, ComboDataField.ExtKeySelectionManager, ComboDataField.InnerListener |
| Nested classes inherited from class com.ontimize.gui.field.DataField |
DataField.AuxPanel, DataField.CopyActionListener, DataField.ELabel, DataField.FieldButton, DataField.FieldFocusListener, DataField.InfoMouseListener, DataField.ToggleButton |
| Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
protected javax.swing.JMenuItem |
advancedQuery
A menu for an advanced query text. |
protected java.lang.String |
applyMask
The mask to apply, by default, null. |
protected java.lang.String |
attrAux
A reference for a possible auxiliary attribute. |
protected CacheManager |
cacheManager
The reference to cache manager. |
protected int |
cacheTime
The cache time. |
protected java.lang.String |
code
The string code. |
protected javax.swing.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 java.lang.String |
codeQueryField
The code query field key. |
protected boolean |
codVisible
The condition about visible cod. |
protected java.util.Vector |
cols
The columns vector. |
protected java.util.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 |
defaultDisableOnParentkeyNull
|
static boolean |
defaultIgnoreNullOnSetValueSet
|
static boolean |
defaultParentkeyListener
|
static java.lang.String |
defaultParentkeyListenerEvent
|
protected ReferenceComboDataField.DeployedList |
deployedList
A reference to deployed list. |
protected javax.swing.JButton |
detailButton
A reference to detail button. |
protected java.awt.event.ActionListener |
detailButtonListener
A reference for detail button listener. |
static java.lang.String |
DISABLE_ON_PARENTKEY_NULL
|
protected boolean |
disableonparentkeynull
Indicates whether this field has disabled when parentkey field is null. |
protected java.lang.String |
entityName
The entity name. |
protected java.lang.String |
formName
The form name. |
protected java.util.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 java.util.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 java.lang.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 ReferenceExtDataField.MultipleResultWindow |
multipleResultWindow
The reference to multiple result window. |
protected java.util.Vector |
onsetvaluesetAttributes
The vector with attributes to update when data field value changed. |
protected java.awt.Frame |
parentFrame
The parent Frame. |
static java.lang.String |
PARENTKEY_LISTENER
|
static java.lang.String |
PARENTKEY_LISTENER_EVENT
Key used for xml parameter 'parentkeylistenerevent' |
static java.lang.String |
PARENTKEY_LISTENER_EVENT_ALL
|
static java.lang.String |
PARENTKEY_LISTENER_EVENT_PROGRAMMATIC
|
static java.lang.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 java.lang.String |
parentkeyListenerEvent
Indicates the type of event that is taken into consideration on parentkey listener changes. |
protected java.util.Vector |
parentKeys
The parent Keys vector. |
protected java.util.Vector |
queryValues
A vector for query values. |
protected ReferenceComboDataField.MultiColumnComboRenderer |
renderer
A multiple column combo renderer reference. |
protected java.lang.String |
separator
The separator. |
protected boolean |
showErrorMessages
The condition to show error messages. |
static java.lang.String |
UPDATE_DATA
The key to update data. |
protected javax.swing.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 java.util.Vector |
visibleColumns
The visible columns vector. |
| Fields inherited from class com.ontimize.gui.field.ComboDataField |
DATEFORMAT, FORMAT, formatPattern, innerListener, localeComponente, NULL_SELECTION, nullSelection, values |
| Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface com.ontimize.gui.field.AdvancedDataComponent |
ADVANCED_QUERY |
| Fields inherited from interface com.ontimize.gui.field.DataComponent |
COMP_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_2 |
| Fields inherited from interface com.ontimize.gui.field.FormComponent |
DEBUG |
| Fields inherited from interface com.ontimize.gui.i18n.Internationalization |
DEBUG_LANGUAGE |
| Fields inherited from interface com.ontimize.gui.SecureElement |
DESACTIVATE_COMPONENT_BY_PERMISSION_TIP |
| Fields inherited from interface com.ontimize.util.templates.ITemplateField |
DATA_TYPE_FIELD, DATA_TYPE_FIELD_ATTR, DATA_TYPE_IMAGE, DATA_TYPE_IMAGE_ATTR, DATA_TYPE_TABLE, DATA_TYPE_TABLE_ATTR, TEMPLATE_DATA_TYPE |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, PROPERTIES, SOMEBITS |
| Constructor Summary | |
ReferenceComboDataField(java.util.Hashtable parameters)
The constructor for component. |
|
| Method Summary | |
protected void |
advancedQuery()
Performs an advanced query. |
protected void |
createDataRecordListener(Form form)
Adds a DataRecordListener listener to the detail form. |
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(java.util.Hashtable changes,
java.util.Hashtable keys)
Checks the keys and the record values in a register to establish if fields in onsetvaluesetAttributes must be updated |
java.util.Vector |
getAttributes()
|
java.lang.String |
getCodeDescription(java.lang.Object c)
Gets tje code description. |
javax.swing.JTextField |
getCodeField()
Gets the code field. |
java.lang.String |
getCodeFieldName()
The name of the code. |
protected java.lang.Object |
getCodeFieldValue()
Gets the code field value. |
java.lang.String |
getCodeSearchField()
|
java.lang.String |
getCodeSearchFieldName()
Gets the code search field name. |
java.util.Hashtable |
getDataCache()
Gets the data cache. |
java.lang.String |
getDebugInfo()
|
java.awt.event.ActionListener |
getDetailButtonListener()
Gets the detail button listener. |
java.lang.String |
getEntity()
|
protected long |
getLastCacheTime()
Gets the last cache time. |
Table |
getMultipleResultTable()
Gets the reference to table with multiple results. |
java.util.List |
getOnSetValueSetAttributes()
|
java.util.Hashtable |
getOnSetValueSetEquivalences()
|
java.util.Hashtable |
getParentkeyEquivalences()
Returns a Hashtable with key-value corresponding with result to apply two 'tokenizer' actions over parentkeys parameter. |
java.util.Vector |
getParentKeyList()
|
protected java.lang.Object |
getParentKeyValue(java.lang.String parentkey)
Gets the parent key value. |
java.util.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. |
java.lang.Object |
getTemplateDataValue()
Gets the value to show in the template |
java.lang.String |
getText()
Gets text. |
java.util.Vector |
getTextsToTranslate()
Returns all the texts in the element suitable for being translated. |
java.lang.String |
getToolTipText(java.awt.event.MouseEvent e)
|
protected java.lang.Object |
getTypedInnerValue(java.lang.Object s)
Obtains the typed value from parameter. |
java.lang.Object |
getValue()
Gets the value of a component. |
java.util.Hashtable |
getValuesToCode(java.lang.Object code)
Returns the associated combo values for a code. |
boolean |
hasParentKeys()
|
void |
init(java.util.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(java.lang.String column,
java.lang.Object value)
Establishes the query |
protected EntityResult |
queryByCod(java.lang.Object code)
Performs a query by cod. |
void |
registerParentkeyValueChangeListeners()
|
java.util.Hashtable |
replaceParentkeyByEquivalence(java.util.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(java.lang.Object codeValue,
int valueEventType)
Sets the code in function of event value. |
void |
setEnabled(boolean en)
Description method to set enabled or not the component according the boolean condition in parameter. |
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(java.awt.Frame parentFrame)
This method is called from Form for each component that implements this interface. |
void |
setParentkeyListener(boolean parentkeyListener)
|
void |
setQueryValues(java.util.Vector v)
|
void |
setReferenceLocator(EntityReferenceLocator busc)
Establishes the reference locator that will be used by component. |
void |
setResourceBundle(java.util.ResourceBundle resources)
Sets the language resource bundle. |
void |
setUseCacheManager(boolean cacheManager)
Sets the cache manager. |
void |
setValue(java.lang.Object value)
Sets the value for component. |
void |
setValue(java.lang.Object value,
boolean inner)
Establishes the field value. |
protected void |
showPopupMenu(java.awt.Component c,
int x,
int y)
Shows the pop-up menu. |
protected void |
updateBackgroundColor()
Updates the background color. |
protected void |
updateDataCache(java.util.Hashtable updateAttributes,
java.util.Hashtable updateKeys)
Updates the data cache with specified values |
protected void |
updateOnSetValueSetAttributes(java.util.Hashtable data)
Parameters on this method are used to update the fields whose attributes are contained in onsetvaluesetAttributes |
| Methods inherited from class com.ontimize.gui.field.ComboDataField |
free, getInnerValue, getValues, isInnerValueEqual, isModified, setComponentLocale, setInnerValue, setSelected, setValues, updateUI |
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.ontimize.gui.field.DataComponent |
getLabelComponentText, isHidden, isModifiable, isModified, isRequired, setModifiable, setRequired |
| Methods inherited from interface com.ontimize.gui.field.FormComponent |
getConstraints, isEnabled, setVisible |
| Methods inherited from interface com.ontimize.gui.i18n.Internationalization |
setComponentLocale |
| Methods inherited from interface com.ontimize.gui.field.IdentifiedElement |
getAttribute |
| Methods inherited from interface com.ontimize.gui.SecureElement |
initPermissions, isRestricted |
| Methods inherited from interface com.ontimize.gui.field.ReferenceDataComponent |
getParentForm |
| Field Detail |
public static final java.lang.String PARENTKEY_LISTENER
public static final java.lang.String DISABLE_ON_PARENTKEY_NULL
public static final java.lang.String PARENTKEY_LISTENER_EVENT
public static final java.lang.String PARENTKEY_LISTENER_EVENT_ALL
public static final java.lang.String PARENTKEY_LISTENER_EVENT_USER
public static final java.lang.String PARENTKEY_LISTENER_EVENT_PROGRAMMATIC
public static java.lang.String defaultParentkeyListenerEvent
public static boolean defaultParentkeyListener
public static boolean defaultDisableOnParentkeyNull
public static final java.lang.String IGNORE_NULL_ONSETVALUESET
public static boolean defaultIgnoreNullOnSetValueSet
protected java.awt.Frame parentFrame
protected ReferenceExtDataField.MultipleResultWindow multipleResultWindow
protected boolean visibleCodeSearch
protected java.util.Hashtable hOnSetValueSetEquivalences
onsetvalueset is: "fieldonset1:fieldentitypk1;fieldonset2:fieldentitypk2;...fieldonsetn:fieldentitypkn"
public static java.lang.String UPDATE_DATA
protected java.lang.String codeQueryField
protected ReferenceComboDataField.DeployedList deployedList
protected java.util.Vector queryValues
protected java.util.Hashtable hParentkeyEquivalences
parentkeys is: "fieldpk1:fieldentitypk1;fieldpk2:fieldentitypk2;...fieldpkn:fieldentitypkn"
protected boolean showErrorMessages
protected javax.swing.JButton detailButton
protected java.lang.String formName
protected boolean dataRecordListenerReady
protected java.util.Vector onsetvaluesetAttributes
protected boolean ignorenullonsetvalueset
protected boolean parentkeyListener
protected java.lang.String parentkeyListenerEvent
protected boolean disableonparentkeynull
protected ReferenceComboDataField.CodeFieldListener codeFieldListener
protected ReferenceComboDataField.MultiColumnComboRenderer renderer
protected boolean integerValue
protected boolean codeNumber
protected int codeNumberClass
protected java.lang.String code
protected EntityReferenceLocator locator
protected javax.swing.JTextField codeField
protected java.util.Vector parentKeys
protected java.lang.String entityName
protected java.lang.String attrAux
protected java.util.Vector cols
protected java.util.Vector visibleColumns
protected boolean codVisible
protected java.lang.String applyMask
protected int cacheTime
protected boolean parentkeyCache
protected long lastCacheTime
protected java.util.Hashtable dataCache
protected java.lang.String separator
protected javax.swing.JMenuItem updateData
protected javax.swing.JMenuItem advancedQuery
protected boolean visibleArrowButton
protected CacheManager cacheManager
protected boolean useCacheManager
protected boolean initCacheOnSetValue
protected boolean dataCacheInitialized
protected java.awt.event.ActionListener detailButtonListener
| Constructor Detail |
public ReferenceComboDataField(java.util.Hashtable parameters)
init(Hashtable).
parameters - the hashtable with parameters| Method Detail |
public java.lang.String getDebugInfo()
public java.lang.String getToolTipText(java.awt.event.MouseEvent e)
protected void updateOnSetValueSetAttributes(java.util.Hashtable data)
onsetvaluesetAttributes
data - Values to updatepublic java.util.List getOnSetValueSetAttributes()
public java.util.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 onsetvaluesetAttributes
form - Form where event is fired
protected boolean existFieldsToUpdate(java.util.Hashtable changes,
java.util.Hashtable keys)
onsetvaluesetAttributes must be updated
changes - Changes to updatekeys - Keys for record to update
protected void updateDataCache(java.util.Hashtable updateAttributes,
java.util.Hashtable updateKeys)
updateAttributes - Update valuesupdateKeys - Keys for records to updatepublic void init(java.util.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. | |
| 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. |
init in interface FormComponentinit in class ComboDataFieldprotected long getLastCacheTime()
public void setValue(java.lang.Object value)
DataComponent
setValue in interface DataComponentsetValue in class ComboDataFieldvalue - the object to set the value.
public void setValue(java.lang.Object value,
boolean inner)
protected void setCode(java.lang.Object codeValue,
int valueEventType)
codeValue - the value to setvalueEventType - the type of eventsetValue(Object, boolean)public java.lang.Object getValue()
DataComponent
getValue in interface DataComponentgetValue in class ComboDataFieldJComboBox.getSelectedItem()
protected void popupWillShow()
throws java.lang.Exception
java.lang.Exception - when a Exception occurs
protected void listWillShow()
throws java.lang.Exception
popupWillShow()
java.lang.Exception - when Exception occurspublic void initCache()
public EntityResult queryBy(java.lang.String column,
java.lang.Object value)
queryBy in interface ReferenceDataComponentcolumn - the col namevalue - the value to add to keyvalues hashtable, with the form
(col,value)
protected EntityResult queryByCod(java.lang.Object code)
code - the code to query
protected void popupWillHide()
public void setReferenceLocator(EntityReferenceLocator busc)
ReferenceComponent
setReferenceLocator 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)
FormComponent
setEnabled in interface FormComponentsetEnabled in class DataFielden - the condition to set enablepublic void setResourceBundle(java.util.ResourceBundle resources)
Internationalization
setResourceBundle in interface InternationalizationsetResourceBundle in class ComboDataFieldpublic void invalidateCache()
protected void initDeployedList()
protected void advancedQuery()
throws java.lang.Exception
java.lang.Exception - when Exception occursprotected void createPopupMenu()
DataField
createPopupMenu in class DataFieldprotected void installPopupMenuListener()
DataField
installPopupMenuListener in class DataField
protected void showPopupMenu(java.awt.Component c,
int x,
int y)
DataField
showPopupMenu in class DataFieldc - the componentx - the x coordinatey - the y coordinatepublic java.util.Hashtable getValuesToCode(java.lang.Object code)
code - the object where code are specified
public boolean isCacheManagerUsed()
public void setUseCacheManager(boolean cacheManager)
cacheManager - the cache manager conditionpublic java.util.Vector getTextsToTranslate()
Internationalization
getTextsToTranslate in interface InternationalizationgetTextsToTranslate in class DataFieldpublic boolean isEmpty()
DataComponent
isEmpty in interface DataComponentisEmpty in class ComboDataFieldpublic void deleteData()
DataComponent
deleteData in interface DataComponentdeleteData in class ComboDataFieldpublic void deleteUserData()
public void setAdvancedQueryMode(boolean enabled)
AdvancedDataComponent
setAdvancedQueryMode in interface AdvancedDataComponentenabled - the condition to enable this statepublic java.lang.String getEntity()
getEntity in interface CachedComponentpublic java.util.Vector getAttributes()
getAttributes in interface CachedComponentpublic void setCacheManager(CacheManager cm)
setCacheManager in interface CachedComponentpublic void setQueryValues(java.util.Vector v)
public java.lang.String getCodeDescription(java.lang.Object c)
c - the object to get the description
public java.lang.String getText()
DataField
getText in class DataFieldpublic java.awt.event.ActionListener getDetailButtonListener()
protected java.lang.Object getParentKeyValue(java.lang.String parentkey)
parentkey - the parent key name
public ReferenceComboDataField.MultiColumnComboRenderer getRenderer()
public java.util.Hashtable getDataCache()
public boolean hasParentKeys()
hasParentKeys in interface IFilterElementpublic java.util.Hashtable getParentKeyValues()
getParentKeyValues in interface IFilterElementpublic java.util.Vector getParentKeyList()
getParentKeyList in interface IFilterElementpublic java.util.Hashtable getParentkeyEquivalences()
string="formfieldpk1:equivalententityfieldpk1;formfieldpk2:equivalententityfieldpk2;...;formfieldpkn:equivalententityfieldpkn"Hashtable:
Hashtable with key-valuepublic java.util.Hashtable replaceParentkeyByEquivalence(java.util.Hashtable hParentkeyEquivalences)
protected void updateBackgroundColor()
DataField
updateBackgroundColor in class DataFieldprotected java.lang.Object getCodeFieldValue()
protected java.lang.Object getTypedInnerValue(java.lang.Object s)
s - the object to obtain the type
public javax.swing.JTextField getCodeField()
ReferenceDataComponent
getCodeField in interface ReferenceDataComponentJTextField with the code field.public java.lang.String getCodeSearchField()
public boolean isCodeFieldVisible()
ReferenceDataComponent
isCodeFieldVisible in interface ReferenceDataComponentpublic boolean isCodeSearchVisible()
ReferenceDataComponent
isCodeSearchVisible in interface ReferenceDataComponentpublic java.lang.String getCodeFieldName()
ReferenceDataComponent
getCodeFieldName in interface ReferenceDataComponentString with the code name.public java.lang.String getCodeSearchFieldName()
ReferenceDataComponent
getCodeSearchFieldName 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)
AccessForm
setParentForm in interface AccessFormsetParentForm in class DataFieldpublic void registerParentkeyValueChangeListeners()
public boolean isParentkeyListener()
public void setParentkeyListener(boolean parentkeyListener)
public void setParentFrame(java.awt.Frame parentFrame)
OpenDialog
setParentFrame in interface OpenDialogparentFrame - the frameprotected void setInnerListenerEnabled(boolean enabled)
ComboDataField
setInnerListenerEnabled in class ComboDataFieldenabled - the condition to enable/disable the inner listener.protected void installInnerListener()
ComboDataField
installInnerListener in class ComboDataFieldpublic int getTemplateDataType()
ITemplateFieldITemplateField.DATA_TYPE_FIELD
ITemplateField.DATA_TYPE_IMAGE
ITemplateField.DATA_TYPE_TABLE
getTemplateDataType in interface ITemplateFieldint with the data type.public java.lang.Object getTemplateDataValue()
ITemplateField
getTemplateDataValue in interface ITemplateField
|
Ontimize | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||