Ontimize 5.2072EN

com.ontimize.gui.field
Class ReferenceExtDataField

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended bycom.ontimize.gui.field.DataField
                      extended bycom.ontimize.gui.field.TextFieldDataField
                          extended bycom.ontimize.gui.field.ReferenceExtDataField
All Implemented Interfaces:
AccessForm, javax.accessibility.Accessible, ApplicationPreferencesListener, CachedComponent, CreateForms, DataComponent, java.util.EventListener, FormComponent, Freeable, HasHelpIdComponent, HasPreferenceComponent, IdentifiedElement, IFilterElement, java.awt.image.ImageObserver, Internationalization, ITemplateField, java.awt.MenuContainer, OpenDialog, ReferenceComponent, ReferenceDataComponent, SecureElement, java.io.Serializable, ValueChangeDataComponent

public class ReferenceExtDataField
extends TextFieldDataField
implements OpenDialog, Internationalization, Freeable, CreateForms, CachedComponent, IFilterElement, ReferenceDataComponent, ITemplateField

The main class to extend the ReferenceDataField functionalities.

Author:
Imatia Innovation
See Also:
ReferenceDataField, Serialized Form

Nested Class Summary
protected  class ReferenceExtDataField.CodeFieldListener
          The code field listener to manage the codeChange value in function of events.
protected static class ReferenceExtDataField.MultipleResultWindow
          The main class to manage a multiple result window in a Reference Ext datafield.
protected  class ReferenceExtDataField.TableWindow
          The main class to shows a table in a window.
 
Nested classes inherited from class com.ontimize.gui.field.TextFieldDataField
TextFieldDataField.EJTextField, TextFieldDataField.InnerDocumentListener
 
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  java.lang.String attrAux
          The auxiliary attributes.
protected static java.lang.String auxCodeLabelKey
          The search key.
protected  DateDocument auxDateDoc
          An auxiliary date document.
static java.lang.String BIG_DECIMAL
          Deprecated. use ParseUtils.BIG_DECIMAL
static int BIG_DECIMAL_
          Deprecated. use ParseUtils.BIG_DECIMAL_
static java.lang.String BIG_INTEGER
          Deprecated. use ParseUtils.BIG_INTEGER
static int BIG_INTEGER_
          Deprecated. use ParseUtils.BIG_INTEGER_
protected  CacheManager cacheManager
          The cache manager.
protected  int cacheTime
          The cache time.
static java.lang.String CLEAR_QUICK_FILTER
           
protected  boolean clearDetailTableQuickFilterWhenShow
           
protected  java.lang.String code
          The code.
protected  javax.swing.JTextField codeField
          This object provides a EJTextField with 4 columns.
protected  ReferenceExtDataField.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  java.lang.Object codeValue
          The code value.
protected  java.util.Hashtable dataCache
          A Hashtable used as a data cache.
protected  boolean dataCacheInitialized
          The condition to check whether dataCache are initialized.
protected  boolean dataRecordListenerReady
          True when DataRecordListener is registered in the detail form
static java.lang.String DATEFORMAT
          Date format pattern string key to convert the data field dates values.
static boolean defaultDisableOnParentkeyNull
           
static boolean defaultIgnoreNullOnSetValueSet
           
static boolean defaultParentkeyListener
           
static java.lang.String defaultParentkeyListenerEvent
           
protected  javax.swing.JButton deleteButton
          The Field button for delete.
protected  java.util.Vector descriptionColumns
          The description columns vector.
protected  boolean descriptionFieldVisible
          The condition of field description visibility.
protected  boolean descriptionValue
          The description value condition.
static java.lang.String DISABLE_ON_PARENTKEY_NULL
           
protected  boolean disabledValueEvents
          The enable or disable value events, By default, false.
protected  boolean disableonparentkeynull
          Indicates whether this field has disabled when parentkey field is null.
static java.lang.String DOUBLE
          Deprecated. use ParseUtils.DOUBLE
static int DOUBLE_
          Deprecated. use ParseUtils.DOUBLE_
protected  java.lang.String entityName
          The entity name.
static java.lang.String FORMAT
          Format pattern string key to convert the data field content value.
protected  FormatPattern formatPattern
          Pattern to format the field contents.
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  java.lang.String iMask
          The iMask key.
protected  boolean initCacheOnSetValue
          The condition to initialize cache on setvalue method.
static java.lang.String INTEGER
          Deprecated. use ParseUtils.INTEGER
static int INTEGER_
          Deprecated. use ParseUtils.INTEGER_
protected  boolean integerValue
          The integer value condition.
protected  long lastCacheTime
          The last cache time.
protected  EntityReferenceLocator locator
          The locator.
static java.lang.String LONG
          Deprecated. use ParseUtils.LONG
static int LONG_
          Deprecated. use ParseUtils.LONG_
protected  ReferenceExtDataField.MultipleResultWindow multipleResultWindow
          The reference to multiple result window.
static java.lang.String NO_RESULT_CLEAR_CODE
          Key used for xml parameter 'noresultclearcode'
protected  boolean noresultclearcode
          The condition about code will be cleared when not matches with existing value.
protected  javax.swing.JButton okButton
          The ok button.
protected  java.util.Vector onsetvaluesetAttributes
          The vector with attributes to update when data field value changed.
protected  java.util.Vector othersParentKey
          The others parent keys in a 1x3 Vector.
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  java.util.Vector parentkeyList
          The parent keys vector.
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.lang.String parentKeys
          The parentkeys.
static java.lang.String propUserSelection
          The UserSelection property.
protected  javax.swing.JButton queryButton
          The Field button for query.
protected  java.awt.event.ActionListener queryListener
          A listener for query operation.
protected static java.lang.String RECORD_NOT_FOUND_ERROR_MESSAGE
           
protected  javax.swing.JButton refreshCacheButton
          The reference for a refresh cache button.
static java.lang.String RESULTS_DIALOG_SIZE_POSITION
          The results_dialog_size_position property.
protected static java.lang.String ResultSelectionInfoKey
          The result selection key.
static java.lang.String SEARCH_DIALOG_SIZE_POSITION
          The search_dialog_size_position property.
protected  java.lang.String separator
          A separator.
static java.lang.String SHORT
          Deprecated. use ParseUtils.SHORT
static int SHORT_
          Deprecated. use ParseUtils.SHORT_
protected  Table t
          The reference for the table.
protected  ReferenceExtDataField.TableWindow tableWindow
          A reference to table Window.
protected  boolean userCacheManager
          The condition to exist a user cache manager.
protected  boolean visibleCodeField
          The condition of code field visibility.
protected  boolean visibleCodeSearch
          The condition of code visibility of the code in the detail window.
protected  java.lang.String windowTitle
          The window title key.
 
Fields inherited from class com.ontimize.gui.field.TextFieldDataField
disabledTextColor, innerListener
 
Fields inherited from class com.ontimize.gui.field.DataField
advancedQueryMode, 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, FIELD_HELP_TIP, fieldlistenerFocus, fieldSize, fireValueEvents, FOCUS_BACKGROUNDCOLOR, FONT, fontColor, FONTCOLOR, fontSize, FONTSIZE, height, HEIGHT, incrementalFont, initPreferenceHelpText, 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, RAISED, redimensionPanel, redimensJTextField, required, REQUIRED, requiredBorder, REQUIREDBORDER, requiredFieldBackgroundColor, 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_STR
 
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.i18n.Internationalization
DEBUG_LANGUAGE
 
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.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
ReferenceExtDataField(java.util.Hashtable parameters)
           
 
Method Summary
 void clearQuickFilter()
           
protected  void createDataField()
          Creates a data field that focus is not supported.
protected  void createDataRecordListener()
           
protected  void createMultipleResultsWindow(Table t)
          Creates the multiple result window.
 void deleteData()
          The method to delete data for component.
 void deleteData(boolean clearCode)
           
protected  void deleteUserData()
          Deletes the user data in code field.
protected  void deleteUserData(boolean clearcode)
          Deletes the user data in code field.
protected  boolean existFieldsToUpdate(java.util.Hashtable changes, java.util.Hashtable keys)
           
protected  void fireValueChanged(java.lang.Object newValue, java.lang.Object oldValue, int type)
          Detects fire value events.
 void free()
          Makes the object to release the resources.
 java.lang.Object getAttribute()
          Gets the object attribute.
 java.util.Vector getAttributes()
          Gets Attributes from table.
protected  java.lang.String getCodeDescription(java.lang.Object code, java.util.Hashtable value)
          Obtains the code description.
 javax.swing.JTextField getCodeField()
          Returns the codeField.
 java.lang.String getCodeFieldName()
          Gets the code field name
protected  java.lang.Object getCodeFieldValue()
          Gets the code field value.
 java.lang.String getCodeSearchFieldName()
          Gets the code search field name.
 java.util.Hashtable getCodeValues(java.lang.Object code)
          Returns the combo values associated to code.
 java.util.Hashtable getDataCache()
          Gets the data cache.
 javax.swing.JButton getDeleteButton()
           
 java.lang.String getEntity()
          The entity name.
protected  long getLastCacheTime()
          Gets the last cache time
 Table getMultipleResultTable()
          Gets the reference to table with multiple results.
 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()
           
 java.util.Vector getParentKeys()
          Returns the parentkeys.
 java.util.Hashtable getParentKeyValues()
           
 javax.swing.JButton getQueryButton()
           
 java.lang.String getResultDialogSizePreferenceKey()
          Deprecated.  
 java.lang.String getSearchDialogSizePreferenceKey()
          Returns a string with preference key about dialog search.
 int getSQLDataType()
          Returns the SQL type of varchar or integer in function of integerValue.
 Table getTable()
          Gets the reference to the table.
 int getTemplateDataType()
          Returns the data type.
 java.lang.Object getTemplateDataValue()
          Gets the value to show in the template
 java.util.Vector getTextsToTranslate()
          Gets the text to translate
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.
 boolean hasParentKeys()
           
 void init(java.util.Hashtable parameters)
          Initializes parameters.
 void initCache()
          Inits the cache.
 void initPreferences(ApplicationPreferences prefs, java.lang.String user)
          Inits the user and application preferences.
protected  void installFocusListener()
          Adds the focus listener to the data field.
protected  void installPopupMenuListener()
          Installs a pop-up menu listener.
protected  void installPreferenceHelpListener()
          Adds a help listener
 void invalidateCache()
          Invalidate cache setting to 0 the lastCacheTime.
 boolean isClearDetailTableQuickFilterWhenShow()
          Returns the condition expressed in parameter 'clearquickfilter'.
 boolean isCodeFieldVisible()
          Checks whether the codefield is visible.
 boolean isCodeSearchVisible()
          Checks whether the code search is visible.
 boolean isEmpty()
          Checks the existence of text in codeField.
 boolean isModified()
          This method should be return true when data have been modified.
 boolean isParentkeyListener()
           
protected  void populateTable()
          Fills the table.
 EntityResult queryBy(java.lang.String column, java.lang.Object value)
          Establishes the query
protected  EntityResult queryByCode(java.lang.Object code)
          Queries by code
 void registerParentkeyValueChangeListeners()
           
 java.util.Hashtable replaceParentkeyByEquivalence(java.util.Hashtable hParentkeyEquivalences)
           
 void requestFocus()
           
 void resetFilter()
          Removes all the filters set to a table.
 void setCacheManager(CacheManager cm)
          Sets the CacheManager.
 void setCode(java.lang.Object codeValue)
          Sets the code.
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 setFilter(java.lang.String column, java.lang.Object[] values, int condition)
          Applies a filter to a specified column.
 void setFormBuilder(FormBuilder builder)
           
protected  void setInnerListenerEnabled(boolean enabled)
          Enable or disable the intern value events notification.
 void setParentForm(Form f)
          Method declaration to set the form that contains the component.
 void setParentFrame(java.awt.Frame frame)
          This method is called from Form for each component that implements this interface.
 void setParentkeyListener(boolean parentkeyListener)
           
 void setReferenceLocator(EntityReferenceLocator locator)
          Establishes the reference locator that will be used by component.
 void setResourceBundle(java.util.ResourceBundle resources)
          Sets the language resource bundle.
 void setValue(java.lang.Object value)
          Sets the value for component.
 void setValue(java.lang.Object value, boolean inner)
          Establishes the field value.
protected  java.lang.String toString(java.lang.Object v)
          Checks whether parameter is a string or a date.
protected  void updateBackgroundColor()
          Updates the background color.
protected  void updateDataCache(java.util.Hashtable updateAttributes, java.util.Hashtable updateKeys)
           
protected  void updateOnSetValueSetAttributes(java.util.Hashtable data)
           
 
Methods inherited from class com.ontimize.gui.field.TextFieldDataField
getInnerListenerEnabled, getInnerValue, getLabelComponentText, getText, installInnerListener, isInnerValueEqual, isModifiable, isRequired, setInnerValue
 
Methods inherited from class com.ontimize.gui.field.DataField
addFocusListener, addHelpMenuPopup, addValueChangeListener, changeButton, changeOpacity, checkDefineHelpPermission, checkEnabledPermission, checkVisiblePermission, configurePopupMenuHelp, createFocusListener, createInstanceConditionCombo, createPopupMenu, defineHelpField, finalize, getBorder, getConstraints, getDataField, getDisabledbgcolor, getFontColor, getHelpIdString, getHelpPreferenceKey, getLabelComponent, getLabelFontColor, getLabelText, getParentForm, getPreferenceHelpText, getValueChangeListeners, hasHelpInPreferences, initPermissions, installHelpId, isAdvancedQueryMode, isEnabled, isHidden, isLabelVisible, isRestricted, parseBoolean, preferenceChanged, removeFocusListener, removeValueChangeListener, seeHelpField, setBold, setComponentLocale, setDisabledbgcolor, setFont, setFontColor, setFontSize, setLabelFontColor, setModifiable, setRequired, setRequiredFieldBackground, setVisible, showPopupMenu, updateBackgroundColor, updateFont, updateTip, updateUI, validateComponentPositions
 
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, 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.i18n.Internationalization
setComponentLocale
 
Methods inherited from interface com.ontimize.gui.field.ReferenceDataComponent
getParentForm
 
Methods inherited from interface com.ontimize.gui.field.DataComponent
getLabelComponentText, isHidden, isModifiable, isRequired, setModifiable, setRequired
 
Methods inherited from interface com.ontimize.gui.field.FormComponent
getConstraints, isEnabled, setVisible
 
Methods inherited from interface com.ontimize.gui.SecureElement
initPermissions, isRestricted
 

Field Detail

SEARCH_DIALOG_SIZE_POSITION

public static final java.lang.String SEARCH_DIALOG_SIZE_POSITION
The search_dialog_size_position property.

See Also:
Constant Field Values

RECORD_NOT_FOUND_ERROR_MESSAGE

protected static final java.lang.String RECORD_NOT_FOUND_ERROR_MESSAGE
See Also:
Constant Field Values

RESULTS_DIALOG_SIZE_POSITION

public static final java.lang.String RESULTS_DIALOG_SIZE_POSITION
The results_dialog_size_position property.

See Also:
Constant Field Values

PARENTKEY_LISTENER

public static final java.lang.String PARENTKEY_LISTENER
See Also:
Constant Field Values

DISABLE_ON_PARENTKEY_NULL

public static final java.lang.String DISABLE_ON_PARENTKEY_NULL
See Also:
Constant Field Values

CLEAR_QUICK_FILTER

public static final java.lang.String CLEAR_QUICK_FILTER
See Also:
Constant Field Values

PARENTKEY_LISTENER_EVENT

public static final java.lang.String PARENTKEY_LISTENER_EVENT
Key used for xml parameter 'parentkeylistenerevent'

Since:
Ontimize 5.2068-06EN
See Also:
Constant Field Values

PARENTKEY_LISTENER_EVENT_ALL

public static final java.lang.String PARENTKEY_LISTENER_EVENT_ALL
See Also:
Constant Field Values

PARENTKEY_LISTENER_EVENT_USER

public static final java.lang.String PARENTKEY_LISTENER_EVENT_USER
See Also:
Constant Field Values

PARENTKEY_LISTENER_EVENT_PROGRAMMATIC

public static final java.lang.String PARENTKEY_LISTENER_EVENT_PROGRAMMATIC
See Also:
Constant Field Values

IGNORE_NULL_ONSETVALUESET

public static final java.lang.String IGNORE_NULL_ONSETVALUESET
Key used for xml parameter 'ignorenullonsetvalueset'

Since:
Ontimize 5.2068-06EN
See Also:
Constant Field Values

defaultIgnoreNullOnSetValueSet

public static boolean defaultIgnoreNullOnSetValueSet

FORMAT

public static final java.lang.String FORMAT
Format pattern string key to convert the data field content value.

Since:
Ontimize 5.2059EN
See Also:
DATEFORMAT, Constant Field Values

NO_RESULT_CLEAR_CODE

public static final java.lang.String NO_RESULT_CLEAR_CODE
Key used for xml parameter 'noresultclearcode'

Since:
Ontimize 5.20568EN
See Also:
Constant Field Values

DATEFORMAT

public static final java.lang.String DATEFORMAT
Date format pattern string key to convert the data field dates values.

Since:
Ontimize 5.2059EN
See Also:
FORMAT, Constant Field Values

BIG_DECIMAL

public static final java.lang.String BIG_DECIMAL
Deprecated. use ParseUtils.BIG_DECIMAL

See Also:
Constant Field Values

BIG_INTEGER

public static final java.lang.String BIG_INTEGER
Deprecated. use ParseUtils.BIG_INTEGER

See Also:
Constant Field Values

DOUBLE

public static final java.lang.String DOUBLE
Deprecated. use ParseUtils.DOUBLE

See Also:
Constant Field Values

LONG

public static final java.lang.String LONG
Deprecated. use ParseUtils.LONG

See Also:
Constant Field Values

SHORT

public static final java.lang.String SHORT
Deprecated. use ParseUtils.SHORT

See Also:
Constant Field Values

INTEGER

public static final java.lang.String INTEGER
Deprecated. use ParseUtils.INTEGER

See Also:
Constant Field Values

BIG_DECIMAL_

public static final int BIG_DECIMAL_
Deprecated. use ParseUtils.BIG_DECIMAL_

See Also:
Constant Field Values

BIG_INTEGER_

public static final int BIG_INTEGER_
Deprecated. use ParseUtils.BIG_INTEGER_

See Also:
Constant Field Values

DOUBLE_

public static final int DOUBLE_
Deprecated. use ParseUtils.DOUBLE_

See Also:
Constant Field Values

LONG_

public static final int LONG_
Deprecated. use ParseUtils.LONG_

See Also:
Constant Field Values

INTEGER_

public static final int INTEGER_
Deprecated. use ParseUtils.INTEGER_

See Also:
Constant Field Values

SHORT_

public static final int SHORT_
Deprecated. use ParseUtils.SHORT_

See Also:
Constant Field Values

defaultParentkeyListener

public static boolean defaultParentkeyListener

defaultDisableOnParentkeyNull

public static boolean defaultDisableOnParentkeyNull

defaultParentkeyListenerEvent

public static java.lang.String defaultParentkeyListenerEvent

auxCodeLabelKey

protected static java.lang.String auxCodeLabelKey
The search key.


ResultSelectionInfoKey

protected static java.lang.String ResultSelectionInfoKey
The result selection key.


dataRecordListenerReady

protected boolean dataRecordListenerReady
True when DataRecordListener is registered in the detail form


parentkeyListener

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).

Since:
5.2057EN-1.4

disableonparentkeynull

protected boolean disableonparentkeynull
Indicates whether this field has disabled when parentkey field is null.

Since:
5.2057EN-1.4

parentkeyListenerEvent

protected java.lang.String parentkeyListenerEvent
Indicates the type of event that is taken into consideration on parentkey listener changes.

Since:
5.2068EN-0.6

onsetvaluesetAttributes

protected java.util.Vector onsetvaluesetAttributes
The vector with attributes to update when data field value changed. By default, null.


ignorenullonsetvalueset

protected boolean ignorenullonsetvalueset
Indicates if fields contained into 'onsetvalueset' have to be deleted on null value of the field.

Since:
5.2068EN-0.6

descriptionValue

protected boolean descriptionValue
The description value condition. By default, false.


integerValue

protected boolean integerValue
The integer value condition. By default, false.


code

protected java.lang.String code
The code. By default, null.


locator

protected EntityReferenceLocator locator
The locator. By default, null.


hParentkeyEquivalences

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"


hOnSetValueSetEquivalences

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"


codeField

protected javax.swing.JTextField codeField
This object provides a EJTextField with 4 columns.


queryButton

protected javax.swing.JButton queryButton
The Field button for query.


deleteButton

protected javax.swing.JButton deleteButton
The Field button for delete.


parentFrame

protected java.awt.Frame parentFrame
The parent Frame. By default, null.


parentKeys

protected java.lang.String parentKeys
The parentkeys. By default, null.


entityName

protected java.lang.String entityName
The entity name. By default, null.


visibleCodeField

protected boolean visibleCodeField
The condition of code field visibility. By default, true.


visibleCodeSearch

protected boolean visibleCodeSearch
The condition of code visibility of the code in the detail window. By default, false.


descriptionFieldVisible

protected boolean descriptionFieldVisible
The condition of field description visibility. By default, true.


propUserSelection

public static final java.lang.String propUserSelection
The UserSelection property.

See Also:
Constant Field Values

iMask

protected java.lang.String iMask
The iMask key. By default, null.


windowTitle

protected java.lang.String windowTitle
The window title key. By default, null.


othersParentKey

protected java.util.Vector othersParentKey
The others parent keys in a 1x3 Vector.


parentkeyList

protected java.util.Vector parentkeyList
The parent keys vector.


descriptionColumns

protected java.util.Vector descriptionColumns
The description columns vector. By default, null.


cacheTime

protected int cacheTime
The cache time. By default, {@value}.


lastCacheTime

protected long lastCacheTime
The last cache time. By default, 0. With this default value, it is checked the first time that window is opened.


dataCache

protected java.util.Hashtable dataCache
A Hashtable used as a data cache.


parentkeyCache

protected boolean parentkeyCache

separator

protected java.lang.String separator
A separator. By default, " ".


clearDetailTableQuickFilterWhenShow

protected boolean clearDetailTableQuickFilterWhenShow

userCacheManager

protected boolean userCacheManager
The condition to exist a user cache manager. By default, true.


cacheManager

protected CacheManager cacheManager
The cache manager. By default, null.


initCacheOnSetValue

protected boolean initCacheOnSetValue
The condition to initialize cache on setvalue method. By default, false.


dataCacheInitialized

protected boolean dataCacheInitialized
The condition to check whether dataCache are initialized. By default, false.


disabledValueEvents

protected boolean disabledValueEvents
The enable or disable value events, By default, false.


attrAux

protected java.lang.String attrAux
The auxiliary attributes. By default, null.


codeNumber

protected boolean codeNumber
The condition about existence of code number. By default, false.


noresultclearcode

protected boolean noresultclearcode
The condition about code will be cleared when not matches with existing value. By default, code will be cleared.

Since:
5.2068EN

codeNumberClass

protected int codeNumberClass
The code number class. By default, it is referred to integer code.


codeQueryField

protected java.lang.String codeQueryField
The code query field key. By default, null.


codeValue

protected java.lang.Object codeValue
The code value. By default, null.


auxDateDoc

protected DateDocument auxDateDoc
An auxiliary date document. By default, null.


multipleResultWindow

protected ReferenceExtDataField.MultipleResultWindow multipleResultWindow
The reference to multiple result window. By default, null.


tableWindow

protected ReferenceExtDataField.TableWindow tableWindow
A reference to table Window. By default, null.


okButton

protected javax.swing.JButton okButton
The ok button. By default, null.


refreshCacheButton

protected javax.swing.JButton refreshCacheButton
The reference for a refresh cache button. By default, null.


t

protected Table t
The reference for the table. By default, null.


queryListener

protected java.awt.event.ActionListener queryListener
A listener for query operation.


codeFieldListener

protected ReferenceExtDataField.CodeFieldListener codeFieldListener
A reference to code field listener.


formatPattern

protected FormatPattern formatPattern
Pattern to format the field contents. Null if the format parameter is missing. Also wrappers the content of the dateformat parameter.

Since:
Ontimize 5.2059EN
Constructor Detail

ReferenceExtDataField

public ReferenceExtDataField(java.util.Hashtable parameters)
                      throws java.lang.Exception
Method Detail

isEmpty

public boolean isEmpty()
Checks the existence of text in codeField.

Specified by:
isEmpty in interface DataComponent
Overrides:
isEmpty in class TextFieldDataField
Returns:
true when codeField is empty

updateOnSetValueSetAttributes

protected void updateOnSetValueSetAttributes(java.util.Hashtable data)

createDataRecordListener

protected void createDataRecordListener()

existFieldsToUpdate

protected boolean existFieldsToUpdate(java.util.Hashtable changes,
                                      java.util.Hashtable keys)

updateDataCache

protected void updateDataCache(java.util.Hashtable updateAttributes,
                               java.util.Hashtable updateKeys)

init

public void init(java.util.Hashtable parameters)
Initializes parameters.

attribute values default required meaning
attr cod no The field attribute.
entity yes Associated entity.
cod yes The code name associated to field.
codinteger yes/no no no When code value is an Integer
codnumber yes/no no no Specifies if a number object is used.
codnumberclass BigDecimal/BigInteger/Double/Long/Short/Integer no Specifies the type number object used. It is only available when codnumber is setted.
csize no The number of characters for code field.
codvisible yes/no yes no Condition about visibility of cod.
codsearchvisible yes/no no no Condition about visibility of cod search in detail window.
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 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., refExtKey= Period starts: {0} and ends: {1}
-He must specify in parameter format="refExtKey;INITIALDATE;ENDDATE"
mask no Specifies an input mask for applying to the code field.
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.
descriptioncols dcol1;dcol2;...;dcoln yes no Visible table columns in text field. By default, it is the parameter value of visiblecols in table.
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.
noresultclearcode yes/no (since version 5.2068EN) yes no Indicates whether code field should be reset when query did not return any match for current code value.

Valid Table parameters:

attribute values default required meaning
key cod no The Table key.
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 no 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.
initcacheonsetvalue yes/no no Inits cache when setValue() is called.
codsearch no It specifies the field name for searching when user introduces a search value.
controls yes/no yes no Allows the Table to have some control buttons, in the top of it. This buttons, by default, can export to excel the data in the table, show charts, reports, and so on. If the value is not, the controlsvisible attribute will not affect.
descvisible yes/no yes no The visibility description.
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.

Specified by:
init in interface FormComponent
Overrides:
init in class TextFieldDataField
Parameters:
parameters - the Hashtable with parameters

attribute values default required meaning
focuslistener no The complete class name that implements FocusListener and will be registered like listener for this field.

getCodeFieldValue

protected java.lang.Object getCodeFieldValue()
Gets the code field value.

Returns:
the object with code field value

getTypedInnerValue

protected java.lang.Object getTypedInnerValue(java.lang.Object s)
Obtains the typed value from parameter.

Parameters:
s - the object to obtain the type
Returns:
the typed inner value

setCode

public void setCode(java.lang.Object codeValue)
Sets the code.

Parameters:
codeValue -
See Also:
setCode(Object, int)

replaceParentkeyByEquivalence

public java.util.Hashtable replaceParentkeyByEquivalence(java.util.Hashtable hParentkeyEquivalences)

queryBy

public EntityResult queryBy(java.lang.String column,
                            java.lang.Object value)
Establishes the query

Specified by:
queryBy in interface ReferenceDataComponent
Parameters:
column - the col name
value - the value to add to keyvalues hashtable, with the form (col,value)
Returns:
the result of query

queryByCode

protected EntityResult queryByCode(java.lang.Object code)
Queries by code

Parameters:
code - the value to add to hashtable, with the form (code,codigo)
Returns:
the result of query

setCode

protected void setCode(java.lang.Object codeValue,
                       int valueEventType)
Sets the code in function of event value.

Parameters:
codeValue - the value to set
valueEventType - the type of event
See Also:
setValue(Object, boolean)

getValue

public java.lang.Object getValue()
Description copied from interface: DataComponent
Gets the value of a component.

Specified by:
getValue in interface DataComponent
Returns:
the object with value.

setValue

public void setValue(java.lang.Object value)
Description copied from interface: DataComponent
Sets the value for component.

Specified by:
setValue in interface DataComponent
Parameters:
value - the object with value to set

setValue

public void setValue(java.lang.Object value,
                     boolean inner)
Establishes the field value. An object that will be an hashtable, whose keys are the code field name and description columns. Values may be vectors, in this case the first element is selected.


getCodeDescription

protected java.lang.String getCodeDescription(java.lang.Object code,
                                              java.util.Hashtable value)
Obtains the code description.

Parameters:
code - the object to search in hashtable parameter
value - the hashtable with all codes
Returns:
the code description

toString

protected java.lang.String toString(java.lang.Object v)
Checks whether parameter is a string or a date.

Parameters:
v - the object to convert
Returns:
the string conversion

getSQLDataType

public int getSQLDataType()
Returns the SQL type of varchar or integer in function of integerValue.

Specified by:
getSQLDataType in interface DataComponent
Returns:
the sql data type

setReferenceLocator

public void setReferenceLocator(EntityReferenceLocator locator)
Description copied from interface: ReferenceComponent
Establishes the reference locator that will be used by component. This method is automatically called by Form when it is being loaded.

Specified by:
setReferenceLocator in interface ReferenceComponent
Parameters:
locator - a reference locator to set in component

registerParentkeyValueChangeListeners

public void registerParentkeyValueChangeListeners()

isParentkeyListener

public boolean isParentkeyListener()

setParentkeyListener

public void setParentkeyListener(boolean parentkeyListener)

setParentFrame

public void setParentFrame(java.awt.Frame frame)
Description copied from interface: OpenDialog
This method is called from Form for each component that implements this interface. It fixes the parent frame for element. This frame is needed to open the modal dialog.

Specified by:
setParentFrame in interface OpenDialog
Parameters:
frame - the frame

free

public void free()
          throws java.lang.Exception
Description copied from interface: Freeable
Makes the object to release the resources.

Specified by:
free in interface Freeable
Throws:
java.lang.Exception

setParentForm

public void setParentForm(Form f)
Description copied from interface: AccessForm
Method declaration to set the form that contains the component. This method must be called automatically during the form building.

Specified by:
setParentForm in interface AccessForm
Overrides:
setParentForm in class DataField

setFormBuilder

public void setFormBuilder(FormBuilder builder)
Specified by:
setFormBuilder in interface CreateForms

setEnabled

public void setEnabled(boolean en)
Description copied from interface: FormComponent
Description method to set enabled or not the component according the boolean condition in parameter.

Specified by:
setEnabled in interface FormComponent
Overrides:
setEnabled in class DataField
Parameters:
en - the condition to set enable

updateBackgroundColor

protected void updateBackgroundColor()
Updates the background color.

Overrides:
updateBackgroundColor in class DataField

deleteData

public void deleteData()
Description copied from interface: DataComponent
The method to delete data for component.

Specified by:
deleteData in interface DataComponent
Overrides:
deleteData in class TextFieldDataField

deleteData

public void deleteData(boolean clearCode)

deleteUserData

protected void deleteUserData(boolean clearcode)
Deletes the user data in code field.


deleteUserData

protected void deleteUserData()
Deletes the user data in code field.


isModified

public boolean isModified()
Description copied from interface: DataComponent
This method should be return true when data have been modified. The method setValue() should be change this condition.

Specified by:
isModified in interface DataComponent
Overrides:
isModified in class DataField

setResourceBundle

public void setResourceBundle(java.util.ResourceBundle resources)
Description copied from interface: Internationalization
Sets the language resource bundle. When the application changes the configured language, for all the objects that implement this interface this method must be called with the new file.
The method must translate all the elements that have texts in the GUI

Specified by:
setResourceBundle in interface Internationalization
Overrides:
setResourceBundle in class DataField

getAttribute

public java.lang.Object getAttribute()
Description copied from interface: IdentifiedElement
Gets the object attribute. This attribute allows to identify the object

Specified by:
getAttribute in interface IdentifiedElement
Overrides:
getAttribute in class TextFieldDataField

getCodeFieldName

public java.lang.String getCodeFieldName()
Gets the code field name

Specified by:
getCodeFieldName in interface ReferenceDataComponent
Returns:
the code
See Also:
code

requestFocus

public void requestFocus()
Overrides:
requestFocus in class DataField

getTextsToTranslate

public java.util.Vector getTextsToTranslate()
Gets the text to translate

Specified by:
getTextsToTranslate in interface Internationalization
Overrides:
getTextsToTranslate in class DataField
Returns:
the vector with elements to translate

getCodeValues

public java.util.Hashtable getCodeValues(java.lang.Object code)
Returns the combo values associated to code. Returns key-values pairs.

Parameters:
code - the object to find
Returns:
the hashtable with key-values

getDataCache

public java.util.Hashtable getDataCache()
Gets the data cache.

Returns:
the data cache

initCache

public void initCache()
Inits the cache. If there are not parentkeys, cachemanager is used.


getLastCacheTime

protected long getLastCacheTime()
Gets the last cache time

Returns:
the last cache time
See Also:
lastCacheTime

invalidateCache

public void invalidateCache()
Invalidate cache setting to 0 the lastCacheTime.


getParentKeys

public java.util.Vector getParentKeys()
Returns the parentkeys.

Returns:
the vector with parentkeys

getParentkeyEquivalences

public java.util.Hashtable getParentkeyEquivalences()
Returns a Hashtable with key-value corresponding with result to apply two 'tokenizer' actions over parentkeys parameter. For example,

string="formfieldpk1:equivalententityfieldpk1;formfieldpk2:equivalententityfieldpk2;...;formfieldpkn:equivalententityfieldpkn"

returns Hashtable:

{ formfieldpk1 equivalententityfieldpk1}
{ formfieldpk2 equivalententityfieldpk2}
{ ... ... }
{ formfieldpkn equivalententityfieldpkn}

Returns:
Hashtable with key-value

hasParentKeys

public boolean hasParentKeys()
Specified by:
hasParentKeys in interface IFilterElement

getParentKeyValues

public java.util.Hashtable getParentKeyValues()
Specified by:
getParentKeyValues in interface IFilterElement

setCacheManager

public void setCacheManager(CacheManager cm)
Sets the CacheManager.

Specified by:
setCacheManager in interface CachedComponent

getAttributes

public java.util.Vector getAttributes()
Gets Attributes from table.

Specified by:
getAttributes in interface CachedComponent
Returns:
the vector with attributes

getEntity

public java.lang.String getEntity()
The entity name.

Specified by:
getEntity in interface CachedComponent
Returns:
the entityName

fireValueChanged

protected void fireValueChanged(java.lang.Object newValue,
                                java.lang.Object oldValue,
                                int type)
Description copied from class: DataField
Detects fire value events.

Overrides:
fireValueChanged in class DataField
Parameters:
newValue - the new value
oldValue - the previous value
type - the type of value event

installFocusListener

protected void installFocusListener()
Description copied from class: DataField
Adds the focus listener to the data field.

Overrides:
installFocusListener in class DataField

setFilter

public void setFilter(java.lang.String column,
                      java.lang.Object[] values,
                      int condition)
Applies a filter to a specified column.

Parameters:
column - the name of column
values - the object array to apply filter
condition - the condition to filter

resetFilter

public void resetFilter()
Removes all the filters set to a table.


clearQuickFilter

public void clearQuickFilter()

populateTable

protected void populateTable()
                      throws java.lang.Exception
Fills the table.

Throws:
java.lang.Exception - when exception occurs

createDataField

protected void createDataField()
Creates a data field that focus is not supported.

Overrides:
createDataField in class TextFieldDataField
See Also:
Component.isFocusTraversable()

initPreferences

public void initPreferences(ApplicationPreferences prefs,
                            java.lang.String user)
Inits the user and application preferences.

Specified by:
initPreferences in interface HasPreferenceComponent
Overrides:
initPreferences in class DataField

createMultipleResultsWindow

protected void createMultipleResultsWindow(Table t)
Creates the multiple result window.

Parameters:
t - the table

setInnerListenerEnabled

protected void setInnerListenerEnabled(boolean enabled)
Description copied from class: TextFieldDataField
Enable or disable the intern value events notification.

Overrides:
setInnerListenerEnabled in class TextFieldDataField
Parameters:
enabled - the enabled condition

getTable

public Table getTable()
Gets the reference to the table.


getMultipleResultTable

public Table getMultipleResultTable()
Gets the reference to table with multiple results.


getCodeField

public javax.swing.JTextField getCodeField()
Returns the codeField.

Specified by:
getCodeField in interface ReferenceDataComponent
Returns:
a Jcomponent with code field.

getResultDialogSizePreferenceKey

public java.lang.String getResultDialogSizePreferenceKey()
Deprecated.  

Returns a string with preference key about dialog size.


getSearchDialogSizePreferenceKey

public java.lang.String getSearchDialogSizePreferenceKey()
Returns a string with preference key about dialog search.


installPopupMenuListener

protected void installPopupMenuListener()
Installs a pop-up menu listener.

Overrides:
installPopupMenuListener in class DataField
See Also:
MouseListener

installPreferenceHelpListener

protected void installPreferenceHelpListener()
Adds a help listener

Overrides:
installPreferenceHelpListener in class DataField

isClearDetailTableQuickFilterWhenShow

public boolean isClearDetailTableQuickFilterWhenShow()
Returns the condition expressed in parameter 'clearquickfilter'. When it is true, quickfilter field will be showed empty when result table is showed. When it is false, the last filter typed is maintained in quickfilter.

Returns:
condition about clear quickfilter

getParentKeyList

public java.util.Vector getParentKeyList()
Specified by:
getParentKeyList in interface IFilterElement

getDeleteButton

public javax.swing.JButton getDeleteButton()

getQueryButton

public javax.swing.JButton getQueryButton()

getCodeSearchFieldName

public java.lang.String getCodeSearchFieldName()
Description copied from interface: ReferenceDataComponent
Gets the code search field name.

Specified by:
getCodeSearchFieldName in interface ReferenceDataComponent
Returns:
a String with the search field name.

isCodeFieldVisible

public boolean isCodeFieldVisible()
Description copied from interface: ReferenceDataComponent
Checks whether the codefield is visible.

Specified by:
isCodeFieldVisible in interface ReferenceDataComponent
Returns:
a boolean

isCodeSearchVisible

public boolean isCodeSearchVisible()
Description copied from interface: ReferenceDataComponent
Checks whether the code search is visible.

Specified by:
isCodeSearchVisible in interface ReferenceDataComponent
Returns:
true if the code search is visible.

getTemplateDataType

public int getTemplateDataType()
Description copied from interface: ITemplateField
Returns the data type. The values that can return are: ITemplateField.DATA_TYPE_FIELD ITemplateField.DATA_TYPE_IMAGE ITemplateField.DATA_TYPE_TABLE

Specified by:
getTemplateDataType in interface ITemplateField
Returns:
a int with the data type.

getTemplateDataValue

public java.lang.Object getTemplateDataValue()
Description copied from interface: ITemplateField
Gets the value to show in the template

Specified by:
getTemplateDataValue in interface ITemplateField
Returns:

Ontimize