T - the pdo typepublic class PdoLinkPanel<T extends PersistentDomainObject<T>> extends FormFieldComponentPanel implements DropTargetListener
PdoFieldPanel,
Serialized FormJPanel.AccessibleJPanelJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategylistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWaccessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTADJUST_LEFT, ADJUST_NONE, ADJUST_RIGHT, ADJUST_TRIM, CONVERT_LC, CONVERT_NONE, CONVERT_UCABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
PdoLinkPanel()
Creates an application database object link panel.
|
| Modifier and Type | Method and Description |
|---|---|
PdoSearchDialog<T> |
createSearchDialog()
Creates the search dialog.
|
void |
dragEnter(DropTargetDragEvent event) |
void |
dragExit(DropTargetEvent event) |
void |
dragOver(DropTargetDragEvent event) |
void |
drop(DropTargetDropEvent event) |
void |
dropActionChanged(DropTargetDragEvent event) |
Object |
getFormValue() |
T |
getLink()
Gets the linked object.
|
long |
getLinkId()
Gets the object ID of the link.
|
boolean |
isChangeable() |
boolean |
isDropEnabled()
Returns whether the component of this linkpanel is a dropzone.
|
boolean |
isEditButtonVisible()
Gets the visibility of the edit button.
|
boolean |
requestFocusInWindow() |
void |
runEdit()
Edits the object
|
void |
runSearch()
Runs the search
|
void |
setCellEditorUsage(boolean flag) |
void |
setChangeable(boolean flag) |
void |
setDropEnabled(boolean dropEnabled)
Sets the component of this linkpanel to be a drop zone.
|
void |
setEditButtonVisible(boolean visible)
Sets the visibility of the edit button.
Some apps don't want the user to edit the object. |
void |
setFormComponent(FormComponent comp) |
void |
setFormValue(Object obj) |
void |
setLink(Class<T> clazz,
DomainContext context,
long linkedId)
Set the link with default plugin.
|
void |
setLink(Class<T> clazz,
DomainContext context,
long linkedId,
boolean keepPlugin)
Set the link with default plugin.
|
void |
setLink(PdoSearch<T> pdoSearch,
long linkedId)
Sets the link.
|
void |
setLink(T object)
Sets the link object (if plugin matches).
|
void |
setName(String name) |
clearText, doFormat, downRight, getAdjust, getCaretPosition, getColumns, getConvert, getConverter, getDefaultColumns, getErrorMessage, getErrorOffset, getFiller, getFormat, getFormComponent, getHorizontalAlignment, getInvalidChars, getMaxColumns, getText, getToolTipText, getValidChars, getVerticalAlignment, isAutoNext, isAutoSelect, isCaretLeft, isCaretRight, isEmpty, isEraseFirst, isInhibitAutoSelect, isOverwrite, isStartEditLeftmost, postActionEvent, setAdjust, setAutoNext, setAutoSelect, setCaretLeft, setCaretPosition, setCaretRight, setColumns, setConvert, setConverter, setDefaultColumns, setEraseFirst, setErrorMessage, setErrorOffset, setFiller, setFormat, setHorizontalAlignment, setInhibitAutoSelect, setInvalidChars, setMaxColumns, setOverwrite, setStartEditLeftmost, setText, setToolTipText, setValidChars, setVerticalAlignment, upLeftaddValueListener, clearValueShownModified, fireValueChanged, fireValueEntered, getBaseline, getBinding, getBindingPath, getComponentPath, getFocusTraversalGroup, getHelpURL, getParentWindow, getPropertyGroup, getValueShown, hasFocus, invalidateParentInfo, isAutoUpdate, isBindable, isCellEditorUsage, isFireRunning, isFormTraversable, isHonourChangeable, isMandatory, isSmartValueEntered, isTriggerValueChangedEnabled, isValueChanged, isValueShownModified, prepareFocusLost, removeValueListener, requestFocus, requestFocus, requestFocusLater, saveValue, setAutoUpdate, setBindable, setBinding, setBindingPath, setComponentPath, setFireRunning, setFocusTraversalGroup, setFormTraversable, setFormWrapWindow, setHelpURL, setHonourChangeable, setMandatory, setPropertyGroup, setSmartValueEntered, setTriggerValueChangedEnabled, showErrorPopup, showHelp, triggerValueChanged, updateAllChangeable, wasFocusGainedFromTransfer, wasFocusGainedFromTransferBackward, wasTransferFocus, wasTransferFocusBackward, wasTransferFocusByEnteraddActionListener, areValuesChanged, componentAdded, componentRemoved, createBinder, fireActionPerformed, getBinder, getFormValues, getTitle, isTriggerValuesChangedEnabled, removeActionListener, saveValues, setFormValues, setFormValuesKeepChanged, setTitle, setTriggerValuesChangedEnabled, triggerValuesChangedgetAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, 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, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, 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, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, 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, 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, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddValueListener, clearValueShownModified, fireValueChanged, fireValueEntered, getBaseline, getBinding, getBindingPath, getComponentPath, getFocusTraversalGroup, getHelpURL, getParentWindow, getPropertyGroup, getValueShown, hasFocus, invalidateParentInfo, isAutoUpdate, isBindable, isCellEditorUsage, isFireRunning, isFormTraversable, isMandatory, isSmartValueEntered, isTriggerValueChangedEnabled, isValueChanged, isValueShownModified, prepareFocusLost, removeValueListener, requestFocusLater, saveValue, setAutoUpdate, setBindable, setBinding, setBindingPath, setComponentPath, setFireRunning, setFocusTraversalGroup, setFormTraversable, setFormWrapWindow, setHelpURL, setMandatory, setPropertyGroup, setSmartValueEntered, setTriggerValueChangedEnabled, showErrorPopup, showHelp, transferFocus, transferFocusBackward, triggerValueChanged, wasFocusGainedFromTransfer, wasFocusGainedFromTransferBackward, wasTransferFocus, wasTransferFocusBackward, wasTransferFocusByEnterupdateAllChangeableisHonourChangeable, setHonourChangeablepublic PdoLinkPanel()
public void setName(String name)
Overridden to set the names in subcomponents.
public void setFormComponent(FormComponent comp)
setFormComponent in class FormComponentPanelpublic void setDropEnabled(boolean dropEnabled)
The default is true.
dropEnabled - true if this is a drop zone, false if notpublic boolean isDropEnabled()
public void setEditButtonVisible(boolean visible)
visible - true if editbutton is visiblepublic boolean isEditButtonVisible()
public void setFormValue(Object obj)
Overridden due to binding.
Notice that obj may be null. In such a case the domain context will
be retrieved from the bindingProperty DomainContext.class from the formcontainer.
setFormValue in interface FormComponentsetFormValue in class FormComponentPanelpublic Object getFormValue()
Overridden due to binding.
getFormValue in interface FormComponentgetFormValue in class FormComponentPanelpublic void setLink(PdoSearch<T> pdoSearch, long linkedId)
pdoSearch - the PdoSearch to be usedlinkedId - the original, i.e. current ID of the linked objectpublic void setLink(T object)
object - the database objectpublic void setLink(Class<T> clazz, DomainContext context, long linkedId, boolean keepPlugin)
clazz - the class of the linked object, e.g. Konto.classcontext - is the db-connection with contextlinkedId - the original, i.e. current Id of the linked objectkeepPlugin - is true if keep plugin if already initializedpublic void setLink(Class<T> clazz, DomainContext context, long linkedId)
clazz - the class of the linked object, e.g. Konto.classcontext - is the db-connection with contextlinkedId - the original, i.e. current Id of the linked objectpublic long getLinkId()
public T getLink()
public void setChangeable(boolean flag)
setChangeable in interface FormChangeablesetChangeable in class FormComponentPanelpublic boolean isChangeable()
isChangeable in interface FormChangeableisChangeable in class FormComponentPanelpublic boolean requestFocusInWindow()
requestFocusInWindow in class FormComponentPanelpublic void setCellEditorUsage(boolean flag)
setCellEditorUsage in interface FormComponentsetCellEditorUsage in class FormComponentPanelpublic void dragEnter(DropTargetDragEvent event)
dragEnter in interface DropTargetListenerpublic void dragExit(DropTargetEvent event)
dragExit in interface DropTargetListenerpublic void dragOver(DropTargetDragEvent event)
dragOver in interface DropTargetListenerpublic void dropActionChanged(DropTargetDragEvent event)
dropActionChanged in interface DropTargetListenerpublic void drop(DropTargetDropEvent event)
drop in interface DropTargetListenerpublic PdoSearchDialog<T> createSearchDialog()
Invoked from runSearch().
public void runSearch()
public void runEdit()
Tentackle - a domain driven enterprise framework