|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.layout.PortCandidateSet
public class PortCandidateSet
This class describes a set of possible PortCandidate
s and their cardinality for a node-like entity.
Nested Class Summary | |
---|---|
static interface |
PortCandidateSet.CandidateMatcher
The interface that is used by PortCandidateSet to retrieve PortCandidate s from. |
static interface |
PortCandidateSet.Entry
An interface that is returned by the find methods in PortCandidateSet.CandidateMatcher
and the getEntries() method. |
Field Summary | |
---|---|
static Object |
NODE_DP_KEY
A DataProvider key used to associate instances of this class with nodes in a graph. |
Constructor Summary | |
---|---|
PortCandidateSet()
Creates a new and empty instance of PortCandidateSet |
Method Summary | |
---|---|
void |
add(PortCandidate p)
Adds another PortCandidate with capacity 1 to the set of PortCandidates. |
void |
add(PortCandidate p,
int connections)
Adds another PortCandidate with the given capacity to the set of candidates. |
PortCandidateSet.CandidateMatcher |
createMatcher()
Creates a CandidateMatcher instance that can be used to query entries from. |
int |
getConnectionCount()
Returns the maximum number of connections this set allows or Integer.MAX_VALUE if
the number is unbound. |
protected double |
getCost(PortCandidateSet.Entry entry,
Edge edge,
boolean source,
double xOffset,
double yOffset)
Calculates the cost for each entry for the given edge configuration. |
Iterator |
getEntries()
Returns an Iterator over the list of entries . |
protected double |
getPriority(PortCandidateSet.Entry entry,
Edge edge,
boolean source)
Returns the priority of the given entry. |
void |
remove(PortCandidateSet.Entry entry)
Removes the entry from the internal list of PortCandidate entries. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Object NODE_DP_KEY
DataProvider
key used to associate instances of this class with nodes in a graph.
Constructor Detail |
---|
public PortCandidateSet()
add(PortCandidate)
,
add(PortCandidate, int)
Method Detail |
---|
public void add(PortCandidate p)
p
- the candidate to add.public void add(PortCandidate p, int connections)
p
- the candidate to addconnections
- the maximum number of connections allowed to the candidatepublic int getConnectionCount()
Integer.MAX_VALUE
if
the number is unbound.
Integer.MAX_VALUE
public void remove(PortCandidateSet.Entry entry)
entry
- the entry to remove from this set of candidates.public Iterator getEntries()
entries
.
PortCandidateSet.Entry
instances.public PortCandidateSet.CandidateMatcher createMatcher()
entries
from.
protected double getCost(PortCandidateSet.Entry entry, Edge edge, boolean source, double xOffset, double yOffset)
protected double getPriority(PortCandidateSet.Entry entry, Edge edge, boolean source)
PortCandidateSet.CandidateMatcher
.
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |