bibliothek.gui.dock.common.event
Class CDockableLocationEvent

java.lang.Object
  extended by bibliothek.gui.dock.common.event.CDockableLocationEvent

public class CDockableLocationEvent
extends java.lang.Object

This event object is given to a CDockableLocationListener if the location or the visibility to the user of a CDockable changed.
Please note that any location can be null.

Author:
Benjamin Sigg

Constructor Summary
CDockableLocationEvent(CDockable dockable, boolean oldVisible, boolean newVisible, CLocation oldLocation, CLocation newLocation)
          Creates a new event.
 
Method Summary
 CDockable getDockable()
          Gets the dockable whose state changed.
 CLocation getNewLocation()
          Gets the location of the dockable after this event
 boolean getNewVisible()
          Tells whether the user can see the dockable after this event
 CLocation getOldLocation()
          Gets the location of the dockable before this event
 boolean getOldVisible()
          Tells whether the user could see the dockable before this event
 boolean isLocationChanged()
          Tells whether the location of the dockable changed.
 boolean isVisibleChanged()
          Tells whether the visibility state of the dockable changed
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CDockableLocationEvent

public CDockableLocationEvent(CDockable dockable,
                              boolean oldVisible,
                              boolean newVisible,
                              CLocation oldLocation,
                              CLocation newLocation)
Creates a new event.

Parameters:
dockable - the source of the event
oldVisible - the old visibility state
newVisible - the new visibility state
oldLocation - the old location, may be null
newLocation - the new location, may be null
Method Detail

getDockable

public CDockable getDockable()
Gets the dockable whose state changed.

Returns:
the element whose state changed

isLocationChanged

public boolean isLocationChanged()
Tells whether the location of the dockable changed.

Returns:
whether the location changed

getOldLocation

public CLocation getOldLocation()
Gets the location of the dockable before this event

Returns:
the old location, can be null

getNewLocation

public CLocation getNewLocation()
Gets the location of the dockable after this event

Returns:
the new location, can be null

isVisibleChanged

public boolean isVisibleChanged()
Tells whether the visibility state of the dockable changed

Returns:
whether the visibility state changed

getOldVisible

public boolean getOldVisible()
Tells whether the user could see the dockable before this event

Returns:
the old visibility state

getNewVisible

public boolean getNewVisible()
Tells whether the user can see the dockable after this event

Returns:
the new visibility state

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object