|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel net.infonode.gui.panel.BaseContainer net.infonode.gui.panel.BasePanel net.infonode.docking.DockingWindow
public abstract class DockingWindow
This is the base class for all types of docking windows. The windows are structured in a tree, typically with a
RootWindow
at the root. Each DockingWindow has a window parent and a number of child windows.
Warning: the non-public methods in this class can be changed in non-compatible ways in future versions.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
private static int |
DROP_FLOATING_YOFFSET
|
private DockingWindow |
lastFocusedChildWindow
|
private java.lang.ref.WeakReference |
lastRootWindow
|
private java.util.ArrayList |
listeners
|
private java.util.ArrayList |
mouseButtonListeners
|
private static int |
optimizeDepth
|
private static java.util.HashSet |
optimizeWindows
|
private WindowPopupMenuFactory |
popupMenuFactory
|
private PropertyMapListener |
propertiesListener
|
private PropertyMapTreeListener |
propertyObjectTreeListener
|
private WindowTab |
tab
|
private static int |
updateModelDepth
|
private WindowItem |
windowItem
|
private DockingWindow |
windowParent
|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
protected |
DockingWindow(WindowItem windowItem)
|
Method Summary | |
---|---|
protected DropAction |
acceptChildDrop(java.awt.Point p,
DockingWindow window)
|
(package private) DropAction |
acceptDrop(java.awt.Point p,
DockingWindow window)
|
protected DropAction |
acceptInteriorDrop(java.awt.Point p,
DockingWindow window)
|
protected DropAction |
acceptSplitDrop(java.awt.Point p,
DockingWindow window,
int splitDistance)
|
protected boolean |
acceptsSplitWith(DockingWindow window)
|
void |
addListener(DockingWindowListener listener)
Adds a listener which will reveive events for this window and all child windows. |
void |
addTabMouseButtonListener(MouseButtonListener listenerDocking)
Adds a listener that receives mouse button events for window tabs. |
protected DockingWindow |
addWindow(DockingWindow window)
|
protected void |
addWindowItem(DockingWindow w,
int index)
|
protected void |
afterWindowRemoved(DockingWindow window)
|
protected void |
beforeDrop(DockingWindow target)
|
protected static void |
beginOptimize(DockingWindow window)
|
protected static void |
beginUpdateModel()
|
(package private) void |
childGainedFocus(DockingWindow child,
View view)
|
protected boolean |
childInsideTab()
|
protected void |
childRemoved(DockingWindow child)
|
protected void |
cleanUpModel()
|
protected void |
clearChildrenFocus(DockingWindow child,
View view)
|
protected void |
clearFocus(View view)
|
void |
close()
Removes this window from it's window parent. |
void |
closeWithAbort()
Same as close() , but the DockingWindowListener.windowClosing(DockingWindow) method of
the window listeners will be called before closing the window, giving them the possibility to abort the close
operation. |
protected abstract PropertyMap |
createPropertyObject()
|
protected DropAction |
createTabWindow(DockingWindow window)
|
protected void |
detach()
|
protected DropAction |
doAcceptDrop(java.awt.Point p,
DockingWindow window)
|
void |
dock()
Docks the window to the RootWindow to the location it had before it was undocked. |
void |
dockWithAbort()
Same as dock() , but the DockingWindowListener.windowDocking(DockingWindow) method of
the window listeners will be called before docking the window, giving them the possibility to abort the dock
operation. |
private void |
doFireWindowDocked(DockingWindow window)
|
private void |
doFireWindowMinimized(DockingWindow window)
|
private void |
doFireWindowRestored(DockingWindow window)
|
private void |
doFireWindowUndocked(DockingWindow window)
|
private void |
doMinimize()
|
private void |
doMinimize(Direction direction)
|
protected abstract void |
doRemoveWindow(DockingWindow window)
|
protected abstract void |
doReplace(DockingWindow oldWindow,
DockingWindow newWindow)
|
private java.util.ArrayList |
doRestore()
|
private DockingWindow |
doRestoreFromMaximize()
|
private void |
doUpdate()
|
protected static void |
endOptimize()
|
protected static void |
endUpdateModel()
|
private void |
findViews(java.util.ArrayList views)
|
(package private) void |
fireTabWindowMouseButtonEvent(DockingWindow window,
java.awt.event.MouseEvent event)
|
(package private) void |
fireTabWindowMouseButtonEvent(java.awt.event.MouseEvent event)
|
protected void |
fireTitleChanged()
|
protected void |
fireViewFocusChanged(View previouslyFocusedView,
View focusedView)
|
private void |
fireWindowAdded(DockingWindow addedToWindow,
DockingWindow addedWindow)
|
private void |
fireWindowClosed(DockingWindow window)
|
private void |
fireWindowClosing(DockingWindow window)
|
(package private) void |
fireWindowDocked(java.util.ArrayList dockedViews)
|
(package private) void |
fireWindowDocked(DockingWindow window,
DockingWindow[] oldAncestors)
|
(package private) void |
fireWindowDocking(DockingWindow window)
|
protected void |
fireWindowHidden(DockingWindow window)
|
(package private) void |
fireWindowMaximized(DockingWindow window)
|
(package private) void |
fireWindowMaximizing(DockingWindow window)
|
(package private) void |
fireWindowMinimized(DockingWindow window,
DockingWindow[] oldAncestors)
|
(package private) void |
fireWindowMinimizing(DockingWindow window)
|
private void |
fireWindowRemoved(DockingWindow removedFromWindow,
DockingWindow removedWindow)
|
(package private) void |
fireWindowRestored(DockingWindow window)
|
(package private) void |
fireWindowRestoring(DockingWindow window)
|
protected void |
fireWindowShown(DockingWindow window)
|
(package private) void |
fireWindowUndocked(DockingWindow window,
DockingWindow[] oldAncestors)
|
(package private) void |
fireWindowUndocking(DockingWindow window)
|
protected DockingWindow[] |
getAncestors()
|
protected DockingWindow |
getBestFittedWindow(DockingWindow parentWindow)
|
(package private) DropFilter |
getChildDropFilter()
|
protected int |
getChildEdgeDepth(DockingWindow window,
Direction dir)
|
abstract DockingWindow |
getChildWindow(int index)
Returns the child window with index index. |
abstract int |
getChildWindowCount()
Returns the number of child windows. |
int |
getChildWindowIndex(DockingWindow window)
Returns the index of a child windows. |
private DockingWindow |
getContainer(WindowItem topItem,
WindowItem item)
|
protected DockingWindow |
getContentWindow(DockingWindow parent)
|
(package private) DropAction |
getDefaultDropAction()
|
protected int |
getEdgeDepth(Direction dir)
|
private int |
getEdgeDistance(java.awt.Point p,
Direction dir)
|
abstract javax.swing.Icon |
getIcon()
Returns the icon for this window. |
(package private) DropFilter |
getInsertTabDropFilter()
|
(package private) DropFilter |
getInteriorDropFilter()
|
DockingWindow |
getLastFocusedChildWindow()
Returns the child window that last contained focus. |
private java.util.ArrayList |
getListeners()
|
protected DockingWindow |
getLocationWindow()
|
private java.util.ArrayList |
getMouseButtonListeners()
|
protected DockingWindow |
getOptimizedWindow()
Returns the result after removing unnecessary tab windows which contains only one tab. |
WindowPopupMenuFactory |
getPopupMenuFactory()
Returns the popup menu factory for this window. |
protected DockingWindow |
getPreferredFocusChild()
|
Direction |
getPreferredMinimizeDirection()
Gets the preferred minimize direction of this window. |
protected abstract PropertyMap |
getPropertyObject()
|
RootWindow |
getRootWindow()
Returns the RootWindow which contains this window, null if there is none. |
private Direction |
getSplitDirection(java.awt.Point p)
|
(package private) DropFilter |
getSplitDropFilter()
|
(package private) WindowTab |
getTab()
|
java.lang.String |
getTitle()
Returns the title of this window. |
protected boolean |
getUpdateModel()
|
protected WindowItem |
getWindowItem()
|
DockingWindow |
getWindowParent()
Returns the window parent of this window. |
DockingWindowProperties |
getWindowProperties()
Returns the properties for this window. |
protected boolean |
hasParent(DockingWindow w)
|
protected void |
init()
|
private static void |
insertTab(TabWindow tabWindow,
DockingWindow window)
|
protected boolean |
insideTab()
|
protected void |
internalClose()
|
protected DockingWindow |
internalReplaceChildWindow(DockingWindow oldWindow,
DockingWindow newWindow)
|
protected boolean |
isChildShowingInRootWindow(DockingWindow child)
|
boolean |
isClosable()
Returns true if this window can be closed by the user. |
boolean |
isDockable()
Returns true if this window can be docked to the root window from a floating window. |
boolean |
isMaximizable()
Returns true if this window can be maximized by the user. |
boolean |
isMaximized()
Returns true if this window has a root window and is maximized in that root window or in a floating window. |
boolean |
isMinimizable()
Returns true if this window can be minimized by the user. |
boolean |
isMinimized()
Returns true if this window is minimized, ie located in a WindowBar . |
boolean |
isRestorable()
Returns true if this window can be restored by the user. |
protected boolean |
isShowingInRootWindow()
|
boolean |
isUndockable()
Returns true if this window can be undocked to a floating window. |
boolean |
isUndocked()
|
void |
makeVisible()
Makes this window visible. |
void |
maximize()
Maximizes this window in its root window or in its floating window. |
void |
maximizeWithAbort()
Same as maximize() , but the DockingWindowListener.windowMaximized(DockingWindow) method of
the window listeners will be called before maximizing the window, giving them the possibility to abort the maximize
operation. |
void |
minimize()
Minimizes this window. |
void |
minimize(Direction direction)
Minimizes this window to a WindowBar located in direction. |
void |
minimizeWithAbort()
Same as minimize() , but the DockingWindowListener.windowMinimizing(DockingWindow) method of
the window listeners will be called before minimizing the window, giving them the possibility to abort the minimize
operation. |
void |
minimizeWithAbort(Direction direction)
Same as minimize(Direction) , but the DockingWindowListener.windowMinimizing(DockingWindow) method of
the window listeners will be called before minimizing the window, giving them the possibility to abort the minimize
operation. |
protected boolean |
needsTitleWindow()
|
protected void |
notifyListeners(WindowAncestors ancestors)
|
protected DockingWindow |
oldRead(java.io.ObjectInputStream in,
ReadContext context)
|
protected static void |
optimizeAfter(DockingWindow window,
java.lang.Runnable runnable)
|
protected void |
optimizeWindowLayout()
|
protected void |
readLocations(java.io.ObjectInputStream in,
RootWindow rootWindow,
int version)
|
protected void |
removeChildWindow(DockingWindow window)
|
void |
removeListener(DockingWindowListener listener)
Removes a previously added listener. |
void |
removeTabMouseButtonListener(MouseButtonListener listenerDocking)
Removes a mouse button listener that has been previously added using the addTabMouseButtonListener(MouseButtonListener) . |
protected void |
removeWindow(DockingWindow window)
|
(package private) abstract void |
removeWindowComponent(DockingWindow window)
|
void |
replaceChildWindow(DockingWindow oldWindow,
DockingWindow newWindow)
Replaces a child window with another window. |
void |
restore()
Restores this window to the location before it was minimized, maximized or closed. |
void |
restoreFocus()
Requests that the last focused child window becomes visible and that focus is restored to the last focused component in that window. |
private void |
restoreItem()
|
private void |
restoreViews(java.util.ArrayList views)
|
(package private) abstract void |
restoreWindowComponent(DockingWindow window)
|
void |
restoreWithAbort()
Same as restore() , but the DockingWindowListener.windowRestoring(DockingWindow) method of
the window listeners will be called before restoring the window, giving them the possibility to abort the restore
operation. |
protected void |
rootChanged(RootWindow oldRoot,
RootWindow newRoot)
|
protected void |
setFocused(boolean focused)
|
protected void |
setLastMinimizedDirection(Direction direction)
|
private void |
setListeners(java.util.ArrayList listeners)
|
private void |
setMouseButtonListeners(java.util.ArrayList listeners)
|
void |
setPopupMenuFactory(WindowPopupMenuFactory popupMenuFactory)
Sets the popup menu factory for this window. |
void |
setPreferredMinimizeDirection(Direction direction)
Sets the preferred minimize direction of this window. |
private void |
setWindowItem(WindowItem windowItem)
|
private void |
setWindowParent(DockingWindow window)
|
protected void |
showChildWindow(DockingWindow window)
|
(package private) void |
showPopupMenu(java.awt.event.MouseEvent event)
|
protected boolean |
showsWindowTitle()
|
protected DropAction |
split(DockingWindow window,
Direction splitDir)
|
SplitWindow |
split(DockingWindow splitWithWindow,
Direction direction,
float dividerLocation)
Splits this window in the given direction. |
DockingWindowDragger |
startDrag(RootWindow dropTarget)
Starts a drag and drop operation for this window. |
protected WindowAncestors |
storeAncestors()
|
java.lang.String |
toString()
|
FloatingWindow |
undock(java.awt.Point location)
Undocks this window from it's window parent i.e. creates a FloatingWindow containing this window. |
FloatingWindow |
undockWithAbort(java.awt.Point location)
Same as undock(Point) , but the DockingWindowListener.windowUndocking(DockingWindow) method of
the window listeners will be called before undocking the window, giving them the possibility to abort the undock
operation. |
protected abstract void |
update()
|
protected void |
updateButtonVisibility()
|
protected void |
updateWindowItem(RootWindow rootWindow)
|
protected void |
updateWindowItems()
|
protected void |
write(java.io.ObjectOutputStream out,
WriteContext context,
ViewWriter viewWriter)
|
protected void |
writeLocations(java.io.ObjectOutputStream out)
|
Methods inherited from class net.infonode.gui.panel.BasePanel |
---|
setComponent, setSouthComponent |
Methods inherited from class net.infonode.gui.panel.BaseContainer |
---|
paintComponent, setBackground, setFont, setForeground, setOpaque, setUI |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
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, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, 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, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
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, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
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, getBackground, 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, hide, 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, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static int DROP_FLOATING_YOFFSET
private DockingWindow windowParent
private WindowTab tab
private DockingWindow lastFocusedChildWindow
private WindowPopupMenuFactory popupMenuFactory
private java.util.ArrayList mouseButtonListeners
private java.util.ArrayList listeners
private PropertyMapListener propertiesListener
private PropertyMapTreeListener propertyObjectTreeListener
private static java.util.HashSet optimizeWindows
private static int optimizeDepth
private WindowItem windowItem
private java.lang.ref.WeakReference lastRootWindow
private static int updateModelDepth
Constructor Detail |
---|
protected DockingWindow(WindowItem windowItem)
Method Detail |
---|
public abstract javax.swing.Icon getIcon()
public abstract DockingWindow getChildWindow(int index)
index
- the child window index
public abstract int getChildWindowCount()
protected abstract void doReplace(DockingWindow oldWindow, DockingWindow newWindow)
protected abstract void doRemoveWindow(DockingWindow window)
protected abstract void update()
abstract void removeWindowComponent(DockingWindow window)
abstract void restoreWindowComponent(DockingWindow window)
protected void init()
private void doUpdate()
protected void addWindowItem(DockingWindow w, int index)
protected final void updateWindowItems()
public void setPreferredMinimizeDirection(Direction direction)
Sets the preferred minimize direction of this window. If the WindowBar
in this direction is enabled this
window will be placed on that bar when minimize()
is called.
Note that a window will "remember" the last WindowBar
it was added to so the preferred minimize direction
is changed when the window is added to another WindowBar
.
direction
- the preferred minimize direction of this window, null (which is default value) means use the
closest, enabled WindowBar
public Direction getPreferredMinimizeDirection()
Gets the preferred minimize direction of this window. See setPreferredMinimizeDirection(net.infonode.util.Direction)
for more information.
WindowBar
is usedprivate java.util.ArrayList getMouseButtonListeners()
private void setMouseButtonListeners(java.util.ArrayList listeners)
private java.util.ArrayList getListeners()
private void setListeners(java.util.ArrayList listeners)
public boolean isUndocked()
public void addTabMouseButtonListener(MouseButtonListener listenerDocking)
Adds a listener that receives mouse button events for window tabs. The listener will be called when a mouse button is pressed, clicked or released on a window tab of this window or a descendant of this window.
The listeners are called in the reverse order they were added, so the last added listener will be called first. When all the listeners of this window has been called, the event is propagated up to the window parent of this window, if there is one.
The MouseEvent
source is the docking window connected to the tab in
which the mouse event occured. The event point is the mouse coordinate
where the event occured relative to the window.
listenerDocking
- the listenerpublic void removeTabMouseButtonListener(MouseButtonListener listenerDocking)
addTabMouseButtonListener(MouseButtonListener)
.
listenerDocking
- the listenervoid fireTabWindowMouseButtonEvent(java.awt.event.MouseEvent event)
void fireTabWindowMouseButtonEvent(DockingWindow window, java.awt.event.MouseEvent event)
public void addListener(DockingWindowListener listener)
listener
- the listenerpublic void removeListener(DockingWindowListener listener)
listener
- the listenerpublic DockingWindow getWindowParent()
public SplitWindow split(DockingWindow splitWithWindow, Direction direction, float dividerLocation)
splitWithWindow
- the splitWithWindow which to split withdirection
- the split directiondividerLocation
- the relative split divider location (0 - 1)
public DockingWindowDragger startDrag(RootWindow dropTarget)
dropTarget
- the RootWindow
in which the window can be dropped
DockingWindowDragger
object which controls the drag and drop operationpublic DockingWindowProperties getWindowProperties()
public RootWindow getRootWindow()
RootWindow
which contains this window, null if there is none.
RootWindow
, null if there is nonepublic void restoreWithAbort() throws OperationAbortedException
restore()
, but the DockingWindowListener.windowRestoring(DockingWindow)
method of
the window listeners will be called before restoring the window, giving them the possibility to abort the restore
operation.
OperationAbortedException
- if the restore operation was aborted by a window listenerrestore()
,
DockingWindowListener.windowMinimizing(DockingWindow)
public void restore()
private DockingWindow doRestoreFromMaximize()
private java.util.ArrayList doRestore()
public void close()
Removes this window from it's window parent. If the window parent is a split window or a tab window with one child, it will be removed as well.
The location of this window is saved and the window can be restored to that location using the
restore()
method.
This method will call the DockingWindowListener.windowClosed(DockingWindow)
method of all the listeners
of this window and all window ancestors. The listeners of child windows will not be notified, for example closing
a tab window containing views will not notify the listeners of views in that tab window.
public void closeWithAbort() throws OperationAbortedException
close()
, but the DockingWindowListener.windowClosing(DockingWindow)
method of
the window listeners will be called before closing the window, giving them the possibility to abort the close
operation.
OperationAbortedException
- if the close operation was aborted by a window listenerclose()
,
DockingWindowListener.windowClosing(DockingWindow)
public FloatingWindow undock(java.awt.Point location)
Undocks this window from it's window parent i.e. creates a FloatingWindow
containing this window.
The window can be docked again by calling dock()
.
This method will call the DockingWindowListener.windowUndocked(DockingWindow)
method of all the listeners
of this window and all window ancestors. The listeners of child windows will not be notified, for example undocking
a tab window containing views will not notify the listeners of views in that tab window.
location
- floating window location in screen coordinates
public FloatingWindow undockWithAbort(java.awt.Point location) throws OperationAbortedException
undock(Point)
, but the DockingWindowListener.windowUndocking(DockingWindow)
method of
the window listeners will be called before undocking the window, giving them the possibility to abort the undock
operation.
location
- floating window location in screen coordinates
OperationAbortedException
- if the undock operation was aborted by a window listenerundock(Point)
,
DockingWindowListener.windowClosing(DockingWindow)
public void dock()
Docks the window to the RootWindow to the location it had before it was undocked.
If the window can't be docked to the exact same location, a good approximation is performed. It's not guaranteed that the window is shown anywhere after this method has returned.
This method will call the DockingWindowListener.windowDocked(DockingWindow)
method of all the listeners
of this window and all window ancestors. The listeners of child windows will not be notified, for example docking
a tab window containing views will not notify the listeners of views in that tab window.
public void dockWithAbort() throws OperationAbortedException
dock()
, but the DockingWindowListener.windowDocking(DockingWindow)
method of
the window listeners will be called before docking the window, giving them the possibility to abort the dock
operation.
OperationAbortedException
- if the dock operation was aborted by a window listenerdock()
,
DockingWindowListener.windowDocking(DockingWindow)
public int getChildWindowIndex(DockingWindow window)
window
- the child window
public WindowPopupMenuFactory getPopupMenuFactory()
public void setPopupMenuFactory(WindowPopupMenuFactory popupMenuFactory)
popupMenuFactory
- the popup menu factory, null if no popup menu should be shownpublic boolean isMinimized()
WindowBar
.
public DockingWindow getLastFocusedChildWindow()
public final void maximize()
The location of this window is saved and the window can be restored to that location using the
restore()
method.
public void maximizeWithAbort() throws OperationAbortedException
maximize()
, but the DockingWindowListener.windowMaximized(DockingWindow)
method of
the window listeners will be called before maximizing the window, giving them the possibility to abort the maximize
operation.
OperationAbortedException
- if the maximize operation was aborted by a window listenermaximize()
,
DockingWindowListener.windowMinimizing(DockingWindow)
public boolean isMaximized()
public void minimize()
WindowBar
in the preferred minimize direction,
see setPreferredMinimizeDirection(net.infonode.util.Direction)
and getPreferredMinimizeDirection()
.
If the WindowBar
in that direction is not enabled, or the direction is null, thiw window is placed on the
closest enabled WindowBar
.
If no suitable WindowBar
was found or this window already is minimized, no action is performed.
The location of this window is saved and the window can be restored to that location using the
restore()
method.
public void minimize(Direction direction)
WindowBar
located in direction. If no suitable WindowBar
was
found or this window already is minimized, no action is performed.
The location of this window is saved and the window can be restored to that location using the
restore()
method.
direction
- the direction in which the window bar to be minimized to is locatedpublic void minimizeWithAbort() throws OperationAbortedException
minimize()
, but the DockingWindowListener.windowMinimizing(DockingWindow)
method of
the window listeners will be called before minimizing the window, giving them the possibility to abort the minimize
operation.
OperationAbortedException
- if the minimize operation was aborted by a window listenerminimize()
,
DockingWindowListener.windowMinimizing(DockingWindow)
public void minimizeWithAbort(Direction direction) throws OperationAbortedException
minimize(Direction)
, but the DockingWindowListener.windowMinimizing(DockingWindow)
method of
the window listeners will be called before minimizing the window, giving them the possibility to abort the minimize
operation.
OperationAbortedException
- if the minimize operation was aborted by a window listenerminimize(Direction)
,
DockingWindowListener.windowMinimizing(DockingWindow)
private void doMinimize()
private void doMinimize(Direction direction)
public boolean isMinimizable()
minimize()
public boolean isMaximizable()
maximize()
public boolean isClosable()
close()
,
closeWithAbort()
public boolean isRestorable()
restore()
public boolean isUndockable()
undock(Point)
public boolean isDockable()
dock()
public void replaceChildWindow(DockingWindow oldWindow, DockingWindow newWindow)
oldWindow
- the child window to replaceChildWindownewWindow
- the window to replaceChildWindow it withprotected DockingWindow internalReplaceChildWindow(DockingWindow oldWindow, DockingWindow newWindow)
public java.lang.String getTitle()
public java.lang.String toString()
toString
in class java.awt.Component
protected WindowAncestors storeAncestors()
protected void notifyListeners(WindowAncestors ancestors)
protected boolean isShowingInRootWindow()
protected boolean isChildShowingInRootWindow(DockingWindow child)
public void makeVisible()
TabWindow
parents containing this
window to be selected.
public void restoreFocus()
protected DockingWindow getPreferredFocusChild()
protected DockingWindow getOptimizedWindow()
protected DockingWindow getBestFittedWindow(DockingWindow parentWindow)
protected void internalClose()
protected void showChildWindow(DockingWindow window)
protected boolean insideTab()
protected boolean childInsideTab()
protected DockingWindow[] getAncestors()
private void fireWindowRemoved(DockingWindow removedFromWindow, DockingWindow removedWindow)
protected void fireWindowShown(DockingWindow window)
protected void fireViewFocusChanged(View previouslyFocusedView, View focusedView)
protected void fireWindowHidden(DockingWindow window)
private void fireWindowAdded(DockingWindow addedToWindow, DockingWindow addedWindow)
private void fireWindowClosing(DockingWindow window) throws OperationAbortedException
OperationAbortedException
private void fireWindowClosed(DockingWindow window)
void fireWindowUndocking(DockingWindow window) throws OperationAbortedException
OperationAbortedException
void fireWindowUndocked(DockingWindow window, DockingWindow[] oldAncestors)
private void doFireWindowUndocked(DockingWindow window)
void fireWindowMinimizing(DockingWindow window) throws OperationAbortedException
OperationAbortedException
void fireWindowMaximizing(DockingWindow window) throws OperationAbortedException
OperationAbortedException
void fireWindowRestoring(DockingWindow window) throws OperationAbortedException
OperationAbortedException
void fireWindowDocking(DockingWindow window) throws OperationAbortedException
OperationAbortedException
void fireWindowDocked(DockingWindow window, DockingWindow[] oldAncestors)
void fireWindowDocked(java.util.ArrayList dockedViews)
private void doFireWindowDocked(DockingWindow window)
private void doFireWindowRestored(DockingWindow window)
void fireWindowMaximized(DockingWindow window)
void fireWindowMinimized(DockingWindow window, DockingWindow[] oldAncestors)
private void doFireWindowMinimized(DockingWindow window)
void fireWindowRestored(DockingWindow window)
protected void setLastMinimizedDirection(Direction direction)
protected void clearChildrenFocus(DockingWindow child, View view)
void childGainedFocus(DockingWindow child, View view)
WindowTab getTab()
protected void childRemoved(DockingWindow child)
protected void updateButtonVisibility()
protected final void readLocations(java.io.ObjectInputStream in, RootWindow rootWindow, int version) throws java.io.IOException
java.io.IOException
protected void writeLocations(java.io.ObjectOutputStream out) throws java.io.IOException
java.io.IOException
protected static void beginOptimize(DockingWindow window)
protected static void endOptimize()
protected static void optimizeAfter(DockingWindow window, java.lang.Runnable runnable)
protected boolean needsTitleWindow()
protected boolean showsWindowTitle()
protected void optimizeWindowLayout()
protected DockingWindow getLocationWindow()
protected void fireTitleChanged()
protected DockingWindow getContentWindow(DockingWindow parent)
protected final void removeChildWindow(DockingWindow window)
protected final void removeWindow(DockingWindow window)
protected final void detach()
protected final DockingWindow addWindow(DockingWindow window)
protected void rootChanged(RootWindow oldRoot, RootWindow newRoot)
protected void clearFocus(View view)
private void setWindowParent(DockingWindow window)
private Direction getSplitDirection(java.awt.Point p)
private int getEdgeDistance(java.awt.Point p, Direction dir)
DropAction acceptDrop(java.awt.Point p, DockingWindow window)
DropAction getDefaultDropAction()
protected boolean acceptsSplitWith(DockingWindow window)
protected DropAction doAcceptDrop(java.awt.Point p, DockingWindow window)
protected DropAction acceptSplitDrop(java.awt.Point p, DockingWindow window, int splitDistance)
protected DropAction split(DockingWindow window, Direction splitDir)
protected void beforeDrop(DockingWindow target) throws OperationAbortedException
OperationAbortedException
protected DropAction createTabWindow(DockingWindow window)
protected DropAction acceptInteriorDrop(java.awt.Point p, DockingWindow window)
protected boolean hasParent(DockingWindow w)
protected DockingWindow oldRead(java.io.ObjectInputStream in, ReadContext context) throws java.io.IOException
java.io.IOException
protected abstract PropertyMap getPropertyObject()
protected abstract PropertyMap createPropertyObject()
void showPopupMenu(java.awt.event.MouseEvent event)
protected void setFocused(boolean focused)
protected int getEdgeDepth(Direction dir)
protected int getChildEdgeDepth(DockingWindow window, Direction dir)
protected DropAction acceptChildDrop(java.awt.Point p, DockingWindow window)
protected WindowItem getWindowItem()
protected boolean getUpdateModel()
private void findViews(java.util.ArrayList views)
private void restoreViews(java.util.ArrayList views)
protected static void beginUpdateModel()
protected static void endUpdateModel()
private void restoreItem()
private static void insertTab(TabWindow tabWindow, DockingWindow window)
private DockingWindow getContainer(WindowItem topItem, WindowItem item)
private void setWindowItem(WindowItem windowItem)
protected void updateWindowItem(RootWindow rootWindow)
protected void afterWindowRemoved(DockingWindow window)
protected void write(java.io.ObjectOutputStream out, WriteContext context, ViewWriter viewWriter) throws java.io.IOException
java.io.IOException
protected void cleanUpModel()
DropFilter getSplitDropFilter()
DropFilter getChildDropFilter()
DropFilter getInteriorDropFilter()
DropFilter getInsertTabDropFilter()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |