|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.latdraw.diagram.Diagram
public class Diagram
a class to represent diagrams of ordered sets.
| Field Summary | |
|---|---|
static int |
ITERATIONS
|
| Constructor Summary | |
|---|---|
Diagram(InputLattice in)
|
|
Diagram(OrderedSet set)
|
|
Diagram(java.lang.String n,
java.util.List labels,
java.util.List ucs)
Construct a Diagram with name n from a List of Objects and a list of covers for each object. |
|
Diagram(java.lang.String n,
java.util.List labels,
java.util.List ucs,
java.util.HashMap edgeColors)
|
|
| Method Summary | |
|---|---|
void |
clearLabels()
Sets all the labels to the empty string which prevents them from being drawn. |
java.util.List<Vertex> |
filter(Vertex v)
A convenience method to get the vertices in the filter. |
boolean |
geq(Vertex v0,
Vertex v1)
|
double |
getAttractionFactor()
|
java.util.HashMap |
getEdgeColors()
|
int |
getImprovementCount()
|
java.lang.String |
getName()
|
OrderedSet |
getOrderedSet()
|
double |
getRepulsionFactor()
|
double |
getRotationAngle()
|
double |
getScaleFactor()
|
Vertex[] |
getVertices()
|
boolean |
gt(Vertex v0,
Vertex v1)
|
void |
hideLabels()
Hide the all vertex labels. |
java.util.List<Vertex> |
ideal(Vertex v)
A convenience method to get the vertices in the ideal. |
void |
improve()
Silently improve the diagram through all three stages. |
Diagram |
interval(java.lang.Object top,
java.lang.Object bottom)
Form a new Diagram representing the interval from botton to top. |
boolean |
isHorizontal()
|
boolean |
isInterval()
Was this diagram constructed as an interval of another diagram. |
boolean |
isPaintLabels()
This globally controls if the labels are displayed. |
boolean |
leq(Vertex v0,
Vertex v1)
|
boolean |
lt(Vertex v0,
Vertex v1)
|
static void |
main(java.lang.String[] args)
|
void |
multipleUpdates(int k,
double att,
double repulsion)
|
void |
normalizeCoords()
|
void |
project2d(double angle)
|
void |
resetVertices()
Sets the Color of all vertices to null and filled to false. |
void |
setEdgeColors(java.util.HashMap ht)
|
void |
setImprovementCount(int v)
|
void |
setInterval(boolean v)
|
void |
setName(java.lang.String s)
|
void |
setPaintLabels(boolean v)
This globally controls if the labels are displayed. |
void |
setRotationAngle(double angle)
|
void |
setScaleFactor(double v)
|
void |
showLabels()
Set all vertex labels to be shown but if paintLabels is false they still will not be painted. |
int |
size()
|
void |
update(double att,
double repulsion)
This does a single update using att and repulsion, improving the diagram. |
Vertex |
vertexForPOElem(POElem elt)
Find the Vertex whose associated POElem is elt. |
void |
writeRSFDiagram(java.io.File f)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int ITERATIONS
| Constructor Detail |
|---|
public Diagram(java.lang.String n,
java.util.List labels,
java.util.List ucs)
throws NonOrderedSetException
n - the name.labels - the list of Objects representing the elements
of the ordered set. Note any Object is allowed.ucs - a list of lists so the NonOrderedSetException
public Diagram(java.lang.String n,
java.util.List labels,
java.util.List ucs,
java.util.HashMap edgeColors)
throws NonOrderedSetException
NonOrderedSetException
public Diagram(InputLattice in)
throws NonOrderedSetException
NonOrderedSetException
public Diagram(OrderedSet set)
throws NonOrderedSetException
NonOrderedSetException| Method Detail |
|---|
public double getScaleFactor()
public void setScaleFactor(double v)
public double getRotationAngle()
public void setRotationAngle(double angle)
public double getAttractionFactor()
public double getRepulsionFactor()
public boolean isPaintLabels()
public void setPaintLabels(boolean v)
public void setImprovementCount(int v)
public int getImprovementCount()
public boolean isInterval()
public void setInterval(boolean v)
public java.lang.String getName()
public void setName(java.lang.String s)
public void improve()
public Diagram interval(java.lang.Object top,
java.lang.Object bottom)
throws NonOrderedSetException
NonOrderedSetExceptionpublic OrderedSet getOrderedSet()
public int size()
public Vertex[] getVertices()
public Vertex vertexForPOElem(POElem elt)
public void resetVertices()
public java.util.HashMap getEdgeColors()
public void setEdgeColors(java.util.HashMap ht)
public boolean isHorizontal()
public void multipleUpdates(int k,
double att,
double repulsion)
public void update(double att,
double repulsion)
public void normalizeCoords()
public void project2d(double angle)
public void writeRSFDiagram(java.io.File f)
throws java.io.IOException
java.io.IOExceptionpublic void hideLabels()
public void showLabels()
public void clearLabels()
public boolean leq(Vertex v0,
Vertex v1)
public boolean lt(Vertex v0,
Vertex v1)
public boolean geq(Vertex v0,
Vertex v1)
public boolean gt(Vertex v0,
Vertex v1)
public java.util.List<Vertex> filter(Vertex v)
public java.util.List<Vertex> ideal(Vertex v)
public static void main(java.lang.String[] args)
throws java.io.FileNotFoundException,
java.io.IOException,
NonOrderedSetException
java.io.FileNotFoundException
java.io.IOException
NonOrderedSetException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||