Search this API

y.layout.hierarchic
Interface MementoSupport


public interface MementoSupport

This interface is a cookie for the hierarchic layout algorithm memento support.

 

Field Summary
static byte LAYERING_PHASE
          A constant describing the first phase of the hierarchic layout algorithm.
static byte SEQUENCING_PHASE
          A constant describing the second phase of the hierarchic layout algorithm.
 
Method Summary
 java.lang.Object createMemento()
          Creates a memento which can be held by the user.
 java.lang.Object getMemento()
          Returns the currently active memento Object.
 boolean getMementoMode(byte phase)
          Retrieves the current mode previously set by method setMementoMode(byte, boolean) for the given phase of the algorithm.
 void setMemento(java.lang.Object memento)
          Specifies the memento Object to be used for the next operation.
 void setMementoMode(byte phase, boolean useMemento)
          Specifies the mode for each phase of the algorithm.
 

Field Detail

LAYERING_PHASE

static final byte LAYERING_PHASE
A constant describing the first phase of the hierarchic layout algorithm.

See Also:
setMementoMode(byte, boolean), Constant Field Values

SEQUENCING_PHASE

static final byte SEQUENCING_PHASE
A constant describing the second phase of the hierarchic layout algorithm.

See Also:
setMementoMode(byte, boolean), Constant Field Values
Method Detail

createMemento

java.lang.Object createMemento()
Creates a memento which can be held by the user.

Before using the support, a valid memento Object has to be set using the corresponding method setMemento(Object).

Returns:
the newly created memento

setMemento

void setMemento(java.lang.Object memento)
Specifies the memento Object to be used for the next operation.

Parameters:
memento - the given created memento

getMemento

java.lang.Object getMemento()
Returns the currently active memento Object.

Returns:
the currently active memento
See Also:
setMemento(Object)

setMementoMode

void setMementoMode(byte phase,
                    boolean useMemento)
Specifies the mode for each phase of the algorithm.

Parameters:
phase - one of the predefined memento keys
useMemento - true if the algorithm should use the values stored in the memento from a previous run, false if the algorithm should store the information in the memento after the next run

getMementoMode

boolean getMementoMode(byte phase)
Retrieves the current mode previously set by method setMementoMode(byte, boolean) for the given phase of the algorithm.

Parameters:
phase - one of the predefined memento keys
Returns:
true if the algorithm uses the values stored in the memento from a previous run, false if the algorithm stores the information in the memento after the next run
See Also:
setMementoMode(byte, boolean)

© Copyright 2000-2021,
yWorks GmbH.
All rights reserved.