com.vlsolutions.swing.docking.event

Class DockableStateWillChangeEvent


public class DockableStateWillChangeEvent
extends java.lang.Object

An event triggered before a change of dockable state.

Events are triggered when a component is :

Note that event are not triggered by drag-dock moves (they don't correspond to a state change). If you need to track such changes, use a Swing AncestorListener, or override the addNotify method of your dockable component.

It is also possible to track changes after they occur with the DockableStateChangeEvent .

See Also:
javax.swing.event.AncestorListener, DockableStateWillChangeListener

Constructor Summary

DockableStateWillChangeEvent(DockableState currentState, DockableState futureState)

Method Summary

void
cancel()
Refuse the change of dockable state.
DockableState
getCurrentState()
this method will return null when the event is triggered for initial docking
DockableState
getFutureState()
Returns the future (proposed) state of the dockable.
boolean
isAccepted()

Constructor Details

DockableStateWillChangeEvent

public DockableStateWillChangeEvent(DockableState currentState,
                                    DockableState futureState)

Method Details

cancel

public void cancel()
Refuse the change of dockable state.

The docking action is cancelled.


getCurrentState

public DockableState getCurrentState()
this method will return null when the event is triggered for initial docking

getFutureState

public DockableState getFutureState()
Returns the future (proposed) state of the dockable. if cancel() is called on the event, this state change will be vetoed.
See Also:
cancel()

isAccepted

public boolean isAccepted()

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