|
Ontimize 5.2071EN | |||||||||
| 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.AbstractMultipleReferenceDataField
Abstract class that implements a Multiple Reference Data Field.
| Nested Class Summary | |
protected class |
AbstractMultipleReferenceDataField.CEJTextField
The main class to create the EJTextField |
protected class |
AbstractMultipleReferenceDataField.CodFieldListener
The main class to create a listener in a cod. |
protected static interface |
AbstractMultipleReferenceDataField.InnerListener
Interface to implement inner listener methods. |
| 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 CacheManager |
cacheManager
A reference to cache manager. |
protected int |
cacheTime
Defines the cache time. |
static java.lang.String |
CACHETIME
Cachetime property. |
protected AbstractMultipleReferenceDataField.CodFieldListener |
codListener
An instance of cod field listener. |
protected java.util.ArrayList |
cods
An ArrayList where will be inserted the data field names of codes |
static java.lang.String |
CODS
Cods property. |
protected java.util.ArrayList |
cols
|
static java.lang.String |
COLS
Cols property. |
protected java.util.Hashtable |
dataCache
A data cache. |
protected boolean |
dataCacheInitialized
The condition about data cache initialization. |
protected java.lang.String |
entity
|
static java.lang.String |
ENTITY
Entity property |
protected java.util.Hashtable |
formatColumn
The format column. |
protected boolean |
initCacheOnSetValue
The condition to initialize cache on setValue. |
protected AbstractMultipleReferenceDataField.InnerListener |
innerListener
A reference to inner Listener. |
protected java.util.Hashtable |
jVisibleCods
An hashtable to put the visible key-component pairs. |
protected java.util.ArrayList |
keys
The reference to keys. |
static java.lang.String |
KEYS
Keys property. |
protected long |
lastCacheTime
The last cache time. |
protected EntityReferenceLocator |
locator
The Entity reference Locator that provides a locator to this entity |
static java.lang.String |
ONSETVALUESET
Typecods property. |
protected java.util.List |
onsetvaluesetAttributes
The vector with attributes to update when data field value changed. |
static java.lang.String |
PARENT_CODS
Parentcods property. |
static java.lang.String |
PARENT_KEYS
Parentkeys property. |
protected java.util.ArrayList |
parentCods
The reference to parent cods. |
protected boolean |
parentkeyCache
|
static java.lang.String |
PARENTKEYCACHE
|
protected java.util.ArrayList |
parentkeys
The reference to parent keys. |
protected java.lang.String |
separator
A separator reference. |
protected java.util.ArrayList |
typecods
An ArrayList where the possible types of codes will be inserted. |
static java.lang.String |
TYPECODS
Typecods property. |
protected boolean |
useCacheManager
The condition to use cache manager. |
protected java.lang.Object |
value
A reference to a value object. |
protected boolean |
valueEventDisabled
The condition to disable events. |
protected java.util.ArrayList |
visibleCods
An ArrayList where the visible column codes will be inserted . |
static java.lang.String |
VISIBLECODS
Visiblecods property. |
protected java.util.Hashtable |
visiblesize
An hashtable to put the visible parameters-position in multiple data field |
| 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 | |
AbstractMultipleReferenceDataField()
|
|
| Method Summary | |
protected void |
addFormat(java.lang.String column,
java.text.Format format)
Adds the format to columns. |
static boolean |
compareMultipleValue(java.lang.Object v1,
java.lang.Object v2,
java.util.List keys)
Compares multiple values from key list. |
protected void |
createCodeComponents()
Creates a code component. |
protected void |
createComponent()
Creates component. |
void |
deleteData()
Deletes data. |
void |
deleteUserData()
Deletes the user data. |
protected void |
deleteUserData(boolean withcods)
Deletes the user data. |
protected void |
enableInnerListener(boolean enable)
Enables the inner listener. |
void |
free()
|
java.util.Vector |
getAttributes()
Gets the vector with all columns and keys. |
protected java.lang.Object |
getCodData(java.lang.Integer type,
java.lang.String value)
Gets the cod data to check type. |
protected java.lang.String |
getDescription(java.lang.Object value)
Gets the description for all columns in multiple value object. |
java.lang.String |
getEntity()
|
protected java.text.Format |
getFormat(java.lang.String column)
Gets the format to column. |
protected java.lang.Object |
getInnerValue()
Gets the inner value. |
protected long |
getLastCacheTime()
|
java.util.Hashtable |
getParentKeyValues()
|
int |
getSQLDataType()
Returns the sql data type according to java.sql.Types
|
protected java.lang.Integer |
getSQLType(java.lang.String s)
Checks whether data are integer, string or float, in other case returns an integer. |
java.lang.Object |
getValue()
Gets the value of a component. |
java.util.Hashtable |
getValuesToCode(java.lang.Object code)
Returns the associated values for a code to set in onsetvalueset attributes. |
boolean |
hasParentKeys()
|
void |
init(java.util.Hashtable parameters)
Initializes parameters and throws IllegalArgumentException when required parameters are not present.
|
void |
initCache()
Initializes cache. |
void |
invalidateCache()
Invalidates the cache. |
boolean |
isEmpty()
Checks the data existence in component. |
protected EntityResult |
queryByCode(java.lang.Object value)
Prepares the object value to perform a query by code. |
void |
setCacheManager(CacheManager c)
|
protected void |
setCode(java.lang.Object codeValue,
int valueEventType)
Sets a code to object. |
void |
setFormatCods(java.lang.Object value)
Sets the format to visible cods. |
protected abstract void |
setFormatValue(java.lang.Object originalValue)
|
void |
setFormBuilder(FormBuilder constructor)
|
protected void |
setInnerValue(java.lang.Object o)
Sets the inner value. |
void |
setParentFrame(java.awt.Frame parentFrame)
This method is called from Form for each component that implements this interface. |
void |
setReferenceLocator(EntityReferenceLocator referenceLocator)
Establishes the reference locator that will be used by component. |
void |
setValue(java.lang.Object originalValue)
Sets the value for component. |
void |
setValue(java.lang.Object originalValue,
boolean intern)
Sets the value to object. |
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 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, setEnabled, setVisible |
| Methods inherited from interface com.ontimize.gui.i18n.Internationalization |
getTextsToTranslate, setComponentLocale, setResourceBundle |
| Methods inherited from interface com.ontimize.gui.field.IdentifiedElement |
getAttribute |
| Methods inherited from interface com.ontimize.gui.SecureElement |
initPermissions, isRestricted |
| Field Detail |
public static final java.lang.String CODS
public static final java.lang.String TYPECODS
public static final java.lang.String ONSETVALUESET
public static final java.lang.String PARENT_CODS
public static final java.lang.String VISIBLECODS
public static final java.lang.String KEYS
public static final java.lang.String PARENT_KEYS
public static final java.lang.String COLS
public static final java.lang.String ENTITY
public static final java.lang.String CACHETIME
public static final java.lang.String PARENTKEYCACHE
protected boolean parentkeyCache
protected EntityReferenceLocator locator
protected java.util.List onsetvaluesetAttributes
protected java.util.ArrayList cods
protected java.util.ArrayList typecods
Arraylist cods.
protected java.util.ArrayList visibleCods
protected java.util.Hashtable jVisibleCods
protected java.util.Hashtable visiblesize
protected java.util.ArrayList parentCods
protected java.util.ArrayList keys
protected java.util.ArrayList parentkeys
protected java.util.ArrayList cols
protected java.lang.String separator
protected java.lang.Object value
protected java.lang.String entity
protected int cacheTime
Integer.MAX_VALUE
protected long lastCacheTime
protected boolean dataCacheInitialized
protected java.util.Hashtable dataCache
protected boolean initCacheOnSetValue
protected boolean useCacheManager
protected CacheManager cacheManager
protected java.util.Hashtable formatColumn
protected boolean valueEventDisabled
protected AbstractMultipleReferenceDataField.InnerListener innerListener
protected AbstractMultipleReferenceDataField.CodFieldListener codListener
| Constructor Detail |
public AbstractMultipleReferenceDataField()
| Method Detail |
protected void createComponent()
protected void createCodeComponents()
visibleCods,visiblesize and adds listeners.
public void init(java.util.Hashtable parameters)
IllegalArgumentException when required parameters are not present.
init in interface FormComponentinit in class DataFieldparameters - the Hashtable with parameters
| attribute | values | default | required | meaning |
| attr | yes | An AbstractMultipleReferenceDataField object. It is used to get a reference for field
|
||
| keys | key1;key2;...;keyn | yes | This attribute contains columns that are keys in entity of current form. | |
| cods | cod1;cod2;...;codn | keys | yes | This parameter refers to the keys of entity that is queried. We need keys and cods because, keys in entity and form accept different names. |
| visiblecods | vcod1;vcod2;...;vcodn | no | The number of boxes showed on the left of description field. Each visible cods is used to select an individual cod. | |
| typecods | vtcod1;vtcod2;...;vtcodn | Integer | no | The class type of cods. To indicate other types for cods, they should be ordered like cods |
| parentkeys | pk1;pk2;...;pkn | parentcods | no | Attribute used to filter MultipleReferenceDataField. It will contain all attributes whose values will be extracted of current form to filter the field. |
| parentcods | pcod1;pcod2;...;pcodn | parentkeys | no | This parameter refers to the parentkeys of entity that is queried. Sometimes, we need parentkeys and parentcods because columns in entity and form accept different names. This parameter must be ordered in same manner that parentkeys, to establish the correspondence position by position. |
| entity | yes | The entity to obtain the data | ||
| cols | col1;col2;...;coln | yes | The cols to show both in description of field and in table to select records. | |
| onsetvalueset | Field attributes whose value will be set when field data change. |
protected java.lang.Integer getSQLType(java.lang.String s)
s - the data type
protected void updateOnSetValueSetAttributes(java.util.Hashtable data)
onsetvaluesetAttributes
data - Values to updatepublic java.util.Hashtable getValuesToCode(java.lang.Object code)
code - the object where code are specified
protected java.lang.Object getCodData(java.lang.Integer type,
java.lang.String value)
throws java.lang.Exception
type - the cod data type.value - the string to check cod data.
Types
java.lang.Exception - when Exception occurs.public int getSQLDataType()
DataComponentsql data type according to java.sql.Types
getSQLDataType in interface DataComponentInteger typeprotected long getLastCacheTime()
public java.lang.Object getValue()
DataComponent
getValue in interface DataComponentobject with value.public void setValue(java.lang.Object originalValue)
DataComponent
setValue in interface DataComponentoriginalValue - the object with value to set
public void setValue(java.lang.Object originalValue,
boolean intern)
originalValue - the object to set valueintern - the condition about intern listener state.protected abstract void setFormatValue(java.lang.Object originalValue)
public void setFormatCods(java.lang.Object value)
value - the object to set the cods.public void setReferenceLocator(EntityReferenceLocator referenceLocator)
ReferenceComponent
setReferenceLocator in interface ReferenceComponentreferenceLocator - a reference locator to set in componentpublic void setParentFrame(java.awt.Frame parentFrame)
OpenDialog
setParentFrame in interface OpenDialogparentFrame - the frame
public void free()
throws java.lang.Exception
java.lang.Exceptionpublic void setFormBuilder(FormBuilder constructor)
setFormBuilder in interface CreateFormspublic java.lang.String getEntity()
getEntity in interface CachedComponentpublic void setCacheManager(CacheManager c)
setCacheManager in interface CachedComponentpublic boolean isEmpty()
DataComponent
isEmpty in interface DataComponenttrue when component is emptypublic java.util.Vector getAttributes()
getAttributes in interface CachedComponentpublic void initCache()
public void invalidateCache()
dataCacheInitialized to false.
protected EntityResult queryByCode(java.lang.Object value)
value - the object to query
public void deleteData()
null in all formats (value and cods).
- Specified by:
deleteData in interface DataComponent
public void deleteUserData()
deleteUserData(boolean) with true parameter.
protected void deleteUserData(boolean withcods)
withcods - the cods or no cods presenceprotected java.lang.String getDescription(java.lang.Object value)
value - the multiple value object to get description
protected java.text.Format getFormat(java.lang.String column)
column - the name of column
protected void addFormat(java.lang.String column,
java.text.Format format)
column - the columnformat - the format to applyprotected void enableInnerListener(boolean enable)
enable - the condition to enable the listenerprotected java.lang.Object getInnerValue()
protected void setInnerValue(java.lang.Object o)
o - the object to set the inner value.
protected void setCode(java.lang.Object codeValue,
int valueEventType)
setValue(Object) after looking the data cache or
the queryByCode(Object).
codeValue - the hashtable to set the multiple valuevalueEventType - the value event type
public static boolean compareMultipleValue(java.lang.Object v1,
java.lang.Object v2,
java.util.List keys)
v1 - the object 1v2 - the object 2keys - the list of keys
public boolean hasParentKeys()
public java.util.Hashtable getParentKeyValues()
|
Ontimize | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||