|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--edu.iu.pcl.absurdist.absurdist.Relation
|
+--edu.iu.pcl.absurdist.gui.RelationLink
Class RelationLink: Visual representation of a relation in a concept system graph.
| Field Summary | |
static int |
ARROW
|
static java.awt.Color[] |
colors
color set for mapping relation label types |
static int |
PLAIN
line styles to indicate relation direction |
static int |
W
maximum link width |
| Fields inherited from class edu.iu.pcl.absurdist.absurdist.Relation |
concepts, model, weight |
| Constructor Summary | |
RelationLink(Relation relation,
ConceptSystem system,
ConceptGraph graph)
Creates a relation link by encoding its relation features. |
|
| Method Summary | |
static int |
direct2style(boolean directed)
Encodes relation direction into link style. |
static void |
drawArrow(java.awt.Graphics g,
int x1,
int y1,
int x2,
int y2,
int w,
double l)
Draws an arrow from point P1(x1, y1) to point P2(x2, y2). |
ConceptNode |
getNode1()
Returns the 1st concept in the relation. |
ConceptNode |
getNode2()
Returns the 2nd concept in the relation. |
static java.awt.Color |
label2color(RelationModel model,
java.util.Vector models)
Encodes relation label into link color. |
void |
paint(java.awt.Graphics2D g)
Paints the object. |
java.lang.String |
toString()
String representation. |
static int |
weight2width(double weight)
Encodes relation weight into link width. |
| Methods inherited from class edu.iu.pcl.absurdist.absurdist.Relation |
addNoise, compareTo, difWeight, getConcept1, getConcept2, getLabel, isDirected, isWeighted |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static java.awt.Color[] colors
public static final int PLAIN
public static final int ARROW
public static final int W
| Constructor Detail |
public RelationLink(Relation relation,
ConceptSystem system,
ConceptGraph graph)
| Method Detail |
public static java.awt.Color label2color(RelationModel model,
java.util.Vector models)
public static int weight2width(double weight)
public static int direct2style(boolean directed)
public ConceptNode getNode1()
public ConceptNode getNode2()
public static void drawArrow(java.awt.Graphics g,
int x1,
int y1,
int x2,
int y2,
int w,
double l)
w - the arrow end width;l - the ratio between arrow end length and line length.public void paint(java.awt.Graphics2D g)
public java.lang.String toString()
toString in class Relation
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||