bibliothek.gui.dock.station.screen.magnet
Enum AttractorStrategy.Attraction

java.lang.Object
  extended by java.lang.Enum<AttractorStrategy.Attraction>
      extended by bibliothek.gui.dock.station.screen.magnet.AttractorStrategy.Attraction
All Implemented Interfaces:
Serializable, Comparable<AttractorStrategy.Attraction>
Enclosing interface:
AttractorStrategy

public static enum AttractorStrategy.Attraction
extends Enum<AttractorStrategy.Attraction>

Tells how two Dockables interact with each other.

Author:
Benjamin Sigg

Enum Constant Summary
ATTRACTED
          The Dockables are attracted to each other.
NEUTRAL
          There is no attraction between the Dockables.
REPELLED
          The Dockables do not interact with each other.
STRONGLY_ATTRACTED
          The Dockables are attracted to each other.
STRONGLY_REPELLED
          The Dockables do not interact with each other.
 
Method Summary
 AttractorStrategy.Attraction stronger(AttractorStrategy.Attraction other)
          Gets the stronger of this and other AttractorStrategy.Attraction.
static AttractorStrategy.Attraction valueOf(String name)
          Returns the enum constant of this type with the specified name.
static AttractorStrategy.Attraction[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

STRONGLY_ATTRACTED

@ClientOnly
public static final AttractorStrategy.Attraction STRONGLY_ATTRACTED
The Dockables are attracted to each other. This value is never used by the framework, only by clients. It overrides all other values.


ATTRACTED

public static final AttractorStrategy.Attraction ATTRACTED
The Dockables are attracted to each other. This value overrides than NEUTRAL and REPELLED.


NEUTRAL

public static final AttractorStrategy.Attraction NEUTRAL
There is no attraction between the Dockables. This is the weakest value of all.


REPELLED

public static final AttractorStrategy.Attraction REPELLED
The Dockables do not interact with each other. In fact they preferre not to be placed near each other. Most MagnetStrategys will interpret this as "they do not interact". This value overrides NEUTRAL.


STRONGLY_REPELLED

@ClientOnly
public static final AttractorStrategy.Attraction STRONGLY_REPELLED
The Dockables do not interact with each other. In fact they preferre not to be placed near each other. Most MagnetStrategys will interpret this as "they do not interact". This value is never used by the framework, only by clients. It overrides any other value expect STRONGLY_ATTRACTED.

Method Detail

values

public static AttractorStrategy.Attraction[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (AttractorStrategy.Attraction c : AttractorStrategy.Attraction.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static AttractorStrategy.Attraction valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

stronger

public AttractorStrategy.Attraction stronger(AttractorStrategy.Attraction other)
Gets the stronger of this and other AttractorStrategy.Attraction.

Parameters:
other - some value, not null
Returns:
the stronger value