JIDE 3.5.15

com.jidesoft.docking
Class AutoHideContainer

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.jidesoft.swing.SidePane
                      extended by com.jidesoft.docking.AutoHideContainer
All Implemented Interfaces:
DockableFrameListener, ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener, Accessible, SwingConstants

public class AutoHideContainer
extends SidePane
implements PropertyChangeListener, DockableFrameListener

AutoHideContainer extends SidePane which allows DockableFrame to shrink to one side of JFrame. In additional to methods in SidePane, it has several handy methods to allow operate DockableFrame quickly since AutoHideContainer will only deal with DockableFrame

See Also:
DockableFrame, Serialized Form

Nested Class Summary
static interface AutoHideContainer.MouseInputCreator
           
 
Nested classes/interfaces inherited from class com.jidesoft.swing.SidePane
SidePane.AccessibleSidePane
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
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 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 javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
AutoHideContainer(int attachedSide, DockingManager dockingManager, AutoHideContainer.MouseInputCreator mouseInputCreator)
          Default constructor.
 
Method Summary
 void addFrame(DockableFrame frame)
          Adds the dockable frame to autohide container at the first possible group.
 void addFrame(DockableFrame frame, int groupIndex)
          Adds dockable frame to autohide container at a certain group.
 void addGroup(FrameContainer container)
          Since each group is correspondingly to a FrameContainer, so this method takes a FrameContainer and convert it to a group and add it to AutoHideContainer.
 void addGroup(SidePaneGroup group)
          Adds a SidePaneGroup to this component.
 void dockableFrameActivated(DockableFrameEvent e)
          Invoked when a DockableFrame has became activated.
 void dockableFrameAdded(DockableFrameEvent e)
          Invoked when a DockableFrame has been added to DockingManager.
 void dockableFrameAutohidden(DockableFrameEvent e)
          Invoked when a DockableFrame has change from other state to autohide showing state.
 void dockableFrameAutohideShowing(DockableFrameEvent e)
          Invoked when a DockableFrame has change from other state to floating state.
 void dockableFrameDeactivated(DockableFrameEvent e)
          Invoked when a DockableFrame has became deactivated.
 void dockableFrameDocked(DockableFrameEvent e)
          Invoked when a DockableFrame has change from other state to docking state.
 void dockableFrameFloating(DockableFrameEvent e)
          Invoked when a DockableFrame has change from other state to autohide state.
 void dockableFrameHidden(DockableFrameEvent e)
          Invoked when a DockableFrame has been set invisible.
 void dockableFrameMaximized(DockableFrameEvent e)
          Invoked when a DockableFrame has became maximized.
 void dockableFrameMoved(DockableFrameEvent e)
          Invoked when a DockableFrame has been moved without changing is dock mode.
 void dockableFrameRemoved(DockableFrameEvent e)
          Invoked when a DockableFrame has been removed from DockingManager.
 void dockableFrameRestored(DockableFrameEvent e)
          Invoked when a DockableFrame has restored from maximized state.
 void dockableFrameShown(DockableFrameEvent e)
          Invoked when a DockableFrame has been set visible.
 void dockableFrameTabHidden(DockableFrameEvent e)
          Invoked when a DockableFrame has became invisible in the tabbed pane.
 void dockableFrameTabShown(DockableFrameEvent e)
          Invoked when a DockableFrame has became visible in the tabbed pane.
 void dockableFrameTransferred(DockableFrameEvent e)
          Invoked when a DockableFrame was dragged between DockingManager's.
 List<String> getAllFrameKeys()
          Gets all the dockable frames' key in this autohide container.
 SidePaneGroup getGroupForIndex(int index)
           
 int getGroupIndex(DockableFrame frame)
          Finds index of the group that contains the frame.
 SidePaneItem getItemForIndex(int index)
           
 int getSelectedItemIndex(Point p)
           
 SidePaneGroup getSidePaneGroup(DockableFrame frame)
          Finds the group that contains the frame.
 SidePaneItem getSidePaneItem(DockableFrame frame)
          Finds the item that contains the frame.
 void propertyChange(PropertyChangeEvent evt)
          This method gets called when a bound property is changed.
 void removeFrame(DockableFrame frame)
          Removes the frame.
 void removeGroup(SidePaneGroup group)
          Removes a SidePaneGroup from this component.
 
Methods inherited from class com.jidesoft.swing.SidePane
getAccessibleContext, getAttachedSide, getGroups, getToolTipText, getUI, getUIClassID, isRollover, removeGroup, setAttachedSide, setRollover, setUI, updateUI
 
Methods inherited from class javax.swing.JPanel
paramString, setUI
 
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, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, 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
 
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, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AutoHideContainer

public AutoHideContainer(int attachedSide,
                         DockingManager dockingManager,
                         AutoHideContainer.MouseInputCreator mouseInputCreator)
Default constructor.

Parameters:
attachedSide - which side of JFrame the container is attached to. The value are SwingConstants.EAST, SwingConstants.WEST, SwingConstants.NORTH, SwingConstants.SOUTH
dockingManager - DockingManager
mouseInputCreator - the mouse input creator
Method Detail

getGroupIndex

public int getGroupIndex(DockableFrame frame)
Finds index of the group that contains the frame.

Parameters:
frame - the dockable frame
Returns:
index of the group that contains the frame. If not found, return -1.

getSidePaneGroup

public SidePaneGroup getSidePaneGroup(DockableFrame frame)
Finds the group that contains the frame.

Parameters:
frame - the dockable frame
Returns:
group that contains the frame. If not found, return null.

getSidePaneItem

public SidePaneItem getSidePaneItem(DockableFrame frame)
Finds the item that contains the frame.

Parameters:
frame - the dockable frame
Returns:
item that contains the frame. If not found, return null.

getSelectedItemIndex

public int getSelectedItemIndex(Point p)

getGroupForIndex

public SidePaneGroup getGroupForIndex(int index)

getItemForIndex

public SidePaneItem getItemForIndex(int index)

addGroup

public void addGroup(SidePaneGroup group)
Adds a SidePaneGroup to this component. Do nothing if there is nothing in the group.

Overrides:
addGroup in class SidePane
Parameters:
group - the group to be added

addGroup

public void addGroup(FrameContainer container)
Since each group is correspondingly to a FrameContainer, so this method takes a FrameContainer and convert it to a group and add it to AutoHideContainer.

Parameters:
container - the frame container

addFrame

public void addFrame(DockableFrame frame,
                     int groupIndex)
Adds dockable frame to autohide container at a certain group.

Parameters:
frame - the frame to be added
groupIndex - the group index

addFrame

public void addFrame(DockableFrame frame)
Adds the dockable frame to autohide container at the first possible group.

Parameters:
frame - the frame to be added

removeFrame

public void removeFrame(DockableFrame frame)
Removes the frame. If the frame is the only frame in that group, the group is removed as well.

Parameters:
frame - the frame to be removed

removeGroup

public void removeGroup(SidePaneGroup group)
Removes a SidePaneGroup from this component.

Overrides:
removeGroup in class SidePane
Parameters:
group - the group to be removed

propertyChange

public void propertyChange(PropertyChangeEvent evt)
This method gets called when a bound property is changed.

Specified by:
propertyChange in interface PropertyChangeListener
Parameters:
evt - A PropertyChangeEvent object describing the event source and the property that has changed.

getAllFrameKeys

public List<String> getAllFrameKeys()
Gets all the dockable frames' key in this autohide container.

Returns:
all the dockable frames' key

dockableFrameAdded

public void dockableFrameAdded(DockableFrameEvent e)
Description copied from interface: DockableFrameListener
Invoked when a DockableFrame has been added to DockingManager.

Specified by:
dockableFrameAdded in interface DockableFrameListener
Parameters:
e - DockableFrameEvent

dockableFrameRemoved

public void dockableFrameRemoved(DockableFrameEvent e)
Description copied from interface: DockableFrameListener
Invoked when a DockableFrame has been removed from DockingManager.

Specified by:
dockableFrameRemoved in interface DockableFrameListener
Parameters:
e - DockableFrameEvent

dockableFrameShown

public void dockableFrameShown(DockableFrameEvent e)
Description copied from interface: DockableFrameListener
Invoked when a DockableFrame has been set visible.

Specified by:
dockableFrameShown in interface DockableFrameListener
Parameters:
e - DockableFrameEvent

dockableFrameHidden

public void dockableFrameHidden(DockableFrameEvent e)
Description copied from interface: DockableFrameListener
Invoked when a DockableFrame has been set invisible.

Specified by:
dockableFrameHidden in interface DockableFrameListener
Parameters:
e - DockableFrameEvent

dockableFrameDocked

public void dockableFrameDocked(DockableFrameEvent e)
Description copied from interface: DockableFrameListener
Invoked when a DockableFrame has change from other state to docking state.

Specified by:
dockableFrameDocked in interface DockableFrameListener
Parameters:
e - DockableFrameEvent

dockableFrameFloating

public void dockableFrameFloating(DockableFrameEvent e)
Description copied from interface: DockableFrameListener
Invoked when a DockableFrame has change from other state to autohide state.

Specified by:
dockableFrameFloating in interface DockableFrameListener
Parameters:
e - DockableFrameEvent

dockableFrameAutohidden

public void dockableFrameAutohidden(DockableFrameEvent e)
Description copied from interface: DockableFrameListener
Invoked when a DockableFrame has change from other state to autohide showing state.

Specified by:
dockableFrameAutohidden in interface DockableFrameListener
Parameters:
e - DockableFrameEvent

dockableFrameAutohideShowing

public void dockableFrameAutohideShowing(DockableFrameEvent e)
Description copied from interface: DockableFrameListener
Invoked when a DockableFrame has change from other state to floating state.

Specified by:
dockableFrameAutohideShowing in interface DockableFrameListener
Parameters:
e - DockableFrameEvent

dockableFrameActivated

public void dockableFrameActivated(DockableFrameEvent e)
Description copied from interface: DockableFrameListener
Invoked when a DockableFrame has became activated.

Specified by:
dockableFrameActivated in interface DockableFrameListener
Parameters:
e - DockableFrameEvent

dockableFrameDeactivated

public void dockableFrameDeactivated(DockableFrameEvent e)
Description copied from interface: DockableFrameListener
Invoked when a DockableFrame has became deactivated.

Specified by:
dockableFrameDeactivated in interface DockableFrameListener
Parameters:
e - DockableFrameEvent

dockableFrameTabShown

public void dockableFrameTabShown(DockableFrameEvent e)
Description copied from interface: DockableFrameListener
Invoked when a DockableFrame has became visible in the tabbed pane.

Specified by:
dockableFrameTabShown in interface DockableFrameListener
Parameters:
e - DockableFrameEvent

dockableFrameTabHidden

public void dockableFrameTabHidden(DockableFrameEvent e)
Description copied from interface: DockableFrameListener
Invoked when a DockableFrame has became invisible in the tabbed pane.

Specified by:
dockableFrameTabHidden in interface DockableFrameListener
Parameters:
e - DockableFrameEvent

dockableFrameMaximized

public void dockableFrameMaximized(DockableFrameEvent e)
Description copied from interface: DockableFrameListener
Invoked when a DockableFrame has became maximized.

Specified by:
dockableFrameMaximized in interface DockableFrameListener
Parameters:
e - DockableFrameEvent

dockableFrameRestored

public void dockableFrameRestored(DockableFrameEvent e)
Description copied from interface: DockableFrameListener
Invoked when a DockableFrame has restored from maximized state.

Specified by:
dockableFrameRestored in interface DockableFrameListener
Parameters:
e - DockableFrameEvent

dockableFrameTransferred

public void dockableFrameTransferred(DockableFrameEvent e)
Description copied from interface: DockableFrameListener
Invoked when a DockableFrame was dragged between DockingManager's.

Specified by:
dockableFrameTransferred in interface DockableFrameListener
Parameters:
e - DockableFrameEvent

dockableFrameMoved

public void dockableFrameMoved(DockableFrameEvent e)
Description copied from interface: DockableFrameListener
Invoked when a DockableFrame has been moved without changing is dock mode.

Specified by:
dockableFrameMoved in interface DockableFrameListener
Parameters:
e - DockableFrameEvent

JIDE 3.5.15