public class ToolDialog<C extends ApplicationContext> extends ZDialog implements ApplicationToolWindow<C>
Applieable GUI dialogs. It provides default Apply-/Clear-/Close-/Cancel-buttons
depending on which ones are configured by just overriding the according hasXXButton() methods to return true.javax.swing.JDialog.AccessibleJDialogjava.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityTypejava.awt.Window.AccessibleAWTWindow, java.awt.Window.TypeaccessibleContext, rootPane, rootPaneCheckingEnabledBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTCENTER, EAST, NORTH, SOUTH, WEST| Constructor and Description |
|---|
ToolDialog(C ctx) |
ToolDialog(C ctx,
NlsKey nls) |
ToolDialog(C ctx,
NlsKey nls,
java.awt.Component caller) |
ToolDialog(C ctx,
java.awt.Window parent) |
ToolDialog(C ctx,
java.awt.Window parent,
NlsKey nls) |
ToolDialog(C ctx,
java.awt.Window parent,
NlsKey nls,
java.awt.Component caller) |
| Modifier and Type | Method and Description |
|---|---|
void |
addApplyListener(ApplyEvent.Listener l) |
boolean |
apply()
This method calls performApplyAction() and in case of failure handleApplyError(e)
|
void |
cancel()
Cancels the dialog and closes it.
|
void |
clear()
Clears the content
|
void |
close()
Just makes the dialog invisible.
|
protected void |
closeByIcon()
Overridden to cancel the dialog
|
protected ButtonPanel |
createButtonPanel()
Returns the
ButtonPanel to be filled with standard buttons |
protected ApplicationToolWindowAdapter |
createWindowAdapter() |
protected void |
doOnApply()
Should be overridden in order to provide an apply action
|
protected void |
doOnApplyError(java.lang.Exception e)
Handles an exception raising from
doOnApply(). |
protected boolean |
doOnCancel()
May be overridden if a special action should be done on cancellation.
|
protected boolean |
doOnClose()
This method is called before this dialog is made invisible.
|
protected void |
doOnPopup()
This method is called before a dialog is made visible.
|
C |
getApplicationContext() |
Applier |
getApplier()
Returns an ActionListener that calls the apply() method of this dialog.
|
ApplyAndCloseButton |
getApplyAndCloseButton() |
ApplyButton |
getApplyButton() |
ButtonPanel |
getButtonPanel() |
java.awt.Component |
getCaller()
Returns the component, if any, on which this dialog is aligned.
|
CancelButton |
getCancelButton() |
ClearButton |
getClearButton() |
CloseButton |
getCloseButton() |
LogChannel |
getLogChannel() |
protected WindowAlignment |
getPreferredWindowAlignment() |
protected ApplicationToolWindowAdapter |
getWindowAdapter() |
protected boolean |
hasApplyAndCloseButton()
Defines whether an ApplyAndClose button should be displayed (default false).
|
protected boolean |
hasApplyButton()
Defines whether an Apply button should be displayed (default false).
|
protected boolean |
hasButtonPanel()
May be overridden to return false if no default button-panel is desired.
|
protected boolean |
hasCancelButton()
Defines whether a Cancel button should be displayed (default false).
|
protected boolean |
hasClearButton()
Defines whether a ClearButton should be displayed (default false).
|
protected boolean |
hasCloseButton()
Defines whether a Close button should be displayed (default false).
|
protected boolean |
isClosedOnApply()
Defines whether the dialog should be closed on apply - default is true
|
boolean |
isLogDebug() |
boolean |
isLogVerbose() |
protected void |
locate()
Locates this dialog relative to its parent or, if specified relative
to its calling component (usually a Button)
|
void |
logDebug(java.lang.String message) |
void |
logDump(java.lang.String message) |
void |
logError(java.lang.String message) |
void |
logError(java.lang.String message,
java.lang.Exception e) |
void |
logFatal(java.lang.String message,
java.lang.Exception e) |
void |
logInfo(java.lang.String message) |
void |
logVerbose(java.lang.String message) |
void |
logWarning(java.lang.String message) |
void |
pack()
Overridden to store the minimum size for size control
|
void |
popup()
Pops up the dialog to be visible.
|
void |
removeApplyListener(ApplyEvent.Listener l) |
void |
setDefaultButton(javax.swing.JButton button) |
void |
setLogChannel(LogChannel logCh) |
void |
setRelocateOnPopup(boolean isRelocateOnPopup)
Defines whether the Dialog is repositioned by calling
locate()
on each popup. |
boolean |
wasCancelled()
Returns true if the dialog was cancelled.
|
dispose, getMinimumHeight, getMinimumWidth, isDisposeOnClose, isErrorAttachable, isLocated, isPacked, registerSubDialog, repack, setLocation, setLocationRelativeTo, setLocationRelativeTo, setLocationToCenter, setTitle, setVisible, shiftLocation, toDumpString, toDumpString, toString, toStringaddImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, updateaddNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBackaddPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, 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, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocationByPlatform, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFrontadd, 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, validateTreeaction, 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, transferFocus, transferFocusBackward, transferFocusUpCycleclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetRootPanegetLocation, getMinimumHeight, getMinimumWidth, getSize, getTitle, getToolkit, isPacked, setLocation, setLocationRelativeTo, setMinimumSize, setPreferredSize, shiftLocationtoDumpString, toDumpString, toString, toStringpublic ToolDialog(C ctx)
public ToolDialog(C ctx, java.awt.Window parent)
public void pack()
ZDialogpack in interface ToolWindowpack in class ZDialogprotected ButtonPanel createButtonPanel()
ButtonPanel to be filled with standard buttonsprotected final ApplicationToolWindowAdapter createWindowAdapter()
createWindowAdapter in class ZDialogprotected final ApplicationToolWindowAdapter getWindowAdapter()
getWindowAdapter in class ZDialogpublic final C getApplicationContext()
getApplicationContext in interface ApplicationObject<C extends ApplicationContext>public final java.awt.Component getCaller()
public final void setRelocateOnPopup(boolean isRelocateOnPopup)
locate()
on each popup.setRelocateOnPopup in interface ApplicationToolWindow<C extends ApplicationContext>public final void setDefaultButton(javax.swing.JButton button)
protected void locate()
protected WindowAlignment getPreferredWindowAlignment()
public final void popup()
popup in interface ToolWindowpopup in class ZDialogprotected void doOnPopup()
throws java.lang.Exception
java.lang.Exceptionpublic final void close()
ZDialogprotected boolean doOnClose()
throws java.lang.Exception
java.lang.Exceptionpublic final void cancel()
cancel in interface CancellablewasCancelled()protected void closeByIcon()
closeByIcon in class ZDialogpublic final boolean wasCancelled()
wasCancelled in interface Cancellablecancel()public final boolean apply()
apply in interface Applieableprotected void doOnApply()
throws java.lang.Exception
java.lang.Exceptionprotected boolean doOnCancel()
protected void doOnApplyError(java.lang.Exception e)
doOnApply().
Maybe overridden to provide a custom error handling.public void clear()
Clearableprotected boolean isClosedOnApply()
public final Applier getApplier()
protected boolean hasButtonPanel()
protected boolean hasApplyAndCloseButton()
protected boolean hasCloseButton()
protected boolean hasApplyButton()
protected boolean hasCancelButton()
protected boolean hasClearButton()
public final ApplyAndCloseButton getApplyAndCloseButton()
public final ClearButton getClearButton()
public final CancelButton getCancelButton()
public final ApplyButton getApplyButton()
public final CloseButton getCloseButton()
public final ButtonPanel getButtonPanel()
public final void addApplyListener(ApplyEvent.Listener l)
public final void removeApplyListener(ApplyEvent.Listener l)
public final void logFatal(java.lang.String message,
java.lang.Exception e)
logFatal in interface SimpleLogSupportpublic final void logError(java.lang.String message,
java.lang.Exception e)
logError in interface SimpleLogSupportpublic final void logError(java.lang.String message)
logError in interface SimpleLogSupportpublic final void logWarning(java.lang.String message)
logWarning in interface SimpleLogSupportpublic final void logInfo(java.lang.String message)
logInfo in interface SimpleLogSupportpublic final void logVerbose(java.lang.String message)
logVerbose in interface SimpleLogSupportpublic final void logDebug(java.lang.String message)
logDebug in interface SimpleLogSupportpublic final void logDump(java.lang.String message)
logDump in interface SimpleLogSupportpublic final LogChannel getLogChannel()
getLogChannel in interface SimpleLogSupportpublic final void setLogChannel(LogChannel logCh)
setLogChannel in interface SimpleLogSupportpublic final boolean isLogDebug()
isLogDebug in interface SimpleLogSupportpublic final boolean isLogVerbose()
isLogVerbose in interface SimpleLogSupportCopyright © 2014 EsprIT-Systems. All Rights Reserved.