Ontimize 5.2072EN

com.ontimize.gui.field
Class MultipleReferenceDataField

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.AbstractMultipleReferenceDataField
                          extended bycom.ontimize.gui.field.MultipleReferenceDataField
All Implemented Interfaces:
AccessForm, javax.accessibility.Accessible, ApplicationPreferencesListener, CachedComponent, CreateForms, DataComponent, java.util.EventListener, FormComponent, HasHelpIdComponent, HasPreferenceComponent, IdentifiedElement, java.awt.image.ImageObserver, Internationalization, java.awt.MenuContainer, OpenDialog, ReferenceComponent, SecureElement, java.io.Serializable, ValueChangeDataComponent

public class MultipleReferenceDataField
extends AbstractMultipleReferenceDataField

This class provides an implementation of an AbstractMultipleReferenceDataField.

Author:
Imatia Innovation
See Also:
Serialized Form

Nested Class Summary
protected  class MultipleReferenceDataField.DocumentInnerListener
          Creates a document inner listener.
protected  class MultipleReferenceDataField.TableWindow
          This class implements a table window in a dialog.
 
Nested classes inherited from class com.ontimize.gui.field.AbstractMultipleReferenceDataField
AbstractMultipleReferenceDataField.CEJTextField, AbstractMultipleReferenceDataField.CodFieldListener, AbstractMultipleReferenceDataField.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 static java.lang.String auxCodeLabelKey
          A key for search operation.
protected  javax.swing.JButton deleteButton
          An instance for a delete button.
protected  javax.swing.JButton okButton
          A reference for the ok button.
protected  java.awt.event.ActionListener queryListener
          An instance of query listener.
protected  javax.swing.JButton refreshCacheButton
          The reference for refreshing the cache button.
protected  javax.swing.JButton searchButton
          An instance for a search button.
protected  boolean showButtons
           
protected  Table t
          The reference for the table.
protected  MultipleReferenceDataField.TableWindow tableWindow
          An instance for a table Window.
protected  java.lang.String windowTitle
          The window title.
 
Fields inherited from class com.ontimize.gui.field.AbstractMultipleReferenceDataField
cacheManager, cacheTime, CACHETIME, codListener, cods, CODS, cols, COLS, dataCache, dataCacheInitialized, entity, ENTITY, formatColumn, initCacheOnSetValue, innerListener, jVisibleCods, keys, KEYS, lastCacheTime, locator, ONSETVALUESET, onsetvaluesetAttributes, PARENT_CODS, PARENT_KEYS, parentCods, parentkeyCache, PARENTKEYCACHE, parentkeys, separator, typecods, TYPECODS, useCacheManager, value, valueEventDisabled, visibleCods, VISIBLECODS, visiblesize
 
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.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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, PROPERTIES, SOMEBITS
 
Constructor Summary
MultipleReferenceDataField(java.util.Hashtable parameters)
          The class constructor.
 
Method Summary
protected  void createAdditionalComponents()
          Creates additional components like magnifying glass button, delete button and search button.
protected  void createComponent()
          Creates component.
 javax.swing.JButton getDeleteButton()
           
 javax.swing.JButton getSearchButton()
           
 java.lang.String getSearchDialogSizePreferenceKey()
          Gets the size preference key for search dialog.
 void init(java.util.Hashtable parameters)
          Initializes parameters.
protected  void installInnerListener()
          Installs an inner listener for field.
protected  void populateTable()
          Fills the table.
 void setEnabled(boolean enabled)
          Description method to set enabled or not the component according the boolean condition in parameter.
 void setFormatValue(java.lang.Object value)
           
 void setParentForm(Form parentForm)
          Method declaration to set the form that contains the component.
 void setResourceBundle(java.util.ResourceBundle resources)
          Sets the language resource bundle.
 
Methods inherited from class com.ontimize.gui.field.AbstractMultipleReferenceDataField
addFormat, compareMultipleValue, createCodeComponents, deleteData, deleteUserData, deleteUserData, enableInnerListener, free, getAttributes, getCodData, getDescription, getEntity, getFormat, getInnerValue, getLastCacheTime, getParentKeyValues, getSQLDataType, getSQLType, getValue, getValuesToCode, hasParentKeys, initCache, invalidateCache, isEmpty, queryByCode, setCacheManager, setCode, setFormatCods, setFormBuilder, setInnerValue, setParentFrame, setReferenceLocator, setValue, setValue, updateOnSetValueSetAttributes
 
Methods inherited from class com.ontimize.gui.field.DataField
addFocusListener, addHelpMenuPopup, addValueChangeListener, changeButton, changeOpacity, checkDefineHelpPermission, checkEnabledPermission, checkVisiblePermission, configurePopupMenuHelp, createFocusListener, createInstanceConditionCombo, createPopupMenu, defineHelpField, finalize, fireValueChanged, getAttribute, getBorder, getConstraints, getDataField, getDisabledbgcolor, getFontColor, getHelpIdString, getHelpPreferenceKey, getLabelComponent, getLabelComponentText, getLabelFontColor, getLabelText, getParentForm, getPreferenceHelpText, getText, getTextsToTranslate, getValueChangeListeners, hasHelpInPreferences, initPermissions, initPreferences, installFocusListener, installHelpId, installPopupMenuListener, installPreferenceHelpListener, isAdvancedQueryMode, isEnabled, isHidden, isLabelVisible, isModifiable, isModified, isRequired, isRestricted, parseBoolean, preferenceChanged, removeFocusListener, removeValueChangeListener, requestFocus, seeHelpField, setBold, setComponentLocale, setDisabledbgcolor, setFont, setFontColor, setFontSize, setLabelFontColor, setModifiable, setRequired, setRequiredFieldBackground, setVisible, showPopupMenu, updateBackgroundColor, 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.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
getTextsToTranslate, setComponentLocale
 
Methods inherited from interface com.ontimize.gui.field.IdentifiedElement
getAttribute
 
Methods inherited from interface com.ontimize.gui.SecureElement
initPermissions, isRestricted
 

Field Detail

searchButton

protected javax.swing.JButton searchButton
An instance for a search button.


deleteButton

protected javax.swing.JButton deleteButton
An instance for a delete button.


tableWindow

protected MultipleReferenceDataField.TableWindow tableWindow
An instance for a table Window. By default, null.


okButton

protected javax.swing.JButton okButton
A reference for the ok button. By default, null.


showButtons

protected boolean showButtons

refreshCacheButton

protected javax.swing.JButton refreshCacheButton
The reference for refreshing the cache button. By default, null.


t

protected Table t
The reference for the table.


windowTitle

protected java.lang.String windowTitle
The window title.


auxCodeLabelKey

protected static java.lang.String auxCodeLabelKey
A key for search operation.


queryListener

protected java.awt.event.ActionListener queryListener
An instance of query listener.

Constructor Detail

MultipleReferenceDataField

public MultipleReferenceDataField(java.util.Hashtable parameters)
                           throws java.lang.Exception
The class constructor. Initializes parameters, installs inner listeners and creates additional components.

Parameters:
parameters - the Hashtable with parameters
Method Detail

init

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

Specified by:
init in interface FormComponent
Overrides:
init in class AbstractMultipleReferenceDataField
Parameters:
parameters - The Hashtable with additional parameters:

attribute values default required meaning
buttons yes/no yes no Show/Hide search and delete buttons
title entity no The title for window.
opaquebuttons yes/no no no Opacity condition for buttons showed with this field
numrowscolumn yes/no no no Shows or hide a column containing the row numumber in the result table
controlsvisible yes/no no no Shows or hide the table controls in the result table
autoadjustheader yes/no yes Allows the TableHeader to adjusts its height to the FontText in order to see the the text when the font size changes.
rows Integer 15 Default width for the table header

createComponent

protected void createComponent()
Description copied from class: AbstractMultipleReferenceDataField
Creates component. Empty method.

Overrides:
createComponent in class AbstractMultipleReferenceDataField

installInnerListener

protected void installInnerListener()
Installs an inner listener for field.


createAdditionalComponents

protected void createAdditionalComponents()
Creates additional components like magnifying glass button, delete button and search button.


populateTable

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

Throws:
java.lang.Exception - when an Exception occurs

getSearchDialogSizePreferenceKey

public java.lang.String getSearchDialogSizePreferenceKey()
Gets the size preference key for search dialog.

Returns:
the size preferences

setFormatValue

public void setFormatValue(java.lang.Object value)
Specified by:
setFormatValue in class AbstractMultipleReferenceDataField

setParentForm

public void setParentForm(Form parentForm)
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

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

setEnabled

public void setEnabled(boolean enabled)
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:
enabled - the condition to set enable

getSearchButton

public javax.swing.JButton getSearchButton()

getDeleteButton

public javax.swing.JButton getDeleteButton()

Ontimize