public class ReferenceExtDataField extends TextFieldDataField implements OpenDialog, Internationalization, Freeable, CreateForms, CachedComponent, IFilterElement, ReferenceDataComponent, ITemplateField
ReferenceDataField functionalities.ReferenceDataField,
Serialized Form| Modifier and Type | Class and Description |
|---|---|
protected class |
ReferenceExtDataField.CodeFieldListener
The code field listener to manage the codeChange value in function of
events.
|
protected class |
ReferenceExtDataField.DownAction |
protected class |
ReferenceExtDataField.ExecuteQuery |
protected static class |
ReferenceExtDataField.MultipleResultWindow
The main class to manage a multiple result window in a Reference Ext
datafield.
|
protected class |
ReferenceExtDataField.OpenDetailMouseListener |
protected class |
ReferenceExtDataField.QueryDocumentListener |
static class |
ReferenceExtDataField.QueryModel |
static class |
ReferenceExtDataField.QueryPopup |
static class |
ReferenceExtDataField.ResultItem |
protected class |
ReferenceExtDataField.SelectAction |
protected class |
ReferenceExtDataField.TableWindow
The main class to shows a table in a window.
|
protected class |
ReferenceExtDataField.UpAction |
TextFieldDataField.EJTextField, TextFieldDataField.InnerDocumentListenerDataField.AuxPanel, DataField.CopyActionListener, DataField.ELabel, DataField.FieldButton, DataField.FieldFocusListener, DataField.InfoMouseListener, DataField.ToggleButtonJPanel.AccessibleJPanelJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
protected String |
attrAux
The auxiliary attributes.
|
protected static String |
auxCodeLabelKey
The search key.
|
protected DateDocument |
auxDateDoc
An auxiliary date document.
|
static String |
BIG_DECIMAL
Deprecated.
|
static int |
BIG_DECIMAL_
Deprecated.
|
static String |
BIG_INTEGER
Deprecated.
|
static int |
BIG_INTEGER_
Deprecated.
|
protected CacheManager |
cacheManager
The cache manager.
|
protected int |
cacheTime
The cache time.
|
static String |
CLEAR_QUICK_FILTER |
protected boolean |
clearDetailTableQuickFilterWhenShow |
protected String |
code
The code.
|
protected 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 String |
codeQueryField
The code query field key.
|
protected Object |
codeValue
The code value.
|
protected 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 String |
DATEFORMAT
Date format pattern string key to convert the data field dates values.
|
static boolean |
defaultDescriptionQuery |
static boolean |
defaultDisableOnParentkeyNull |
static boolean |
defaultIgnoreNullOnSetValueSet |
static boolean |
defaultParentkeyListener |
static String |
defaultParentkeyListenerEvent |
protected JButton |
deleteButton
The Field button for delete.
|
protected Vector |
descriptionColumns
The description columns vector.
|
protected boolean |
descriptionFieldVisible
The condition of field description visibility.
|
protected boolean |
descriptionQuery
The condition of query description.
|
protected boolean |
descriptionValue
The description value condition.
|
static 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 String |
DOUBLE
Deprecated.
|
static int |
DOUBLE_
Deprecated.
|
protected String |
entityName
The entity name.
|
static String |
FORMAT
Format pattern string key to convert the data field content value.
|
protected FormatPattern |
formatPattern
Pattern to format the field contents.
|
protected Hashtable |
hOnSetValueSetEquivalences
This object is used to store onsetvalueset attributes and equivalences
(for these fields in entity) when structure of parameter
onsetvalueset is:
"fieldonset1:fieldentitypk1;fieldonset2:fieldentitypk2;...fieldonsetn:fieldentitypkn" |
protected Hashtable |
hParentkeyEquivalences
This object is used to store parentkeys and equivalences (for these
fields in entity) when structure of parameter
parentkeys is:
"fieldpk1:fieldentitypk1;fieldpk2:fieldentitypk2;...fieldpkn:fieldentitypkn" |
static String |
IGNORE_NULL_ONSETVALUESET
Key used for xml parameter 'ignorenullonsetvalueset'
|
protected boolean |
ignorenullonsetvalueset
Indicates if fields contained into 'onsetvalueset' have to be deleted on
null value of the field.
|
protected String |
iMask
The iMask key.
|
protected boolean |
initCacheOnSetValue
The condition to initialize cache on setvalue method.
|
static String |
INTEGER
Deprecated.
|
static int |
INTEGER_
Deprecated.
|
protected boolean |
integerValue
The integer value condition.
|
protected long |
lastCacheTime
The last cache time.
|
protected EntityReferenceLocator |
locator
The locator.
|
static String |
LONG
Deprecated.
use
ParseUtils.LONG |
static int |
LONG_
Deprecated.
use
ParseUtils.LONG_ |
protected ReferenceExtDataField.MultipleResultWindow |
multipleResultWindow
The reference to multiple result window.
|
static 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 JButton |
okButton
The ok button.
|
protected Vector |
onsetvaluesetAttributes
The vector with attributes to update when data field value changed.
|
protected Vector |
othersParentKey
The others parent keys in a 1x3 Vector.
|
protected Frame |
parentFrame
The parent Frame.
|
static String |
PARENTKEY_LISTENER |
static String |
PARENTKEY_LISTENER_EVENT
Key used for xml parameter 'parentkeylistenerevent'
|
static String |
PARENTKEY_LISTENER_EVENT_ALL |
static String |
PARENTKEY_LISTENER_EVENT_PROGRAMMATIC |
static String |
PARENTKEY_LISTENER_EVENT_USER |
protected boolean |
parentkeyCache |
protected 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 String |
parentkeyListenerEvent
Indicates the type of event that is taken into consideration on parentkey
listener changes.
|
protected String |
parentKeys
The parentkeys.
|
static String |
propUserSelection
The UserSelection property.
|
protected JButton |
queryButton
The Field button for query.
|
protected List<String> |
queryColumns |
protected DocumentListener |
queryDocumentListener |
protected ActionListener |
queryListener
A listener for query operation.
|
protected ReferenceExtDataField.QueryPopup |
queryPopup |
protected static String |
RECORD_NOT_FOUND_ERROR_MESSAGE |
static String |
REFERENCEEXT_CODE_NAME |
static String |
REFERENCEEXT_NAME
The name of class.
|
protected JButton |
refreshCacheButton
The reference for a refresh cache button.
|
static String |
RESULTS_DIALOG_SIZE_POSITION
The results_dialog_size_position property.
|
protected static String |
ResultSelectionInfoKey
The result selection key.
|
static String |
SEARCH_DIALOG_SIZE_POSITION
The search_dialog_size_position property.
|
protected String |
separator
A separator.
|
static String |
SHORT
Deprecated.
use
ParseUtils.SHORT |
static int |
SHORT_
Deprecated.
|
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 String |
windowTitle
The window title key.
|
disabledTextColor, innerListeneradvancedQueryMode, ALIGN, ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, alignment, ASTERISK_REQUIRED_STYLE, ATTR, attribute, backgroundColor, BGCOLOR, bold, BOLD, BORDER, BORDER_REQUIRED_STYLE, borderText, BOTTOM, CENTER, CLIPBOARD_COPY, CLIPBOARD_COPY_es_ES, CLIPBOARD_CUT, CLIPBOARD_CUT_es_ES, CLIPBOARD_PASTE, CLIPBOARD_PASTE_es_ES, conditions, dataField, DEFAULT_BORDER, DEFAULT_BOTTOM_MARGIN, DEFAULT_FIELD_LEFT_MARGIN, DEFAULT_FIELD_RIGHT_MARGIN, DEFAULT_LABEL_LEFT_MARGIN, DEFAULT_LABEL_RIGHT_MARGIN, DEFAULT_PARENT_MARGIN, DEFAULT_PARENT_MARGIN_FOR_SCROLL, DEFAULT_TOP_MARGIN, defaultAsteriskColor, DEFAULTBORDER, defaultDisableBackgroundColor, defaultFieldButtonHigh, defaultPreferenceTextNotRetrievedFromPreferences, DEFINE_HELP_FIELD_PREFERENCE, dim, DIM, disabledbgcolor, DISABLEDBGCOLOR, empty, enabled, ENABLED, EXPAND, FIELD_HELP_TIP, fieldlistenerFocus, fieldSize, fireValueEvents, FOCUS_BACKGROUNDCOLOR, FONT, fontColor, FONTCOLOR, fontSize, FONTSIZE, height, HEIGHT, incrementalFont, initPreferenceHelpText, INSETS, isEnabled, LABELALIGN, labelComponent, LABELFONT, LABELFONTCOLOR, labelPosition, LABELPOSITION, LABELSIZE, labelText, LABELVISIBLE, LEFT, locale, LOWERED, menuCopy, menuCut, menuDefineHelpPreference, menuHelpPreferences, menuPaste, modifiable, NO_STR, NONE, noRequiredBorder, OPAQUE, originalSize, OUTBORDER, panel, parentForm, permissionActivate, permissionVisible, popupMenu, PREF_WIDTH, prefWidth, RAISED, redimensionPanel, redimensJTextField, required, REQUIRED, requiredBorder, REQUIREDBORDER, requiredFieldBackgroundColor, requiredFieldForegroundColor, resources, restricted, RIGHT, show, showLabel, SIZE, TEXT_STR, TEXTALIGN, textAlignment, textHelpPreference, TIP, tipKey, TOP, validData, VALIGN, Valignment, valueListener, valueSave, VISIBLE, VISUALIZE_HELP_FIELD_PREFERENCE, weightDataFieldH, weightPanelH, width, WIDTH, x, X, y, Y, YES_STRaccessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTCOMP_FOCUS_YELLOW, GREEN_VERY_LIGHT, LIGHT_GRAY_BLUE, LIGHT_GREYISH_BLUE, VERY_LIGHT_BLUE, VERY_LIGHT_GRAY, VERY_LIGHT_PINK, VERY_LIGHT_RED, VERY_LIGHT_SKYBLUE, VERY_LIGHT_YELLOW, VERY_LIGHT_YELLOW_2DESACTIVATE_COMPONENT_BY_PERMISSION_TIPDEBUG_LANGUAGEDATA_TYPE_FIELD, DATA_TYPE_FIELD_ATTR, DATA_TYPE_IMAGE, DATA_TYPE_IMAGE_ATTR, DATA_TYPE_TABLE, DATA_TYPE_TABLE_ATTR, TEMPLATE_DATA_TYPEABORT, ALLBITS, ERROR, FRAMEBITS, PROPERTIES, SOMEBITS| Constructor and Description |
|---|
ReferenceExtDataField(Hashtable parameters) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
protected MouseListener |
createOpenDetailMouseListener() |
protected void |
createTable(Hashtable parameters)
Encapsulates the process of building result
Table. |
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 void |
deleteUserData(boolean clearcode,
boolean cleardescription) |
protected boolean |
existFieldsToUpdate(Hashtable changes,
Hashtable keys) |
protected void |
fireValueChanged(Object newValue,
Object oldValue,
int type)
Detects fire value events.
|
void |
free()
Makes the object to release the resources.
|
Object |
getAttribute()
Gets the object attribute.
|
Vector |
getAttributes()
Gets Attributes from table.
|
protected String |
getCodeDescription(Object code,
Hashtable value)
Obtains the code description.
|
JTextField |
getCodeField()
Returns the codeField.
|
String |
getCodeFieldName()
Gets the code field name
|
protected Object |
getCodeFieldValue()
Gets the code field value.
|
String |
getCodeSearchFieldName()
Gets the code search field name.
|
Hashtable |
getCodeValues(Object code)
Returns the combo values associated to code.
|
Hashtable |
getDataCache()
Gets the data cache.
|
JButton |
getDeleteButton() |
String |
getEntity()
The entity name.
|
protected long |
getLastCacheTime()
Gets the last cache time
|
Table |
getMultipleResultTable()
Gets the reference to table with multiple results.
|
Hashtable |
getParentkeyEquivalences()
Returns a Hashtable with key-value corresponding with result to apply two
'tokenizer' actions over parentkeys parameter.
|
Vector |
getParentKeyList() |
Vector |
getParentKeys()
Returns the parentkeys.
|
Hashtable |
getParentKeyValues() |
JButton |
getQueryButton() |
protected String |
getQueryDescription(Object code,
Hashtable value,
String description) |
String |
getResultDialogSizePreferenceKey()
Deprecated.
|
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.
|
Object |
getTemplateDataValue()
Gets the value to show in the template
|
Vector |
getTextsToTranslate()
Gets the text to translate
|
protected Object |
getTypedInnerValue(Object s)
Obtains the typed value from parameter.
|
Object |
getValue()
Gets the value of a component.
|
boolean |
hasParentKeys() |
void |
init(Hashtable parameters)
Initializes parameters.
|
void |
initCache()
Inits the cache.
|
void |
initPreferences(ApplicationPreferences prefs,
String user)
Inits the user and application preferences.
|
protected void |
installFocusListener()
Adds the focus listener to the data field.
|
protected void |
installKeyboardActions() |
protected void |
installMouseListener() |
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 |
isDataCacheInitialized() |
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(String column,
Object value)
Establishes the query
|
protected EntityResult |
queryByCode(Object code)
Queries by code
|
void |
registerParentkeyValueChangeListeners() |
Hashtable |
replaceParentkeyByEquivalence(Hashtable hParentkeyEquivalences) |
void |
requestFocus() |
void |
resetFilter()
Removes all the filters set to a table.
|
void |
setCacheManager(CacheManager cm)
Sets the CacheManager.
|
void |
setCode(Object codeValue)
Sets the code.
|
protected void |
setCode(Object codeValue,
int valueEventType)
Sets the code in function of event value.
|
void |
setEnabled(boolean en)
Enables the field to insert data.
|
void |
setFilter(String column,
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(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(ResourceBundle resources)
Sets the language resource bundle.
|
void |
setValue(Object value)
Sets the value for component.
|
void |
setValue(Object value,
boolean inner)
Establishes the field value.
|
protected String |
toString(Object v)
Checks whether parameter is a string or a date.
|
protected void |
updateBackgroundColor()
Updates the background color.
|
protected void |
updateDataCache(Hashtable updateAttributes,
Hashtable updateKeys) |
protected void |
updateOnSetValueSetAttributes(Hashtable data) |
getInnerListenerEnabled, getInnerValue, getLabelComponentText, getText, installInnerListener, isInnerValueEqual, isModifiable, isRequired, isSelectedAll, setInnerValueaddFocusListener, 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, getPreferredSize, 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, validateComponentPositionsgetAccessibleContext, getUI, getUIClassID, paramString, setUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetParentFormgetLabelComponentText, isHidden, isModifiable, isRequired, setModifiable, setRequiredinitPermissions, isRestrictedgetConstraints, isEnabled, setVisiblesetComponentLocalepublic static final String REFERENCEEXT_NAME
public static final String REFERENCEEXT_CODE_NAME
public static final String SEARCH_DIALOG_SIZE_POSITION
protected static final String RECORD_NOT_FOUND_ERROR_MESSAGE
public static final String RESULTS_DIALOG_SIZE_POSITION
public static final String PARENTKEY_LISTENER
public static final String DISABLE_ON_PARENTKEY_NULL
public static final String CLEAR_QUICK_FILTER
public static final String PARENTKEY_LISTENER_EVENT
public static final String PARENTKEY_LISTENER_EVENT_ALL
public static final String PARENTKEY_LISTENER_EVENT_USER
public static final String PARENTKEY_LISTENER_EVENT_PROGRAMMATIC
public static final String IGNORE_NULL_ONSETVALUESET
public static boolean defaultIgnoreNullOnSetValueSet
public static final String FORMAT
DATEFORMAT,
Constant Field Valuespublic static final String NO_RESULT_CLEAR_CODE
public static final String DATEFORMAT
FORMAT,
Constant Field Values@Deprecated public static final String BIG_DECIMAL
ParseUtils.BIG_DECIMAL@Deprecated public static final String BIG_INTEGER
ParseUtils.BIG_INTEGER@Deprecated public static final String DOUBLE
ParseUtils.DOUBLE@Deprecated public static final String LONG
ParseUtils.LONG@Deprecated public static final String SHORT
ParseUtils.SHORT@Deprecated public static final String INTEGER
ParseUtils.INTEGER@Deprecated public static final int BIG_DECIMAL_
ParseUtils.BIG_DECIMAL_@Deprecated public static final int BIG_INTEGER_
ParseUtils.BIG_INTEGER_@Deprecated public static final int DOUBLE_
ParseUtils.DOUBLE_@Deprecated public static final int LONG_
ParseUtils.LONG_@Deprecated public static final int INTEGER_
ParseUtils.INTEGER_@Deprecated public static final int SHORT_
ParseUtils.SHORT_public static boolean defaultParentkeyListener
public static boolean defaultDisableOnParentkeyNull
public static String defaultParentkeyListenerEvent
protected static String auxCodeLabelKey
protected static String ResultSelectionInfoKey
protected boolean dataRecordListenerReady
protected boolean parentkeyListener
protected boolean disableonparentkeynull
protected String parentkeyListenerEvent
protected Vector onsetvaluesetAttributes
protected boolean ignorenullonsetvalueset
protected boolean descriptionValue
protected boolean integerValue
protected String code
protected EntityReferenceLocator locator
protected Hashtable hParentkeyEquivalences
parentkeys is:
"fieldpk1:fieldentitypk1;fieldpk2:fieldentitypk2;...fieldpkn:fieldentitypkn"protected Hashtable hOnSetValueSetEquivalences
onsetvalueset is:
"fieldonset1:fieldentitypk1;fieldonset2:fieldentitypk2;...fieldonsetn:fieldentitypkn"protected JTextField codeField
protected JButton queryButton
protected JButton deleteButton
protected Frame parentFrame
protected String parentKeys
protected String entityName
protected boolean visibleCodeField
protected boolean visibleCodeSearch
protected boolean descriptionFieldVisible
public static final String propUserSelection
protected String iMask
protected String windowTitle
protected Vector othersParentKey
protected Vector parentkeyList
protected Vector descriptionColumns
public static boolean defaultDescriptionQuery
protected boolean descriptionQuery
protected DocumentListener queryDocumentListener
protected int cacheTime
protected long lastCacheTime
protected Hashtable dataCache
Hashtable used as a data cache.protected boolean parentkeyCache
protected String separator
protected boolean clearDetailTableQuickFilterWhenShow
protected boolean userCacheManager
protected CacheManager cacheManager
protected boolean initCacheOnSetValue
protected boolean dataCacheInitialized
protected boolean disabledValueEvents
protected String attrAux
protected boolean codeNumber
protected boolean noresultclearcode
protected int codeNumberClass
protected String codeQueryField
protected Object codeValue
protected DateDocument auxDateDoc
protected ReferenceExtDataField.MultipleResultWindow multipleResultWindow
protected ReferenceExtDataField.TableWindow tableWindow
protected JButton okButton
protected JButton refreshCacheButton
protected Table t
protected ActionListener queryListener
protected ReferenceExtDataField.CodeFieldListener codeFieldListener
protected FormatPattern formatPattern
format
parameter is missing. Also wrappers the content of the
dateformat
parameter.protected ReferenceExtDataField.QueryPopup queryPopup
public boolean isEmpty()
isEmpty in interface DataComponentisEmpty in class TextFieldDataFieldprotected void updateOnSetValueSetAttributes(Hashtable data)
protected void createDataRecordListener()
public void init(Hashtable 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. |
| querycols | dcol1;dcol2;...;dcoln | yes | no | Columns that are added to description for query |
| 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. |
init in interface FormComponentinit in class TextFieldDataFieldparameters - 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. |
protected void createTable(Hashtable parameters) throws Exception
Table.parameters - Parameters used to build tableException - When table constructor throws Exceptionprotected Object getCodeFieldValue()
protected Object getTypedInnerValue(Object s)
s - the object to obtain the typepublic void setCode(Object codeValue)
codeValue - setCode(Object, int)protected MouseListener createOpenDetailMouseListener()
protected void installMouseListener()
public Hashtable replaceParentkeyByEquivalence(Hashtable hParentkeyEquivalences)
public EntityResult queryBy(String column, Object value)
queryBy in interface ReferenceDataComponentcolumn - the col namevalue - the value to add to keyvalues hashtable, with the form
(col,value)protected EntityResult queryByCode(Object code)
code - the value to add to hashtable, with the form (code,codigo)protected void setCode(Object codeValue, int valueEventType)
codeValue - the value to setvalueEventType - the type of eventsetValue(Object, boolean)public Object getValue()
DataComponentgetValue in interface DataComponentobject with value.public void setValue(Object value)
DataComponentsetValue in interface DataComponentvalue - the object with value to setpublic void setValue(Object value, boolean inner)
protected String getQueryDescription(Object code, Hashtable value, String description)
protected String getCodeDescription(Object code, Hashtable value)
code - the object to search in hashtable parametervalue - the hashtable with all codesprotected String toString(Object v)
v - the object to convertpublic int getSQLDataType()
integerValue.
getSQLDataType in interface DataComponentpublic void setReferenceLocator(EntityReferenceLocator locator)
ReferenceComponentsetReferenceLocator in interface ReferenceComponentlocator - a reference locator to set in componentpublic void registerParentkeyValueChangeListeners()
public boolean isParentkeyListener()
public void setParentkeyListener(boolean parentkeyListener)
public void setParentFrame(Frame frame)
OpenDialogsetParentFrame in interface OpenDialogframe - the framepublic void free()
throws Exception
Freeablepublic void setParentForm(Form f)
AccessFormsetParentForm in interface AccessFormsetParentForm in class DataFieldf - the form referencepublic void setFormBuilder(FormBuilder builder)
setFormBuilder in interface CreateFormspublic void setEnabled(boolean en)
DataFieldsetEnabled in interface FormComponentsetEnabled in class DataFielden - the condition to set enableprotected void updateBackgroundColor()
updateBackgroundColor in class DataFieldpublic void deleteData()
DataComponentdeleteData in interface DataComponentdeleteData in class TextFieldDataFieldpublic void deleteData(boolean clearCode)
protected void deleteUserData(boolean clearcode)
protected void deleteUserData(boolean clearcode,
boolean cleardescription)
protected void deleteUserData()
public boolean isModified()
DataComponenttrue when data have been
modified. The method setValue() should be change this
condition.
isModified in interface DataComponentisModified in class DataFieldpublic void setResourceBundle(ResourceBundle resources)
InternationalizationsetResourceBundle in interface InternationalizationsetResourceBundle in class DataFieldresources - the new language bundle.public Object getAttribute()
IdentifiedElementgetAttribute in interface IdentifiedElementgetAttribute in class TextFieldDataFieldpublic String getCodeFieldName()
getCodeFieldName in interface ReferenceDataComponentcodepublic void requestFocus()
requestFocus in class DataFieldpublic Vector getTextsToTranslate()
getTextsToTranslate in interface InternationalizationgetTextsToTranslate in class DataFieldpublic Hashtable getCodeValues(Object code)
code - the object to findpublic Hashtable getDataCache()
public void initCache()
protected long getLastCacheTime()
lastCacheTimepublic void invalidateCache()
public boolean isDataCacheInitialized()
public Vector getParentKeys()
public Hashtable getParentkeyEquivalences()
string="formfieldpk1:equivalententityfieldpk1;formfieldpk2:equivalententityfieldpk2;...;formfieldpkn:equivalententityfieldpkn"
Hashtable: parentkeys - the string with valuesHashtable with key-valuepublic boolean hasParentKeys()
hasParentKeys in interface IFilterElementpublic Hashtable getParentKeyValues()
getParentKeyValues in interface IFilterElementpublic void setCacheManager(CacheManager cm)
setCacheManager in interface CachedComponentpublic Vector getAttributes()
getAttributes in interface CachedComponentpublic String getEntity()
getEntity in interface CachedComponententityNameprotected void fireValueChanged(Object newValue, Object oldValue, int type)
DataFieldfireValueChanged in class DataFieldnewValue - the new valueoldValue - the previous valuetype - the type of value eventprotected void installFocusListener()
DataFieldinstallFocusListener in class DataFieldpublic void setFilter(String column, Object[] values, int condition)
column - the name of columnvalues - the object array to apply filtercondition - the condition to filterpublic void resetFilter()
public void clearQuickFilter()
protected void populateTable()
throws Exception
Exception - when exception occursprotected void createDataField()
createDataField in class TextFieldDataFieldComponent.isFocusTraversable()public void initPreferences(ApplicationPreferences prefs, String user)
initPreferences in interface HasPreferenceComponentinitPreferences in class DataFieldprotected void createMultipleResultsWindow(Table t)
t - the tableprotected void setInnerListenerEnabled(boolean enabled)
TextFieldDataFieldsetInnerListenerEnabled in class TextFieldDataFieldenabled - the enabled conditionpublic Table getTable()
public Table getMultipleResultTable()
public JTextField getCodeField()
getCodeField in interface ReferenceDataComponent@Deprecated public String getResultDialogSizePreferenceKey()
public String getSearchDialogSizePreferenceKey()
protected void installPopupMenuListener()
installPopupMenuListener in class DataFieldMouseListenerprotected void installPreferenceHelpListener()
installPreferenceHelpListener in class DataFieldpublic boolean isClearDetailTableQuickFilterWhenShow()
public Vector getParentKeyList()
getParentKeyList in interface IFilterElementpublic JButton getDeleteButton()
public JButton getQueryButton()
public String getCodeSearchFieldName()
ReferenceDataComponentgetCodeSearchFieldName in interface ReferenceDataComponentString with the search field name.public boolean isCodeFieldVisible()
ReferenceDataComponentisCodeFieldVisible in interface ReferenceDataComponentpublic boolean isCodeSearchVisible()
ReferenceDataComponentisCodeSearchVisible in interface ReferenceDataComponentpublic int getTemplateDataType()
ITemplateFieldITemplateField.DATA_TYPE_FIELD ITemplateField.DATA_TYPE_IMAGE
ITemplateField.DATA_TYPE_TABLEgetTemplateDataType in interface ITemplateFieldint with the data type.public Object getTemplateDataValue()
ITemplateFieldgetTemplateDataValue in interface ITemplateFieldprotected void installKeyboardActions()
Copyright © 2016 Imatia Innovation S.L.. All rights reserved.