public class DataList extends MustList implements DataComponent, DataComponentOwner, DataChangeListener
javax.swing.JList.AccessibleJList, javax.swing.JList.DropLocation
javax.swing.JComponent.AccessibleJComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
DataList(DataObject assignedDataObject,
java.lang.String assignedColumnName,
DataObject sourceDataObject,
java.lang.String visibleColumnName)
Constructs a new data list.
|
DataList(DataObject assignedDataObject,
java.lang.String assignedColumnName,
DataObject sourceDataObject,
java.lang.String visibleColumnName,
java.lang.String orderBy)
Constructs a new data list.
|
Modifier and Type | Method and Description |
---|---|
void |
addComponentModificationListener(ComponentModificationListener l)
Adds a component modification listener to this component.
|
void |
assignDC(DataComponent dataComponent)
Assigns a data component to this owner.
|
void |
dataChangePerformed(DataChangedEvent e) |
void |
deleteSelectedItems()
Deletes selected items and selects the next or previous value if they exist.
|
void |
free()
Releases external resources.
|
DataObject |
getAssignedDataObject()
Returns the assigned data object.
|
DataObject |
getSourceDataObject()
Returns the content data object.
|
java.lang.String |
getVisibleColumnName()
Returns the visible column name.
|
boolean |
isContentValid()
Indicates whether the component's value is valid.
|
boolean |
isFilled()
Indicates whether the component has a value.
|
boolean |
isModified()
Indicates whether the component's value differs from its initial value.
|
boolean |
isRequirementUnfulfilled()
Indicates whether the component's value is mandatory but not filled.
|
boolean |
isToSave()
Indicates whether the component's value differs from its value at load time.
|
void |
loadValue()
Loads the component's database stored value.
|
void |
refresh() |
void |
reloadDataObjectByLastRevisionIdentifier()
Reloads the source data object by lastRevisionIdentier - may be new row, too.
|
void |
removeComponentModificationListener(ComponentModificationListener l)
Removes a component modification listener to this component.
|
void |
saveValue()
Stores the component's value.
|
void |
selectAll()
Selects all input of the component, if it is supported - e.g. in JTextField.
|
void |
setEditable(boolean editable)
Sets the flag that determines whether or not this component is editable.
|
void |
setPresentables(Presentable[] newPresentables)
Assigns the presentables to be dependent on this data list.
|
void |
setRequired(boolean required)
Determines whether input is required (mandatory).
|
void |
setVisibleColumnName(java.lang.String visibleColumnName)
Sets the visible column name.
|
void |
valueChanged(javax.swing.event.ListSelectionEvent e) |
addAnySelectionListener, addIndexedItem, addItem, applyNewModel, fireSelectionChanged, getBackground, getIdentifier, getIdModel, getItemCount, getSelectedIdentifier, getSelectedIdentifiers, getSelectedItem, getTranslation, keyPressed, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, prepareModelForExtension, prepareNewModel, remove, removeAll, removeAnySelectionListener, setBackgroundColor, setEnterButton, setPopupReceiver, setSelectedIndex, updateItem
addListSelectionListener, addSelectionInterval, clearSelection, createSelectionModel, ensureIndexIsVisible, fireSelectionValueChanged, getAccessibleContext, getAnchorSelectionIndex, getCellBounds, getCellRenderer, getDragEnabled, getDropLocation, getDropMode, getFirstVisibleIndex, getFixedCellHeight, getFixedCellWidth, getLastVisibleIndex, getLayoutOrientation, getLeadSelectionIndex, getListSelectionListeners, getMaxSelectionIndex, getMinSelectionIndex, getModel, getNextMatch, getPreferredScrollableViewportSize, getPrototypeCellValue, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedIndex, getSelectedIndices, getSelectedValue, getSelectedValues, getSelectedValuesList, getSelectionBackground, getSelectionForeground, getSelectionMode, getSelectionModel, getToolTipText, getUI, getUIClassID, getValueIsAdjusting, getVisibleRowCount, indexToLocation, isSelectedIndex, isSelectionEmpty, locationToIndex, paramString, removeListSelectionListener, removeSelectionInterval, setCellRenderer, setDragEnabled, setDropMode, setFixedCellHeight, setFixedCellWidth, setLayoutOrientation, setListData, setListData, setModel, setPrototypeCellValue, setSelectedIndices, setSelectedValue, setSelectionBackground, setSelectionForeground, setSelectionInterval, setSelectionMode, setSelectionModel, setUI, setValueIsAdjusting, setVisibleRowCount, updateUI
addAncestorListener, 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, 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, requestFocus, requestFocus, requestFocusInWindow, 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, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, 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, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, 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, 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, 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, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
requestFocusInWindow, setToolTipText
public DataList(DataObject assignedDataObject, java.lang.String assignedColumnName, DataObject sourceDataObject, java.lang.String visibleColumnName)
assignedDataObject
- the data object to trigger the selectionassignedColumnName
- the name of the column the text field is to assign tosourceDataObject
- the source data objectvisibleColumnName
- the visible column namepublic DataList(DataObject assignedDataObject, java.lang.String assignedColumnName, DataObject sourceDataObject, java.lang.String visibleColumnName, java.lang.String orderBy)
assignedDataObject
- the data object to trigger the selectionassignedColumnName
- the name of the column the text field is to assign tosourceDataObject
- the source data objectvisibleColumnName
- the visible column nameorderBy
- the sorting column name of the content data objectpublic DataObject getAssignedDataObject()
getAssignedDataObject
in interface DataComponent
public DataObject getSourceDataObject()
public void assignDC(DataComponent dataComponent)
DataComponentOwner
assignDC
in interface DataComponentOwner
dataComponent
- the data component to be assignedpublic void setEditable(boolean editable)
DataComponent
setEditable
in interface DataComponent
editable
- a flag indicating whether this component should be user editablepublic boolean isContentValid()
DataComponent
isContentValid
in interface DataComponent
public void selectAll()
DataComponent
selectAll
in interface DataComponent
public void setPresentables(Presentable[] newPresentables)
newPresentables
- the presentables to be dependent on this data listpublic void setVisibleColumnName(java.lang.String visibleColumnName)
visibleColumnName
- the column name to be used to be displayed as
content of the combo boxpublic java.lang.String getVisibleColumnName()
public void loadValue()
DataComponent
loadValue
in interface DataComponent
public void deleteSelectedItems()
public void refresh()
public void valueChanged(javax.swing.event.ListSelectionEvent e)
valueChanged
in interface javax.swing.event.ListSelectionListener
valueChanged
in class MustList
public void reloadDataObjectByLastRevisionIdentifier()
public boolean isFilled()
DataComponent
isFilled
in interface DataComponent
public boolean isModified()
ModifiedInformer
isModified
in interface ModifiedInformer
public boolean isToSave()
DataComponent
isToSave
in interface DataComponent
public void addComponentModificationListener(ComponentModificationListener l)
DataComponent
addComponentModificationListener
in interface DataComponent
l
- component modification listener to addpublic void removeComponentModificationListener(ComponentModificationListener l)
DataComponent
removeComponentModificationListener
in interface DataComponent
l
- component modification listener to addDataList
public void saveValue()
DataComponent
saveValue
in interface DataComponent
public void setRequired(boolean required)
DataComponent
setRequired
in interface DataComponent
required
- if true, input is mandatory; otherwise, input is not mandatorypublic boolean isRequirementUnfulfilled()
DataComponent
isRequirementUnfulfilled
in interface DataComponent
public void free()
Exemptible
free
in interface Exemptible
public void dataChangePerformed(DataChangedEvent e)
dataChangePerformed
in interface DataChangeListener
Copyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de