public class Relation extends GNode
GraphObject.Kind, GraphObject.ObjectIDComparator
borderOutlineWidth, dashpattern, descriptors, mark, myedges, showBoringDebugInfoFont, typeLabel
backColor, defaultDim, defaultSelectColor, defaultWrapColumns, defaultWrapLabels, displayRect3D, foreColor, highlightColor, history, isSelected, labelFont, myKind, objectID, objectMargin, ownerGraph, TerritorialLimit, textLabel, textLabelLowerLeftPt
Constructor and Description |
---|
Relation()
Instantiates a default relation with label "link".
|
Modifier and Type | Method and Description |
---|---|
boolean |
commitToKnowledgeBase(KnowledgeBase kb)
/**
Perform whatever activities are required for this concept to be committed to a knowledge base.
|
void |
draw(Graphics2D g,
boolean printing)
Draws a relation on the given graphics context.
|
void |
drawBorder(Graphics2D g,
Color borderColor)
Highlights the border of the object
|
protected void |
finalize() |
Shape |
getShape()
Obtain the Shape object that represents the selectable region of this
object.
|
void |
setTextLabel(String label)
Returns the CGIF string corresponding to this relation, including
input,output arcs.
|
boolean |
UnCommitFromKnowledgeBase(KnowledgeBase kb)
Perform whatever activities are required for this concept to be committed to a knowledge base.
|
abandonObject, adjustEdges, attachGEdge, CGIFStringGNodeEdges, clearDescriptors, deleteGEdge, drawActivated, drawDebuggingInfo, getDisplayRect, getEdges, getLinkedNodes, getLinkedNodes, getSize, getTypeDescriptor, getTypeDescriptors, getTypeLabel, isActive, isChanged, setActive, setCenter, setCenter, setChanged, setTypeDescriptor, setTypeDescriptors, setTypeLabel, setTypeLabel
addHistoryRecord, adjustCustomDisplayRect, findDominantContext, forceMove, forgetObject, getBestFontMetrics, getCenter, getColor, getDepth, getDim, getDisplayRect3D, getHistory, getLabelFont, getMinimumContentSize, getObjectLocator, getOutermostGraph, getOwnerFrame, getOwnerGraph, getShapeForDrawing, getTextLabel, getTextLabelSize, getUpperLeft, getWrapColumns, getWrapLabels, isNegated, isNegativelyNested, listToString, listToStringXML, putInCorrectContext, putInCorrectContext, resizeIfNecessary, resizeIfNecessary, selfCleanup, setBackground, setCenterOnly, setColor, setColor, setDepth, setDim, setDim, setDisplayRect, setDisplayRect, setDisplayRect3D, setForeground, setLabelFont, setNegated, setOwnerGraph, setTextLabel, setTextLabel, setUpperLeft, setUpperLeft, toString, unCommitFromKnowledgeBase
protected void finalize() throws Throwable
public Shape getShape()
GraphObject
getShape
in class GraphObject
GraphObject.getShape()
public void draw(Graphics2D g, boolean printing)
public void drawBorder(Graphics2D g, Color borderColor)
GraphObject
drawBorder
in class GNode
g
- Graphics context on which the object is to be renderedborderColor
- the color to drawpublic void setTextLabel(String label)
setTextLabel
in class GraphObject
label
- new text label (erases the old text label)public boolean commitToKnowledgeBase(KnowledgeBase kb)
commitToKnowledgeBase
in class GraphObject
kb
- public boolean UnCommitFromKnowledgeBase(KnowledgeBase kb)
kb
-