|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.ac.ic.doc.automed.editor.autolayout.AutoLayoutPositionable
uk.ac.ic.doc.automed.editor.autolayout.AutoLayoutSchemaObject
uk.ac.ic.doc.automed.editor.autolayout.AutoLayoutTreeObject
public class AutoLayoutTreeObject
Class to implement tree autolayout algorithm.
| Field Summary |
|---|
| Fields inherited from class uk.ac.ic.doc.automed.editor.autolayout.AutoLayoutSchemaObject |
|---|
boundsCorrection, myGraph |
| Fields inherited from class uk.ac.ic.doc.automed.editor.autolayout.AutoLayoutPositionable |
|---|
autoLayoutPositionablesTable, currentSchema, myPositionableObj, newObjectsClass, pos |
| Constructor Summary | |
|---|---|
AutoLayoutTreeObject(Positionable positionable)
|
|
AutoLayoutTreeObject(Positionable positionable,
AutoLayoutTreeObject parent,
AutoLayoutTreeObject child,
AutoLayoutTreeObject sibling)
Creates a new instance of AutoLayoutTreeObjectect |
|
| Method Summary | |
|---|---|
protected static void |
attachParent(AutoLayoutTreeObject t,
int h)
Attaches the specified node to its children, setting offsets. |
protected static uk.ac.ic.doc.automed.editor.autolayout.PolyLine |
bridge(uk.ac.ic.doc.automed.editor.autolayout.PolyLine line1,
int x1,
int y1,
uk.ac.ic.doc.automed.editor.autolayout.PolyLine line2,
int x2,
int y2)
bridge |
protected static void |
computeAbsolutePosition(AutoLayoutTreeObject t,
int off_x,
int off_y)
|
static AutoLayoutSchemaObject |
findObjByLabel(java.lang.String label)
|
AutoLayoutTreeObject |
findRoot()
Find object which label = "root$1" |
static void |
initAutoLayoutPositionablesTable(Schema schema)
|
boolean |
isRoot()
Return true if object label = "root$1" |
protected static int |
join(AutoLayoutTreeObject t)
Joins children/siblings together, merging contours. |
protected static void |
layout(AutoLayoutTreeObject t)
|
protected static int |
merge(uk.ac.ic.doc.automed.editor.autolayout.Polygon c1,
uk.ac.ic.doc.automed.editor.autolayout.Polygon c2)
Merges two polygons together. |
protected static int |
offset(int p1,
int p2,
int a1,
int a2,
int b1,
int b2)
Calculates the offset for specified points. |
void |
plantTree()
Call this function on the root node to build a tree. |
void |
showTree()
Same as setFinalPosition() but set position on all object in tree. |
| Methods inherited from class uk.ac.ic.doc.automed.editor.autolayout.AutoLayoutSchemaObject |
|---|
getAbsolutePosition, getAllObjInSchema, getConstructClass, getDependentAutoLayoutPositionables, getDependentAutoLayoutPositionables, getFutureBounds, getFutureSchemaBounds, getObjectBetweenMeAnd, getReferencedAutoLayoutPositionables, getSchemaObjectsToLayout, getSchemaObjectsToLayout, hasChild, initializeMyGraph, isDependent, isOnCurrentSchema, setAbsolutePosition, setFinalPosition |
| Methods inherited from class uk.ac.ic.doc.automed.editor.autolayout.AutoLayoutPositionable |
|---|
doLayout, findAutoLayoutPositionableFor, getDrawable, getLabel, getPosition, isHide, round, setPosition |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AutoLayoutTreeObject(Positionable positionable)
public AutoLayoutTreeObject(Positionable positionable,
AutoLayoutTreeObject parent,
AutoLayoutTreeObject child,
AutoLayoutTreeObject sibling)
| Method Detail |
|---|
public static final AutoLayoutSchemaObject findObjByLabel(java.lang.String label)
public static void initAutoLayoutPositionablesTable(Schema schema)
public void plantTree()
public boolean isRoot()
public AutoLayoutTreeObject findRoot()
public void showTree()
AutoLayoutPositionable#setFinalPosition()protected static void layout(AutoLayoutTreeObject t)
protected static void attachParent(AutoLayoutTreeObject t,
int h)
protected static int merge(uk.ac.ic.doc.automed.editor.autolayout.Polygon c1,
uk.ac.ic.doc.automed.editor.autolayout.Polygon c2)
protected static int join(AutoLayoutTreeObject t)
protected static uk.ac.ic.doc.automed.editor.autolayout.PolyLine bridge(uk.ac.ic.doc.automed.editor.autolayout.PolyLine line1,
int x1,
int y1,
uk.ac.ic.doc.automed.editor.autolayout.PolyLine line2,
int x2,
int y2)
protected static int offset(int p1,
int p2,
int a1,
int a2,
int b1,
int b2)
protected static void computeAbsolutePosition(AutoLayoutTreeObject t,
int off_x,
int off_y)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||