|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.klay.layered.IntermediateProcessingStrategy
public class IntermediateProcessingStrategy
A strategy for intermediate layout processors to be used.
Layout phases use instances of this class to specify which intermediate layout processors they depend on. The layout provider uses this class to keep track of which intermediate layout processors must be inserted into the layout algorithm workflow.
To construct a processing strategy that just depends on processors in a single processing slot, use code like the following:
new IntermediateProcessingStrategy( IntermediateProcessingStrategy.BEFORE_PHASE_3, EnumSet.of(IntermediateLayoutProcessor.EDGE_SPLITTER));
To construct a processing strategy with processors in more than one slot, you can use code like the following:
new IntermediateProcessingStrategy( // Before Phase 1 null, // Before Phase 2 null, // Before Phase 3 EnumSet.of(IntermediateLayoutProcessor.STRANGE_PORT_SIDE_PROCESSOR), // Before Phase 4 null, // Before Phase 5 null, // After Phase 5 EnumSet.of(IntermediateLayoutProcessor.SOME_OTHER_PROCESSOR, IntermediateLayoutProcessor.YET_ANOTHER_PROCESSOR);
Field Summary | |
---|---|
static int |
AFTER_PHASE_5
Constant for the processors that should come after phase 5. |
static int |
BEFORE_PHASE_1
Constant for the processors that should come before phase 1. |
static int |
BEFORE_PHASE_2
Constant for the processors that should come before phase 2. |
static int |
BEFORE_PHASE_3
Constant for the processors that should come before phase 3. |
static int |
BEFORE_PHASE_4
Constant for the processors that should come before phase 4. |
static int |
BEFORE_PHASE_5
Constant for the processors that should come before phase 5. |
static int |
INTERMEDIATE_PHASE_SLOTS
How many slots there are for intermediate processing. |
Constructor Summary | |
---|---|
IntermediateProcessingStrategy()
Constructs a new empty strategy. |
|
IntermediateProcessingStrategy(Collection<IntermediateLayoutProcessor> beforePhase1,
Collection<IntermediateLayoutProcessor> beforePhase2,
Collection<IntermediateLayoutProcessor> beforePhase3,
Collection<IntermediateLayoutProcessor> beforePhase4,
Collection<IntermediateLayoutProcessor> beforePhase5,
Collection<IntermediateLayoutProcessor> afterPhase5)
Constructs a new strategy containing the given intermediate layout processors. |
|
IntermediateProcessingStrategy(int slotIndex,
Collection<IntermediateLayoutProcessor> processors)
Constructs a new strategy that has the given processors in the given slot, but is otherwise empty. |
|
IntermediateProcessingStrategy(IntermediateProcessingStrategy init)
Constructs a new strategy as a copy of the given strategy. |
|
IntermediateProcessingStrategy(int slotIndex,
IntermediateLayoutProcessor processor)
Constructs a new strategy that has the given processor in the given slot, but is otherwise empty. |
Method Summary | |
---|---|
IntermediateProcessingStrategy |
addAll(int slotIndex,
Collection<IntermediateLayoutProcessor> processors)
Adds all layout processors in the given collection to the given slot, without duplicates. |
IntermediateProcessingStrategy |
addAll(IntermediateProcessingStrategy operand)
Adds the items from the given strategy to this strategy. |
void |
addLayoutProcessor(int slotIndex,
IntermediateLayoutProcessor processor)
Adds the given layout processor to the given slot, if it's not already in there. |
void |
clear()
Clears this strategy. |
Set<IntermediateLayoutProcessor> |
getProcessors(int slotIndex)
Returns the layout processors in the given slot. |
void |
removeLayoutProcessor(int slotIndex,
IntermediateLayoutProcessor processor)
Removes the given layout processor from the given slot. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int BEFORE_PHASE_1
public static final int BEFORE_PHASE_2
public static final int BEFORE_PHASE_3
public static final int BEFORE_PHASE_4
public static final int BEFORE_PHASE_5
public static final int AFTER_PHASE_5
public static final int INTERMEDIATE_PHASE_SLOTS
Constructor Detail |
---|
public IntermediateProcessingStrategy()
public IntermediateProcessingStrategy(IntermediateProcessingStrategy init)
init
- the strategy to copy.public IntermediateProcessingStrategy(int slotIndex, IntermediateLayoutProcessor processor)
slotIndex
- the slot index. Must be >= 0
and
< INTERMEDIATE_PHASE_SLOTS
.processor
- the layout processor to add.public IntermediateProcessingStrategy(int slotIndex, Collection<IntermediateLayoutProcessor> processors)
slotIndex
- the slot index. Must be >= 0
and
< INTERMEDIATE_PHASE_SLOTS
.processors
- the layout processors to add.public IntermediateProcessingStrategy(Collection<IntermediateLayoutProcessor> beforePhase1, Collection<IntermediateLayoutProcessor> beforePhase2, Collection<IntermediateLayoutProcessor> beforePhase3, Collection<IntermediateLayoutProcessor> beforePhase4, Collection<IntermediateLayoutProcessor> beforePhase5, Collection<IntermediateLayoutProcessor> afterPhase5)
beforePhase1
- layout processors before phase 1. May be null
.beforePhase2
- layout processors before phase 2. May be null
.beforePhase3
- layout processors before phase 3. May be null
.beforePhase4
- layout processors before phase 4. May be null
.beforePhase5
- layout processors before phase 5. May be null
.afterPhase5
- layout processors after phase 5. May be null
.Method Detail |
---|
public Set<IntermediateLayoutProcessor> getProcessors(int slotIndex)
slotIndex
- the slot index. Must be >= 0
and
< INTERMEDIATE_PHASE_SLOTS
.
public void addLayoutProcessor(int slotIndex, IntermediateLayoutProcessor processor)
slotIndex
- the slot index. Must be >= 0
and
< INTERMEDIATE_PHASE_SLOTS
.processor
- the layout processor to add.public IntermediateProcessingStrategy addAll(int slotIndex, Collection<IntermediateLayoutProcessor> processors)
slotIndex
- the slot index. Must be >= 0
and
< INTERMEDIATE_PHASE_SLOTS
.processors
- the layout processors to add. May be null
.
public IntermediateProcessingStrategy addAll(IntermediateProcessingStrategy operand)
operand
- the strategy to unify this strategy with. May be null
.
public void removeLayoutProcessor(int slotIndex, IntermediateLayoutProcessor processor)
slotIndex
- the slot index. Must be >= 0
and
< INTERMEDIATE_PHASE_SLOTS
.processor
- the layout processor to add.public void clear()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |