public abstract class ToolFrame<C extends ApplicationContext> extends ZFrame implements ApplicationToolWindow<C>
ToolDialogjavax.swing.JFrame.AccessibleJFramejava.awt.Window.AccessibleAWTWindow, java.awt.Window.TypeaccessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabledCROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSORBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTCENTER, EAST, NORTH, SOUTH, WEST| Constructor and Description |
|---|
ToolFrame(C ctx) |
ToolFrame(C ctx,
NlsKey titleKey) |
ToolFrame(C ctx,
NlsKey titleKey,
java.awt.Component caller) |
| Modifier and Type | Method and Description |
|---|---|
void |
addApplyListener(ApplyEvent.Listener l) |
boolean |
apply()
This method calls
doOnApply() and in case of failure doOnApplyError(Exception) |
void |
cancel()
Cancels the Dialog.
|
void |
clear()
Clears the content
|
void |
close()
Makes the frame 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
ToolDialog.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 frame is made invisible.
|
protected void |
doOnPopup()
This method is called before a frame 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 caller of this frame to which the frame should align.
|
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 frame should be closed on apply - default is true
|
boolean |
isLogDebug() |
boolean |
isLogVerbose() |
protected void |
locate()
Locates this frame 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 isPacked state
|
void |
popup()
Pops up the frame to become 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()
Tells whether a Dialog has been cancelled.
|
getMinimumHeight, getMinimumWidth, isErrorAttachable, isLocated, isPacked, repack, setIcon, setIcon, setLocation, setLocationRelativeTo, setLocationRelativeTo, setLocationToCenter, setTitle, setVisible, shiftLocation, toDumpString, toDumpString, toString, toStringaddImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, updateaddNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecoratedaddPropertyChangeListener, 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, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocationByPlatform, setMinimumSize, setModalExclusionType, setSize, setSize, setType, show, toBack, 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, 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 ToolFrame(C ctx)
public void pack()
ZFramepack in interface ToolWindowpack in class ZFrameprotected ButtonPanel createButtonPanel()
ButtonPanel to be filled with standard buttonspublic final C getApplicationContext()
getApplicationContext in interface ApplicationObject<C extends ApplicationContext>protected ApplicationToolWindowAdapter createWindowAdapter()
createWindowAdapter in class ZFrameprotected final ApplicationToolWindowAdapter getWindowAdapter()
getWindowAdapter in class ZFramepublic 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()
ZFramepopup in interface ToolWindowpopup in class ZFrameprotected void doOnPopup()
throws java.lang.Exception
java.lang.Exceptionprotected void closeByIcon()
closeByIcon in class ZFramepublic final void close()
ZFrameprotected boolean doOnClose()
throws java.lang.Exception
java.lang.Exceptionprotected boolean hasButtonPanel()
protected boolean hasApplyAndCloseButton()
protected boolean hasCloseButton()
protected boolean hasApplyButton()
protected boolean hasClearButton()
protected boolean hasCancelButton()
protected boolean isClosedOnApply()
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 void clear()
Clearablepublic final boolean apply()
doOnApply() and in case of failure doOnApplyError(Exception)apply in interface Applieableprotected void doOnApply()
throws java.lang.Exception
java.lang.Exceptionprotected boolean doOnCancel()
protected void doOnApplyError(java.lang.Exception e)
ToolDialog.doOnApply().
Maybe overridden to provide a custom error handling.public final void cancel()
Cancellablecancel in interface Cancellablepublic final boolean wasCancelled()
CancellablewasCancelled in interface Cancellablepublic final Applier getApplier()
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.