public class RelationLabel 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 |
---|
RelationLabel()
Instantiates a relation type with default label "link".
|
RelationLabel(String label)
Instantiates a relation type with the given label.
|
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)
Handles generic drawing for all nodes, and usually invokes the node's
class method "draw"
|
Shape |
getShape()
Obtain the Shape object that represents the selectable region of this
object.
|
private void |
init(String label) |
void |
setTextLabel(String label)
Sets the text label of this relation.
|
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, drawBorder, drawDebuggingInfo, finalize, 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
public RelationLabel()
public RelationLabel(String label)
label
- the relation label's string valueprivate void init(String label)
public Shape getShape()
GraphObject
getShape
in class GraphObject
GraphObject.getShape()
public void draw(Graphics2D g, boolean printing)
GNode
public 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
-