bibliothek.gui.dock.wizard
Class WizardSplitDockStation

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JLayeredPane
                  extended by bibliothek.gui.dock.station.OverpaintablePanel
                      extended by bibliothek.gui.dock.security.SecureContainer
                          extended by bibliothek.gui.dock.SplitDockStation
                              extended by bibliothek.gui.dock.wizard.WizardSplitDockStation
All Implemented Interfaces:
bibliothek.gui.dock.component.DockComponentRoot, bibliothek.gui.dock.DockElement, bibliothek.gui.dock.DockElementRepresentative, bibliothek.gui.dock.station.support.PlaceholderListItem<bibliothek.gui.Dockable>, bibliothek.gui.Dockable, bibliothek.gui.DockStation, ImageObserver, MenuContainer, Serializable, Accessible, Scrollable

public class WizardSplitDockStation
extends bibliothek.gui.dock.SplitDockStation
implements Scrollable

A WizardSplitDockStation has some additional restrictions and other behavior than an ordinary SplitDockStation:

Author:
Benjamin Sigg
See Also:
Serialized Form

Nested Class Summary
static class WizardSplitDockStation.Side
          the side where dockables are pushed to
 class WizardSplitDockStation.WizardLayoutManager
          This SplitLayoutManager adds restrictions on how a drag and drop operation can be performed, and what the boundaries of the children are: DnD operations must ensure that the Dockables remain in columns, see WizardSplitDockStation.WizardLayoutManager.ensureDropLocation(PutInfo)
 
Nested classes/interfaces inherited from class bibliothek.gui.dock.SplitDockStation
bibliothek.gui.dock.SplitDockStation.Access, bibliothek.gui.dock.SplitDockStation.Orientation
 
Nested classes/interfaces inherited from class javax.swing.JLayeredPane
JLayeredPane.AccessibleJLayeredPane
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class bibliothek.gui.dock.SplitDockStation
DISPLAYER_ID, DIVIDER_STRATEGY, dockStationListeners, LAYOUT_MANAGER, MAXIMIZE_ACCELERATOR, TITLE_ID
 
Fields inherited from class javax.swing.JLayeredPane
DEFAULT_LAYER, DRAG_LAYER, FRAME_CONTENT_LAYER, LAYER_PROPERTY, MODAL_LAYER, PALETTE_LAYER, POPUP_LAYER
 
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
WizardSplitDockStation(WizardSplitDockStation.Side side)
          Creates a new station.
 
Method Summary
 boolean drop(bibliothek.gui.Dockable dockable, bibliothek.gui.dock.station.split.SplitDockPlaceholderProperty property)
          Ensures that the dropped Dockable does not come to rest at a location that would destroy the columns.
protected  boolean dropAside(bibliothek.gui.dock.station.split.SplitNode neighbor, bibliothek.gui.dock.station.split.PutInfo.Put put, bibliothek.gui.Dockable dockable, bibliothek.gui.dock.station.split.Leaf leaf, double divider, bibliothek.gui.dock.DockHierarchyLock.Token token)
           
protected  boolean dropOver(bibliothek.gui.dock.station.split.Leaf leaf, bibliothek.gui.Dockable dockable, bibliothek.gui.dock.layout.DockableProperty property, bibliothek.gui.dock.station.support.CombinerSource source, bibliothek.gui.dock.station.support.CombinerTarget target)
           
 String getFactoryID()
           
 int getMaxColumnCount()
          Gets the maximal amount of columns.
 Dimension getMinimumSize()
           
 PersistentColumn[] getPersistentColumns()
           
 Dimension getPreferredScrollableViewportSize()
           
 Dimension getPreferredSize()
           
 int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction)
           
 boolean getScrollableTracksViewportHeight()
           
 boolean getScrollableTracksViewportWidth()
           
 int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction)
           
 WizardSplitDockStation.Side getSide()
          Gets the side to which this station leans.
 int getSideGap()
          Gets the size of the empty space at the moveable side of this station.
 WizardSpanStrategy getWizardSpanStrategy()
          Gets the strategy which is responsible for managing the Spans.
 WizardSplitDockStation.WizardLayoutManager getWizardSplitLayoutManager()
           
 boolean isResizeOnRemove()
          Tells whether the column of a removed Dockable is automatically resized.
protected  void paintOverlay(Graphics g)
           
 void resetToPreferredSizes()
          Changes the size of all columns and cells such that they met their preferred size.
 void revalidateOutside()
          Calls JComponent.revalidate() on the first JComponent that is outside of the current JScrollPane.
 void setController(bibliothek.gui.DockController controller)
           
 void setDividerSize(int dividerSize)
           
 void setMaxColumnCount(int maxColumnCount)
          Sets the maximum amount of columns that the user can create.
 void setPersistentColumns(bibliothek.gui.Dockable[][] columnsAndCells, int[][] cellSizes, int[] columnSizes)
           
protected  void setPut(bibliothek.gui.dock.station.split.PutInfo info)
           
 void setResizeOnRemove(boolean resizeOnRemove)
          If a Dockable is removed from this WizardSplitDockStation, then the column of the Dockable is resized such that it has again its preferred size.
 void setSide(WizardSplitDockStation.Side side)
          Sets the side to which this station leans.
 void setSideGap(int sideGap)
          Sets an empty space at the moveable side of this station.
protected  void unsetPut()
           
 
Methods inherited from class bibliothek.gui.dock.SplitDockStation
accept, accept, accept, addDockable, addDockableListener, addDockableStateListener, addDockHierarchyListener, addDockStationListener, addMouseInputListener, addSplitDockStationListener, asDockable, asDockStation, aside, bind, callDockUiUpdateTheme, canDrag, canReplace, changed, configureDisplayerHints, createFullScreenAction, createPlaceholderConverter, createRootHandler, createTree, createTree, discard, drag, drop, drop, drop, drop, drop, dropGrid, dropOver, dropTree, dropTree, fireFullScreenChanged, fireTitleExchanged, fireTitleExchanged, getAccess, getBorderSideSnapSize, getCombiner, getComponent, getComponentConfiguration, getConfigurableDisplayerHints, getController, getCurrentSplitLayoutManager, getDirectActionOffers, getDisplayerFactory, getDisplayers, getDividerSize, getDividerStrategy, getDockable, getDockableCount, getDockableLocationProperty, getDockablePathProperty, getDockablePathProperty, getDockablePlaceholderProperty, getDockableProperty, getDockParent, getDropInfo, getDropInfo, getElement, getFrontDockable, getFullScreen, getGlobalActionOffers, getIndirectActionOffers, getLayers, getLocalActionOffers, getLowestNode, getMinimumLeafSize, getNode, getNodeFactory, getPaint, getPlaceholderMapping, getPlaceholders, getPlaceholderStrategy, getPopupLocation, getRoot, getSideSnapSize, getSpanStrategy, getSplitLayoutManager, getTheme, getTitleIcon, getTitleText, getTitleToolTip, hasFullScreenAction, indexOfDockable, isAllowSideSnap, isChildShowing, isContinousDisplay, isDisabled, isDockableShowing, isDockableVisible, isExpandOnDoubleclick, isFullScreen, isResizingEnabled, isStationShowing, isStationVisible, isUsedAsTitle, isVisible, listBoundTitles, move, prepareDrag, prepareDrop, removeAllDockables, removeDockable, removeDockableListener, removeDockableStateListener, removeDockHierarchyListener, removeDockStationListener, removeMouseInputListener, removePlaceholder, removePlaceholders, removeSplitDockStationListener, replace, replace, requestChildDisplayer, requestChildDockTitle, requestDisplayer, requestDockTitle, resetTitleIcon, root, setAllowSideSnap, setBorderSideSnapSize, setComponentConfiguration, setContinousDisplay, setDisabled, setDividerStrategy, setDockParent, setDropInfo, setExpandOnDoubleclick, setFrontDockable, setFullScreen, setFullScreenAction, setMinimumLeafSize, setNextFullScreen, setNodeFactory, setPlaceholders, setPlaceholderStrategy, setResizingEnabled, setSideSnapSize, setSplitLayoutManager, setTitleIcon, setTitleText, setTitleToolTip, shouldFocus, shouldTransfersFocus, toString, unbind, unsetDropInfo, updateBounds, updateConfigurableDisplayerHints, updateTheme, updateVisibility, visit
 
Methods inherited from class bibliothek.gui.dock.security.SecureContainer
createGlassPane, install, isUseGlassPane, setUseGlassPane, uninstall
 
Methods inherited from class bibliothek.gui.dock.station.OverpaintablePanel
doLayout, getBasePane, getContentPane, getMaximumSize, isSolid, setBasePane, setContentPane, setSolid
 
Methods inherited from class javax.swing.JLayeredPane
addImpl, getAccessibleContext, getComponentCountInLayer, getComponentsInLayer, getComponentToLayer, getIndexOf, getLayer, getLayer, getLayeredPaneAbove, getObjectForLayer, getPosition, highestLayer, insertIndexForLayer, isOptimizedDrawingEnabled, lowestLayer, moveToBack, moveToFront, paint, paramString, putLayer, remove, removeAll, setLayer, setLayer, setPosition
 
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, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, 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, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, 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, 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
 

Constructor Detail

WizardSplitDockStation

public WizardSplitDockStation(WizardSplitDockStation.Side side)
Creates a new station.

Parameters:
side - the side at which this station is presented, e.g. if this station is at the left side of a JFrame, the parameter should be WizardSplitDockStation.Side.LEFT
Method Detail

revalidateOutside

public void revalidateOutside()
Calls JComponent.revalidate() on the first JComponent that is outside of the current JScrollPane.


getFactoryID

public String getFactoryID()
Specified by:
getFactoryID in interface bibliothek.gui.dock.DockElement
Overrides:
getFactoryID in class bibliothek.gui.dock.SplitDockStation

getWizardSplitLayoutManager

public WizardSplitDockStation.WizardLayoutManager getWizardSplitLayoutManager()

getWizardSpanStrategy

public WizardSpanStrategy getWizardSpanStrategy()
Gets the strategy which is responsible for managing the Spans.

Returns:
the span strategy

setDividerSize

public void setDividerSize(int dividerSize)
Overrides:
setDividerSize in class bibliothek.gui.dock.SplitDockStation

setResizeOnRemove

public void setResizeOnRemove(boolean resizeOnRemove)
If a Dockable is removed from this WizardSplitDockStation, then the column of the Dockable is resized such that it has again its preferred size.

Parameters:
resizeOnRemove - whether to automatically resize the columnss

isResizeOnRemove

public boolean isResizeOnRemove()
Tells whether the column of a removed Dockable is automatically resized.

Returns:
whether to automatically resize a column if one of its elements is removed

setController

public void setController(bibliothek.gui.DockController controller)
Specified by:
setController in interface bibliothek.gui.Dockable
Specified by:
setController in interface bibliothek.gui.DockStation
Overrides:
setController in class bibliothek.gui.dock.SplitDockStation

setPut

protected void setPut(bibliothek.gui.dock.station.split.PutInfo info)
Overrides:
setPut in class bibliothek.gui.dock.SplitDockStation

unsetPut

protected void unsetPut()
Overrides:
unsetPut in class bibliothek.gui.dock.SplitDockStation

dropAside

protected boolean dropAside(bibliothek.gui.dock.station.split.SplitNode neighbor,
                            bibliothek.gui.dock.station.split.PutInfo.Put put,
                            bibliothek.gui.Dockable dockable,
                            bibliothek.gui.dock.station.split.Leaf leaf,
                            double divider,
                            bibliothek.gui.dock.DockHierarchyLock.Token token)
Overrides:
dropAside in class bibliothek.gui.dock.SplitDockStation

dropOver

protected boolean dropOver(bibliothek.gui.dock.station.split.Leaf leaf,
                           bibliothek.gui.Dockable dockable,
                           bibliothek.gui.dock.layout.DockableProperty property,
                           bibliothek.gui.dock.station.support.CombinerSource source,
                           bibliothek.gui.dock.station.support.CombinerTarget target)
Overrides:
dropOver in class bibliothek.gui.dock.SplitDockStation

getSideGap

public int getSideGap()
Gets the size of the empty space at the moveable side of this station.

Returns:
the empty space at the side

setSideGap

public void setSideGap(int sideGap)
Sets an empty space at the moveable side of this station.

Parameters:
sideGap - the size of the gap, should be at least 0

getSide

public WizardSplitDockStation.Side getSide()
Gets the side to which this station leans.

Returns:
the side which does not change its position ever

setSide

public void setSide(WizardSplitDockStation.Side side)
Sets the side to which this station leans. If the current side and the new side do not have the same orientation, then the "columns" of this station are rotated by 90 degrees.

Parameters:
side - the new side, not null

getScrollableUnitIncrement

public int getScrollableUnitIncrement(Rectangle visibleRect,
                                      int orientation,
                                      int direction)
Specified by:
getScrollableUnitIncrement in interface Scrollable

getScrollableBlockIncrement

public int getScrollableBlockIncrement(Rectangle visibleRect,
                                       int orientation,
                                       int direction)
Specified by:
getScrollableBlockIncrement in interface Scrollable

getPreferredScrollableViewportSize

public Dimension getPreferredScrollableViewportSize()
Specified by:
getPreferredScrollableViewportSize in interface Scrollable

getScrollableTracksViewportWidth

public boolean getScrollableTracksViewportWidth()
Specified by:
getScrollableTracksViewportWidth in interface Scrollable

getScrollableTracksViewportHeight

public boolean getScrollableTracksViewportHeight()
Specified by:
getScrollableTracksViewportHeight in interface Scrollable

getMinimumSize

public Dimension getMinimumSize()
Overrides:
getMinimumSize in class bibliothek.gui.dock.SplitDockStation

getPreferredSize

public Dimension getPreferredSize()
Overrides:
getPreferredSize in class bibliothek.gui.dock.SplitDockStation

paintOverlay

protected void paintOverlay(Graphics g)
Overrides:
paintOverlay in class bibliothek.gui.dock.SplitDockStation

getPersistentColumns

public PersistentColumn[] getPersistentColumns()

setPersistentColumns

public void setPersistentColumns(bibliothek.gui.Dockable[][] columnsAndCells,
                                 int[][] cellSizes,
                                 int[] columnSizes)

getMaxColumnCount

public int getMaxColumnCount()
Gets the maximal amount of columns.

Returns:
the maximal amount of columns, or -1

setMaxColumnCount

public void setMaxColumnCount(int maxColumnCount)
Sets the maximum amount of columns that the user can create. The station does not re-organize itself if there are currently more columns than maxColumnCount.
A value of -1 can be set, telling the station that there is no maximum.

Parameters:
maxColumnCount - the maximum amount of columns, -1 or any number that is greater than 0

drop

public boolean drop(bibliothek.gui.Dockable dockable,
                    bibliothek.gui.dock.station.split.SplitDockPlaceholderProperty property)
Ensures that the dropped Dockable does not come to rest at a location that would destroy the columns.

Overrides:
drop in class bibliothek.gui.dock.SplitDockStation

resetToPreferredSizes

public void resetToPreferredSizes()
Changes the size of all columns and cells such that they met their preferred size.