public class MultiReference extends Column implements OpenDialog, ReferenceComponent, DataComponent, AccessForm
JPanel.AccessibleJPanelJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
protected JPanel |
buttonPanel
An instance of a button panel with alignment to left.
|
protected Hashtable |
dataComponents
A reference to a data components.
|
protected JButton |
deleteButton
An instance of a delete button.
|
protected String |
entity
The entity reference.
|
protected FocusAdapter |
focusListener
An instance of focus adapter to manage the loss focus.
|
protected String |
key
The key reference.
|
protected EntityReferenceLocator |
locator
A reference to locator.
|
protected boolean |
modificable
The modifiable condition.
|
protected JButton |
okButton
An instance of a accept button.
|
protected Frame |
parentFrame
A reference to a parent frame.
|
protected String |
parentKey
The parentkey reference.
|
protected JButton |
queryButton
An instance of a query button.
|
protected boolean |
required
The required condition.
|
protected boolean |
show
The condition to show.
|
protected Object |
storedValue
An object to store data.
|
protected Table |
t
A reference to a table.
|
protected JDialog |
tableWindow
A reference to a table window.
|
ABOVE_BOTTOM, ABOVE_TOP, activedPermission, alignment, alignmentV, attribute, B_BEVEL_LOWERED, B_BEVEL_RAISED, B_COLOR, B_LOWERED, B_RAISED, backgroundImage, backgroundPaint, BELOW_BOTTOM, BELOW_TOP, BEVEL_LOWERED, BEVEL_RAISED, borderPosition, BOTTOM, COLOR, COLUMN, EXPANDLAST, horizontalExpand, horizontalWeight, lastExpand, LOWERED, parentForm, preferredHigh, preferredWidht, r, RAISED, restricted, texturePaint, title, titledBorder, titleToUpperCase, TOP, VALIGN, visiblePermissionaccessibleContext, 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_2DEBUG_LANGUAGEDESACTIVATE_COMPONENT_BY_PERMISSION_TIPABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
MultiReference(Hashtable params)
Class constructor, calls to
Column constructor. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkComponentListOK()
Creates the form component list manages by this object.
|
void |
deleteData()
The method to delete data for component.
|
Object |
getAttribute()
Gets the object attribute.
|
String |
getLabelComponentText()
Returns the label text component.
|
int |
getSQLDataType()
Returns the
sql data type according to
java.sql.Types
|
Object |
getValue()
Gets the value of a component.
|
Hashtable |
getValues()
Returns the not null field values associated to this object.
|
boolean |
isEmpty()
Checks the data existence in component.
|
boolean |
isHidden()
Indicates to check the visibility condition for a component.
|
boolean |
isModifiable()
Checks the modifiable condition for a component.
|
boolean |
isModified()
This method should be return
true when data have been
modified. |
boolean |
isRequired()
Indicates the required condition for a component.
|
void |
setCode(Object code)
This method is similar to introduce the code into the field from user
interface.
|
protected void |
setComponentValue(Object attribute,
Object value)
Sets the component value.
|
void |
setEnabled(boolean enabled)
Description method to set enabled or not the component according the
boolean condition in parameter.
|
void |
setModifiable(boolean modif)
Establishes the modifiable condition for a component.
|
void |
setParentForm(Form f)
Method declaration to set the form that contains the component.
|
void |
setParentFrame(Frame marco)
This method is called from Form for each component that implements this
interface.
|
void |
setReferenceLocator(EntityReferenceLocator locator)
Establishes the reference locator that will be used by component.
|
void |
setRequired(boolean required)
Sets required a component according to condition.
|
void |
setValue(Object value)
Sets the value for component.
|
checkEnabledPermission, checkVisiblePermission, getConstraints, getMaximumSize, getMinimumSize, getName, getPreferredSize, getTextsToTranslate, init, initPermissions, isFocusable, isRestricted, paintComponent, setBackgroundImage, setBackgroundPaint, setComponentLocale, setResourceBundle, setVisiblegetAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, 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, 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, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, 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, addFocusListener, 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, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, 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, removeFocusListener, 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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetConstraints, init, isEnabled, setVisiblegetTextsToTranslate, setComponentLocale, setResourceBundleinitPermissions, isRestrictedprotected Object storedValue
protected boolean required
protected boolean modificable
protected boolean show
protected String entity
protected String key
protected String parentKey
protected JDialog tableWindow
protected Table t
protected EntityReferenceLocator locator
protected Frame parentFrame
protected Hashtable dataComponents
protected JButton queryButton
protected JButton deleteButton
protected JButton okButton
protected JPanel buttonPanel
FlowLayout.LEFTprotected FocusAdapter focusListener
public MultiReference(Hashtable params) throws Exception
Column constructor.
params - the hashtable with parameters.
| attribute | values | default | required | meaning |
| entity | yes | Associated entity. | ||
| title | entity | no | The title. | |
| key | yes | Attribute for data component. It is the primary key for entity. |
| Table parameters supported: | ||||
| attribute | values | default | required | meaning |
| parentkey | no | To establish a filter. It will be a constraint for all queries in entity. | ||
| form | no | Form associated to the table. | ||
| otherkeys | field1;...;fieldN | Name of the other fields that are parentkeys, that are
passed to the detail form when it is open. These values will
be get from the parent form, in which the Table
is placed. |
||
| controls | yes/no | yes | 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. |
Exceptionpublic Object getValue()
DataComponentgetValue in interface DataComponentobject with value.public Hashtable getValues()
getValue() returns null.
Hashtable with attributes and valuesprotected void setComponentValue(Object attribute, Object value)
setValue(Object)
attribute - the attribute to set valuevalue - the object to set to attributepublic void setValue(Object value)
DataComponentsetValue in interface DataComponentvalue - the object with value to setpublic boolean isRequired()
DataComponentisRequired in interface DataComponentpublic void setRequired(boolean required)
DataComponentsetRequired in interface DataComponentrequired - the required conditionpublic boolean isModified()
DataComponenttrue when data have been
modified. The method setValue() should be change this
condition.
isModified in interface DataComponentpublic boolean isHidden()
DataComponentisHidden in interface DataComponentpublic void deleteData()
DataComponentdeleteData in interface DataComponentpublic boolean isEmpty()
DataComponentisEmpty in interface DataComponenttrue when component is emptypublic void setModifiable(boolean modif)
DataComponentDeleteFields call.
setModifiable in interface DataComponentmodif - the boolean conditionpublic void setEnabled(boolean enabled)
FormComponentsetEnabled in interface FormComponentsetEnabled in class Columnenabled - the enabled conditionpublic boolean isModifiable()
DataComponentisModifiable in interface DataComponenttrue when component is modifiablepublic int getSQLDataType()
DataComponentsql data type according to
java.sql.Types
getSQLDataType in interface DataComponentInteger typepublic void setReferenceLocator(EntityReferenceLocator locator)
ReferenceComponentsetReferenceLocator in interface ReferenceComponentlocator - a reference locator to set in componentpublic Object getAttribute()
IdentifiedElementgetAttribute in interface IdentifiedElementgetAttribute in class Columnpublic void setParentFrame(Frame marco)
OpenDialogsetParentFrame in interface OpenDialogmarco - the framepublic String getLabelComponentText()
DataComponentLocale.
getLabelComponentText in interface DataComponentpublic void setParentForm(Form f)
AccessFormsetParentForm in interface AccessFormsetParentForm in class Columnf - the form referenceprotected void checkComponentListOK()
public void setCode(Object code)
code - the object to set codeCopyright © 2016 Imatia Innovation S.L.. All rights reserved.