public abstract class SelectDialog extends MustDialog implements java.awt.event.ActionListener
javax.swing.JDialog.AccessibleJDialog
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
alreadyMadeInvisible, defaultCursor, ownerDialog, ownerFrame, sd, storedLayout, waitCursor
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Constructor and Description |
---|
SelectDialog(java.awt.Frame ownerFrame,
ImageResource imageResource) |
SelectDialog(MustDialog ownerDialog,
ImageResource imageResource) |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptsClosingDueToInactivity()
Returns true if frame accepts closing due to inactivity.
|
void |
actionPerformed(java.awt.event.ActionEvent e)
Controls action events like button pressed.
|
protected abstract void |
beginListFill()
Beginning of list fills into a list model which is not currently assigned
to the view.
|
protected void |
chooseButtonAction()
The task to be done associated with the choose button.
|
protected void |
clearMessage()
Removes messages.
|
protected abstract void |
clearSelection()
Clears the selection.
|
void |
closeInstance()
Closes the frame and its associated frames and destroys them.
|
protected void |
constructGUI() |
protected MustButton |
createButton(java.lang.String defaultLabel,
java.lang.String toolTipText,
java.lang.String actionName) |
protected MustButton |
createButton(java.lang.String imageName,
java.lang.String defaultLabel,
java.lang.String toolTipText,
java.lang.String actionName) |
protected HalfDataComboBox |
createComboBox(java.lang.String dataLabel,
DataObject sourceDataObject,
java.lang.String visibleColumn)
Creates a combo box in the same line as previously used.
|
protected HalfDataComboBox |
createComboBox(java.lang.String dataLabel,
DataObject sourceDataObject,
java.lang.String visibleColumn,
java.lang.String orderByColumn)
Creates a combo box in the same line as previously used.
|
protected HalfDataComboBox |
createComboBox(java.lang.String dataLabel,
DataObject sourceDataObject,
java.lang.String visibleColumn,
java.lang.String orderByColumn,
java.lang.String nameForNoChoice)
Creates a combo box in the same line as previously used.
|
protected MustIntField |
createIntField(int length)
Creates a int input field in the same line as previously used.
|
protected MustIntField |
createIntField(java.lang.String label,
int length)
Creates a int field in a new line with its describing label.
|
protected MustTextField |
createTextField(int length)
Creates a text input field in the same line as previously used.
|
protected MustTextField |
createTextField(java.lang.String label,
int length)
Creates a new text field.
|
protected void |
createTextFieldForGlobalSearch(java.lang.String label,
int length)
Creates a new text field for global search.
|
protected VariableChoice |
createVariableChoice(java.lang.String dataLabel,
KeyValuePair[] keyValuePairs)
Constructs an new variable choice with the specified content.
|
protected VariableChoice |
createVariableChoice(java.lang.String dataLabel,
java.lang.String[][] content)
Creates a new variable choice with static content.
|
protected void |
creationEnding()
Conclusion of the construction process.
|
protected void |
delayedInititialActions()
Workaround: called a little bit later than the initial time.
|
void |
generalActionBeginnung()
Initializes things before an action begins like resetting the status label.
|
protected void |
generalActionEnding()
Concludes things after an action ended.
|
Identifier |
getChosenIdentifier()
Returns the chosen identifier.
|
abstract Identifier[] |
getIdentifiers() |
protected abstract int |
getListItemCount()
Returns the number of items in the table.
|
protected int |
getListModification()
Returns the list modification case which may be
,
or
|
protected java.lang.String |
getNotFoundNotification()
Returns the text to notify the user that no entry is matching the selection.
|
protected java.lang.Class<DataPresentation> |
getPresentationClass()
Returns the presentation class - to be overridden by child if presentation class is available!
|
protected java.lang.Class<PropertyPrint> |
getPrintClass()
Returns the print class - to be overridden by child if print class is available!
|
protected abstract Identifier |
getSelectedIdentifier()
Returns the identifier (primary key) of the selected entry.
|
protected abstract int |
getSelectedIndex()
Returns the index of the selected item.
|
protected abstract java.lang.String |
getSelectedItem()
Returns the selected item.
|
int |
getSelectedTab()
Returns the selected tab of the tabbed pane.
|
protected boolean |
isChoosingAllowed()
Returns true if the user may choose the presented entries.
|
boolean |
isClosingAllowed()
Returns true if it is allowed to close the dialog.
|
protected boolean |
isInputAccepted()
Returns true if user input is accepted.
|
protected boolean |
isModificationAllowed()
Returns true if the user may modify the presented entries.
|
protected boolean |
isSelectionAccepted() |
protected void |
listButtonAction()
The task to be done associated with the list button.
|
protected void |
newPanel()
Creates a new panel and adds it to the tabbed pane with a list for row sub-selection.
|
protected void |
newPanel(java.lang.String tabLabel)
Creates a new panel and adds it to the tabbed pane with a list for row sub-selection.
|
protected void |
newPanel(java.lang.String tabLabel,
MustMultChoice multChoice,
java.awt.Dimension preferedSize)
Adds a panel with multiple choice selection.
|
protected void |
newPanelWithExpertSearchTextArea(java.lang.String tabLabel)
Adds an expert search panel to the tabbed pane.
|
protected void |
packIfNotLaidOut()
Packs the frame if it isn't already laid-out by user.
|
protected void |
presentButtonAction()
The task to be done associated with the present button.
|
protected abstract void |
removeAllOfTheList()
Removes all items of the table.
|
protected abstract void |
requestListingFocus()
Request the focus to the list.
|
protected abstract void |
selectListIndex(int indexToSelect)
Selects an entry of the list by index.
|
void |
setLocation(int x,
int y) |
protected void |
setMessage(java.lang.String message)
Sets the message to be read by the user, which is presented in the status
label in this context.
|
protected void |
setMessageToKeep(java.lang.String messageToKeep)
Sets the message to be read by the user.
|
protected void |
setMinHeight() |
abstract void |
setSelectedIdentifier(Identifier identifier)
Selects an item of the list / a row by identifier.
|
void |
setSize(int width,
int height) |
void |
setVisible(boolean b) |
adjustSizeToPlausibleValue, closeAll, closeAllDueToInactivity, free, getAppResStr, getFrame, getHelpTarget, getHelpTopic, getRootPane, getTranslation, isLaidOut, locateInCenter, packAndLocateInCenter, packAndLocateInCenterIfNotLaidOut, popupMessage, prepareForProgrammaticalClosing, register, setDefaultLocation, setDefaultSize, setHelpContext, setHelpContext, setIconImages, setImageIcon, setTitle, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setUndecorated, show, toBack
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setType, toFront
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public static final int LIST_MODIFICATION_APPEND
public static final int LIST_MODIFICATION_UPDATE
public static final int LIST_MODIFICATION_REMOVE
protected int listModification
protected ImageResource imageResource
protected javax.swing.JPanel panelTop
protected MustTabbedPane mustTabbedPane
protected int expertSearchTab
protected javax.swing.JSplitPane jSplitPane1
protected java.util.Vector<AttributeList> tabAttributeList
protected AttributeList currentAttributeList
protected boolean isAttributeListToPack
protected javax.swing.JPanel panelSelectButtons
protected javax.swing.JPanel panelBottom
protected javax.swing.JPanel panelButtons
protected MustButton buttonList
protected MustStatusLabel statusLabel
protected MustButton buttonPresent
protected MustButton buttonChoose
protected MustButton buttonClose
protected MustTextField globalSearchTextField
protected MustTextArea expertSearchTextArea
protected DataPropertyPrint printInstance
protected DataPresentation presentationInstance
protected Identifier lastSelectionIdentifier
protected Identifier choosenIdentifier
protected boolean programmaticChange
protected long timeSetVisible
public SelectDialog(java.awt.Frame ownerFrame, ImageResource imageResource)
public SelectDialog(MustDialog ownerDialog, ImageResource imageResource)
protected void constructGUI()
public void setVisible(boolean b)
setVisible
in class MustDialog
public void setSize(int width, int height)
setSize
in class java.awt.Window
public void setLocation(int x, int y)
setLocation
in class java.awt.Window
protected MustButton createButton(java.lang.String defaultLabel, java.lang.String toolTipText, java.lang.String actionName)
protected MustButton createButton(java.lang.String imageName, java.lang.String defaultLabel, java.lang.String toolTipText, java.lang.String actionName)
protected void creationEnding()
protected void packIfNotLaidOut()
packIfNotLaidOut
in class MustDialog
protected void setMinHeight()
protected int getListModification()
LIST_MODIFICATION_APPEND
,
LIST_MODIFICATION_UPDATE
or
LIST_MODIFICATION_REMOVE
protected void newPanel()
protected void newPanel(java.lang.String tabLabel)
tabLabel
- the label of the new tabprotected void newPanelWithExpertSearchTextArea(java.lang.String tabLabel)
tabLabel
- the label of the new expert search tabprotected void newPanel(java.lang.String tabLabel, MustMultChoice multChoice, java.awt.Dimension preferedSize)
tabLabel
- the label of the new tabmultChoice
- multiple choice to be presentedpreferedSize
- the preferred size of the scrollpaneprotected HalfDataComboBox createComboBox(java.lang.String dataLabel, DataObject sourceDataObject, java.lang.String visibleColumn)
dataLabel
- the line label.sourceDataObject
- the source data object that shall fill the content of the combo boxvisibleColumn
- the column to be used to fill the combo box from the source data objectprotected HalfDataComboBox createComboBox(java.lang.String dataLabel, DataObject sourceDataObject, java.lang.String visibleColumn, java.lang.String orderByColumn)
dataLabel
- the line label.sourceDataObject
- the source data object that shall fill the content of the combo boxvisibleColumn
- the column to be used to fill the combo box from the source data objectorderByColumn
- the column to be ordered byprotected HalfDataComboBox createComboBox(java.lang.String dataLabel, DataObject sourceDataObject, java.lang.String visibleColumn, java.lang.String orderByColumn, java.lang.String nameForNoChoice)
dataLabel
- the line label.sourceDataObject
- the source data object that shall fill the content of the combo boxvisibleColumn
- the column to be used to fill the combo box from the source data objectorderByColumn
- the column to be ordered bynameForNoChoice
- the expression to be used to indicate "no choice"protected VariableChoice createVariableChoice(java.lang.String dataLabel, java.lang.String[][] content)
dataLabel
- the line label.content
- the static content as a key / value tableprotected VariableChoice createVariableChoice(java.lang.String dataLabel, KeyValuePair[] keyValuePairs)
dataLabel
- the line label.keyValuePairs
- the content as an array of key value pairsprotected void createTextFieldForGlobalSearch(java.lang.String label, int length)
label
- the line labellength
- the length of the global search text fieldprotected MustTextField createTextField(java.lang.String label, int length)
label
- the line labellength
- the length of the text fieldprotected MustTextField createTextField(int length)
length
- the length of the fieldprotected MustIntField createIntField(java.lang.String label, int length)
label
- the line labellength
- the length of the fieldprotected MustIntField createIntField(int length)
length
- the length of the fieldpublic abstract Identifier[] getIdentifiers()
public int getSelectedTab()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
e
- the action event to be interpretedpublic void generalActionBeginnung()
protected void generalActionEnding()
protected boolean isInputAccepted()
protected boolean isChoosingAllowed()
protected boolean isModificationAllowed()
protected void listButtonAction()
protected void presentButtonAction()
protected void chooseButtonAction()
protected boolean isSelectionAccepted()
public boolean isClosingAllowed()
public void closeInstance()
closeInstance
in class MustDialog
protected java.lang.String getNotFoundNotification()
protected void clearMessage()
protected void setMessage(java.lang.String message)
message
- the message for the userprotected void setMessageToKeep(java.lang.String messageToKeep)
messageToKeep
- the message for the userprotected java.lang.Class<PropertyPrint> getPrintClass()
protected java.lang.Class<DataPresentation> getPresentationClass()
protected abstract Identifier getSelectedIdentifier()
protected abstract java.lang.String getSelectedItem()
protected abstract void clearSelection()
protected abstract void removeAllOfTheList()
protected abstract void beginListFill()
protected abstract int getListItemCount()
protected abstract void requestListingFocus()
protected abstract int getSelectedIndex()
protected abstract void selectListIndex(int indexToSelect)
indexToSelect
- the index to be selectedpublic abstract void setSelectedIdentifier(Identifier identifier)
identifier
- the identifier of the item to be selectedpublic Identifier getChosenIdentifier()
protected void delayedInititialActions()
public boolean acceptsClosingDueToInactivity()
MustDialog
acceptsClosingDueToInactivity
in class MustDialog
Copyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de