bibliothek.gui.dock.action
Class LocationHint

java.lang.Object
  extended by bibliothek.gui.dock.action.LocationHint

public class LocationHint
extends Object

A LocationHint gives information about the preferred location of a DockActionSource in respect to other sources. How to interpret the LocationHint is up to the ActionOffer which creates the final DockActionSource for a Dockable.

Author:
Benjamin Sigg

Nested Class Summary
static class LocationHint.Enumeration
          Base-class for Enumerations (sets of uniquely identified objects).
static class LocationHint.Hint
          Describes the preferred location of a LocationHint
static class LocationHint.Origin
          Describes who created a LocationHint
 
Field Summary
static LocationHint.Origin ACTION_GUARD
          Used if this hint was produced by an ActionGuard
static LocationHint.Origin ACTION_OFFER
          Used if this hint was produced by an ActionOffer
static LocationHint.Origin DIRECT_ACTION
          Used if this hint was produced by the parent of a dockable
static LocationHint.Origin DOCKABLE
          Used if this hint was produced by a Dockable
static LocationHint.Origin INDIRECT_ACTION
          Used if this hint was produced by one of the parents of a dockable
static LocationHint.Hint LEFT
          Used to indicate that this hint likes to stay left of the middle
static LocationHint.Hint LEFT_OF_ALL
          Used to indicate that this hint likes to stay as left as possible
static LocationHint.Hint LITTLE_LEFT
          Used to indicate that this hint likes to stay a bit left of the middle
static LocationHint.Hint LITTLE_RIGHT
          Used to indicate that this hint likes to stay a bit right of the middle
static LocationHint.Hint MIDDLE
          Used to indicate that this hint likes to stay in the middle
static LocationHint.Hint RIGHT
          Used to indicate that this hint likes to stay right of the middle
static LocationHint.Hint RIGHT_OF_ALL
          Used to indicate that this hint likes to stay as right as possible
static LocationHint UNKNOWN
          The default-location-hint does not know anything
static LocationHint.Hint UNKNOWN_HINT
          Used to indicate that this hint does not know where to stay
static LocationHint.Origin UNKNOWN_ORIGIN
          Used if it is unclear who produced this hint
static LocationHint.Hint VERY_LEFT
          Used to indicate that this hint likes to stay at the left side
static LocationHint.Hint VERY_RIGHT
          Used to indicate that this hint likes to stay at the right side
 
Constructor Summary
LocationHint(LocationHint.Hint hint)
          Creates a new LocationHint.
LocationHint(LocationHint.Origin origin)
          Creates a new LocationHint.
LocationHint(LocationHint.Origin origin, LocationHint.Hint hint)
          Creates a new LocationHint.
LocationHint(LocationHint.Origin origin, LocationHint.Hint hint, Object clientObject)
          Creates a new LocationHint.
 
Method Summary
 Object getClientObject()
          Gets the object which has no special meaning.
 LocationHint.Hint getHint()
          Gets the preferred location of this hint.
 LocationHint.Origin getOrigin()
          Gets the origin of this hint.
 void setClientObject(Object clientObject)
          Sets an object which has no special meaning.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOCKABLE

public static final LocationHint.Origin DOCKABLE
Used if this hint was produced by a Dockable


ACTION_GUARD

public static final LocationHint.Origin ACTION_GUARD
Used if this hint was produced by an ActionGuard


DIRECT_ACTION

public static final LocationHint.Origin DIRECT_ACTION
Used if this hint was produced by the parent of a dockable


INDIRECT_ACTION

public static final LocationHint.Origin INDIRECT_ACTION
Used if this hint was produced by one of the parents of a dockable


ACTION_OFFER

public static final LocationHint.Origin ACTION_OFFER
Used if this hint was produced by an ActionOffer


UNKNOWN_ORIGIN

public static final LocationHint.Origin UNKNOWN_ORIGIN
Used if it is unclear who produced this hint


LEFT_OF_ALL

public static final LocationHint.Hint LEFT_OF_ALL
Used to indicate that this hint likes to stay as left as possible


VERY_LEFT

public static final LocationHint.Hint VERY_LEFT
Used to indicate that this hint likes to stay at the left side


LEFT

public static final LocationHint.Hint LEFT
Used to indicate that this hint likes to stay left of the middle


LITTLE_LEFT

public static final LocationHint.Hint LITTLE_LEFT
Used to indicate that this hint likes to stay a bit left of the middle


MIDDLE

public static final LocationHint.Hint MIDDLE
Used to indicate that this hint likes to stay in the middle


LITTLE_RIGHT

public static final LocationHint.Hint LITTLE_RIGHT
Used to indicate that this hint likes to stay a bit right of the middle


RIGHT

public static final LocationHint.Hint RIGHT
Used to indicate that this hint likes to stay right of the middle


VERY_RIGHT

public static final LocationHint.Hint VERY_RIGHT
Used to indicate that this hint likes to stay at the right side


RIGHT_OF_ALL

public static final LocationHint.Hint RIGHT_OF_ALL
Used to indicate that this hint likes to stay as right as possible


UNKNOWN_HINT

public static final LocationHint.Hint UNKNOWN_HINT
Used to indicate that this hint does not know where to stay


UNKNOWN

public static final LocationHint UNKNOWN
The default-location-hint does not know anything

Constructor Detail

LocationHint

public LocationHint(LocationHint.Origin origin)
Creates a new LocationHint.

Parameters:
origin - tells who produces this hint

LocationHint

public LocationHint(LocationHint.Hint hint)
Creates a new LocationHint.

Parameters:
hint - tells where this hint likes to stay

LocationHint

public LocationHint(LocationHint.Origin origin,
                    LocationHint.Hint hint)
Creates a new LocationHint.

Parameters:
origin - tells who produces this hint
hint - tells where this hint likes to stay

LocationHint

public LocationHint(LocationHint.Origin origin,
                    LocationHint.Hint hint,
                    Object clientObject)
Creates a new LocationHint.

Parameters:
origin - tells who produces this hint
hint - tells where this hint likes to stay
clientObject - an object that can be freely chosen and used by client code
Method Detail

getClientObject

public Object getClientObject()
Gets the object which has no special meaning.

Returns:
the client-object

setClientObject

public void setClientObject(Object clientObject)
Sets an object which has no special meaning. This object can be used freely by client code.

Parameters:
clientObject - the client-object

getOrigin

public LocationHint.Origin getOrigin()
Gets the origin of this hint.

Returns:
information who produced this hint

getHint

public LocationHint.Hint getHint()
Gets the preferred location of this hint. It's up to the ActionOffer how to interpret this property.

Returns:
the preferred location