com.vlsolutions.swing.docking

Class AutoHideExpandPanel

public class AutoHideExpandPanel extends JPanel implements SingleDockableContainer

A component used to show the currently expanded view.

Auto-Hide / Auto-Expand feature is a means to save space of screen replacing a Dockable by a Button on one of the Desktop borders.

When the user clicks on the button or his mouse rolls over it, the component is shown (with an expansion animation) as if it was coming from behind the button's border.

UNKNOWN: 2005/10/06 Lilian Chamontin : protected access to the exansion timer that might be null when AutoHidePolicy is EXPAND_ON_CLICK 2005/11/01 Lilian Chamontin : enhanced timer management to auto-collaspe the panel when mouse out of bounds 2005/12/08 Lilian Chamontin : updated the order of component insertion for JDIC support.

Field Summary
static StringPROPERTY_EXPANDED
Constant for the Expanded property (a bound property)
static StringuiClassID
Constructor Summary
AutoHideExpandPanel()
Method Summary
voidclear()
Clears the state of this expand panel.
voidcollapse()
Collapse the expand panel (making it unvisible)
protected DockViewTitleBarcreateTitleBar()
creates the shared title bar for all expanded panels
voidexpand()
Expands the currently selected button
JPanelgetBottomDragger()
Returns the component used to modify the expand panel size when expanded from the top
DockablegetDockable()
JPanelgetLeftDragger()
Returns the component used to modify the expand panel size when expanded from the right
JPanelgetRightDragger()
Returns the component used to modify the expand panel size when expanded from the right
DockViewTitleBargetTitleBar()
JPanelgetTopDragger()
Returns the component used to modify the expand panel size when expanded from the bottom
StringgetUIClassID()
protected voidinitBorders()
Installs borders used to drag the expand panel around
voidinstallDocking(DockingDesktop desktop)
booleanisActive()
Returns true if this panel is the ancestor of the focused component
booleanisOptimizedDrawingEnabled()
voidremove(Dockable dockable)
Removes a dockable (if it was the currently expanded one)
voidresetBorders()
Creates the default borders for the expand panel
voidselect(AutoHideButton btn)
Selects a button (may collapse a prevoiusly selected button)
booleanshouldCollapse()
Returns true if this panel agrees to beeing hidden.
voiduninstallDocking(DockingDesktop desktop)

Field Detail

PROPERTY_EXPANDED

public static final String PROPERTY_EXPANDED
Constant for the Expanded property (a bound property)

uiClassID

public static final String uiClassID

Constructor Detail

AutoHideExpandPanel

public AutoHideExpandPanel()

Method Detail

clear

public void clear()
Clears the state of this expand panel.

This is useful when re-installing a desktop from readXml (for example, it resets dockable expand sizes)

collapse

public void collapse()
Collapse the expand panel (making it unvisible)

createTitleBar

protected DockViewTitleBar createTitleBar()
creates the shared title bar for all expanded panels

expand

public void expand()
Expands the currently selected button

getBottomDragger

public JPanel getBottomDragger()
Returns the component used to modify the expand panel size when expanded from the top

getDockable

public Dockable getDockable()

getLeftDragger

public JPanel getLeftDragger()
Returns the component used to modify the expand panel size when expanded from the right

getRightDragger

public JPanel getRightDragger()
Returns the component used to modify the expand panel size when expanded from the right

getTitleBar

public DockViewTitleBar getTitleBar()

getTopDragger

public JPanel getTopDragger()
Returns the component used to modify the expand panel size when expanded from the bottom

getUIClassID

public String getUIClassID()

initBorders

protected void initBorders()
Installs borders used to drag the expand panel around

installDocking

public void installDocking(DockingDesktop desktop)

isActive

public boolean isActive()
Returns true if this panel is the ancestor of the focused component

isOptimizedDrawingEnabled

public boolean isOptimizedDrawingEnabled()

remove

public void remove(Dockable dockable)
Removes a dockable (if it was the currently expanded one)

resetBorders

public void resetBorders()
Creates the default borders for the expand panel

select

public void select(AutoHideButton btn)
Selects a button (may collapse a prevoiusly selected button)

shouldCollapse

public boolean shouldCollapse()
Returns true if this panel agrees to beeing hidden.

During drag operations (resizing), some mouseEnter/mouseExit events can be lost. In that case, the desktop relies on this method to request collaping or not.

uninstallDocking

public void uninstallDocking(DockingDesktop desktop)
© Copyright 2004-2005 VLSolutions. All Rights Reserved.
www.vlsolutions.com : Java Components - Smart Client Applications