com.vlsolutions.swing.docking

Class AutoHideExpandPanel

Implemented Interfaces:
DockableContainer, SingleDockableContainer

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.

Field Summary

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

Constructor Summary

AutoHideExpandPanel()

Method Summary

void
clear()
Clears the state of this expand panel.
void
collapse()
Collapse the expand panel (making it unvisible)
protected DockViewTitleBar
createTitleBar()
creates the shared title bar for all expanded panels
void
expand()
Expands the currently selected button
JPanel
getBottomDragger()
Returns the component used to modify the expand panel size when expanded from the top
Dockable
getDockable()
Returns the dockable this container is displaying
JPanel
getLeftDragger()
Returns the component used to modify the expand panel size when expanded from the right
JPanel
getRightDragger()
Returns the component used to modify the expand panel size when expanded from the right
DockViewTitleBar
getTitleBar()
JPanel
getTopDragger()
Returns the component used to modify the expand panel size when expanded from the bottom
String
getUIClassID()
protected void
initBorders()
Installs borders used to drag the expand panel around
void
installDocking(DockingDesktop desktop)
boolean
isActive()
Returns true if this panel is the ancestor of the focused component
boolean
isOptimizedDrawingEnabled()
void
remove(Dockable dockable)
Removes a dockable (if it was the currently expanded one)
void
resetBorders()
Creates the default borders for the expand panel
void
select(AutoHideButton btn)
Selects a button (may collapse a prevoiusly selected button)
boolean
shouldCollapse()
Returns true if this panel agrees to beeing hidden.
void
uninstallDocking(DockingDesktop desktop)

Field Details

PROPERTY_EXPANDED

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

uiClassID

public static final String uiClassID

Constructor Details

AutoHideExpandPanel

public AutoHideExpandPanel()

Method Details

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()
Returns the dockable this container is displaying
Specified by:
getDockable in interface SingleDockableContainer

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)
Specified by:
installDocking in interface DockableContainer

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)
Specified by:
uninstallDocking in interface DockableContainer

© Copyright 2004-2006 VLSolutions. All Rights Reserved.
www.vlsolutions.com : Java Components - Smart Client Applications