public abstract class ToolFrame<C extends ApplicationContext> extends ZFrame implements ApplicationToolWindow<C>
ToolDialog
javax.swing.JFrame.AccessibleJFrame
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
CROSSHAIR_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_CURSOR
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
CENTER, 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, toString
addImpl, 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, update
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
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, 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, 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, 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, transferFocusUpCycle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getRootPane
getLocation, getMinimumHeight, getMinimumWidth, getSize, getTitle, getToolkit, isPacked, setLocation, setLocationRelativeTo, setMinimumSize, setPreferredSize, shiftLocation
toDumpString, toDumpString, toString, toString
public ToolFrame(C ctx)
public void pack()
ZFrame
pack
in interface ToolWindow
pack
in class ZFrame
protected 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 ZFrame
protected final ApplicationToolWindowAdapter getWindowAdapter()
getWindowAdapter
in class ZFrame
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()
ZFrame
popup
in interface ToolWindow
popup
in class ZFrame
protected void doOnPopup() throws java.lang.Exception
java.lang.Exception
protected void closeByIcon()
closeByIcon
in class ZFrame
public final void close()
ZFrame
protected boolean doOnClose() throws java.lang.Exception
java.lang.Exception
protected 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()
Clearable
public final boolean apply()
doOnApply()
and in case of failure doOnApplyError(Exception)
apply
in interface Applieable
protected void doOnApply() throws java.lang.Exception
java.lang.Exception
protected boolean doOnCancel()
protected void doOnApplyError(java.lang.Exception e)
ToolDialog.doOnApply()
.
Maybe overridden to provide a custom error handling.public final void cancel()
Cancellable
cancel
in interface Cancellable
public final boolean wasCancelled()
Cancellable
wasCancelled
in interface Cancellable
public 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 SimpleLogSupport
public final void logError(java.lang.String message, java.lang.Exception e)
logError
in interface SimpleLogSupport
public final void logError(java.lang.String message)
logError
in interface SimpleLogSupport
public final void logWarning(java.lang.String message)
logWarning
in interface SimpleLogSupport
public final void logInfo(java.lang.String message)
logInfo
in interface SimpleLogSupport
public final void logVerbose(java.lang.String message)
logVerbose
in interface SimpleLogSupport
public final void logDebug(java.lang.String message)
logDebug
in interface SimpleLogSupport
public final void logDump(java.lang.String message)
logDump
in interface SimpleLogSupport
public final LogChannel getLogChannel()
getLogChannel
in interface SimpleLogSupport
public final void setLogChannel(LogChannel logCh)
setLogChannel
in interface SimpleLogSupport
public final boolean isLogDebug()
isLogDebug
in interface SimpleLogSupport
public final boolean isLogVerbose()
isLogVerbose
in interface SimpleLogSupport
Copyright © 2014 EsprIT-Systems. All Rights Reserved.