|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.graph.view.InteractionSettings
Interaction settings. This class can be used to control
global generic interaction settings for VisualGraphView
instances.
setAllowLoops() controls whether self-loops are allowed
for the related VisualGraph.
setPortsEnabled() controls whether ports are globally
enabled or disabled for the related VisualGraph.
setHighlightMode() controls the highlighting style
for the related VisualGraph.
setEdgeInsertMode() controls how the graph behaves if
nodes are dragged and dropped over edges.
| Field Summary | |
static int |
EDGEINSERTMODE_AUTOCENTER
edge-insert modes for edges |
static int |
EDGEINSERTMODE_DISABLED
edge-insert modes for edges |
static int |
EDGEINSERTMODE_EXACT
edge-insert modes for edges |
static int |
HIGHLIGHTMODE_ALLPORTS
highlight mode for ports |
static int |
HIGHLIGHTMODE_HITPORT_ONLY
highlight mode for ports |
static int |
HIGHLIGHTMODE_PORTS_NEARBY_NODE
highlight mode for ports |
| Constructor Summary | |
InteractionSettings()
Constructs the default interaction settings. |
|
InteractionSettings(InteractionSettings settings)
Copy constructor for interaction settings. |
|
| Method Summary | |
static java.lang.String |
edgeinsertMode2String(int edgeinsertmode)
Returns a descriptive string for the given edge insert mode. |
int |
getHighlightMode()
Returns the currently active highlight mode. |
static Constraint |
getHighlightModeConstraint()
Returns the constraint for the possible values for the highlight mode |
int |
getPortHighlightTolerance()
Returns the current value for the port highlighting tolerance setting. |
static java.lang.String |
highlightMode2String(int highlightmode)
Returns a descriptive string for the given highlight mode. |
boolean |
isAllowLoops()
Returns the allowLoops setting. |
boolean |
isPortsEnabled()
Returns the port enabled setting. |
void |
setAllowLoops(boolean allowLoops)
Sets the allowLoops setting. |
void |
setHighlightMode(int highlightmode)
Sets the currently active highlight mode. |
void |
setPortHighlightTolerance(int portHighlightTolerance)
Sets the value for the port highlighting tolerance to the value given by portHighlightTolerance. |
void |
setPortsEnabled(boolean portsEnabled)
Sets the port enabled setting. |
static int |
string2edgeinsertMode(java.lang.String description)
Returns the edge-insert mode for the given descriptive string. |
static int |
string2highlightMode(java.lang.String description)
Returns the highlight mode for the given descriptive string. |
java.lang.String |
toString()
Returns a string representation of this InteractionSettings
instance. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int HIGHLIGHTMODE_HITPORT_ONLY
public static final int HIGHLIGHTMODE_PORTS_NEARBY_NODE
public static final int HIGHLIGHTMODE_ALLPORTS
public static final int EDGEINSERTMODE_DISABLED
public static final int EDGEINSERTMODE_EXACT
public static final int EDGEINSERTMODE_AUTOCENTER
| Constructor Detail |
public InteractionSettings()
public InteractionSettings(InteractionSettings settings)
settings - to source instance to copy from.| Method Detail |
public java.lang.String toString()
InteractionSettings
instance.
public boolean isAllowLoops()
public void setAllowLoops(boolean allowLoops)
allowLoops - true to allow loops, false to forbid
loops.public boolean isPortsEnabled()
True means that ports are
enabled and a highlight will mark them while user interaction takes
place. False means that ports are globally disabled.
public void setPortsEnabled(boolean portsEnabled)
portsEnabled - true to enable ports, false to globally disabled
ports.public int getHighlightMode()
public void setHighlightMode(int highlightmode)
highlightmode - the highlight mode to set.public int getPortHighlightTolerance()
VisualGraphView the InteractionSettings
instance is associated to.
public void setPortHighlightTolerance(int portHighlightTolerance)
portHighlightTolerance. The
portHighlightTolerance should be given in units of the
coordinate of the VisualGraphView the
InteractionSettings instance is associated to.
portHighlightTolerance - the new value for the port highlighting
tolerancepublic static final java.lang.String highlightMode2String(int highlightmode)
highlightmode - the highlight mode to look up.
public static final int string2highlightMode(java.lang.String description)
description - the string describing the given highlight mode.
public static final java.lang.String edgeinsertMode2String(int edgeinsertmode)
edgeinsertmode - the edge-insert mode to look up.
public static final int string2edgeinsertMode(java.lang.String description)
description - the string describing the given edge-insert mode.
public static Constraint getHighlightModeConstraint()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||