uk.ac.ic.doc.automed.p2p.gui.reps
Class GConstraint

java.lang.Object
  extended by uk.ac.ic.doc.automed.p2p.gui.graph.GShape
      extended by uk.ac.ic.doc.automed.p2p.gui.graph.GraphComponent
          extended by uk.ac.ic.doc.automed.p2p.gui.reps.GConstraint
All Implemented Interfaces:
java.awt.Shape, java.io.Serializable, GVisualisable

public class GConstraint
extends GraphComponent

See Also:
Serialized Form

Field Summary
private  java.util.List constraintNames
           
private  java.util.List refObjects
           
 
Fields inherited from class uk.ac.ic.doc.automed.p2p.gui.graph.GraphComponent
atShape, grouped, prevPoint
 
Fields inherited from class uk.ac.ic.doc.automed.p2p.gui.graph.GShape
altDrawer, altDrawing, AUTO_COUNT, bound, brPoint, centrePoint, changed, color, cshape, data, defBound, displayScript, displayShape, enabled, handler, highlighted, hshape, icon, id, label, lblPoint, movable, name, onClick, PREFIX_CTRL, PREFIX_HIL, props, refresh, selectable, tlPoint, type, visible, visibleOnHighlighted, ZEROX
 
Constructor Summary
GConstraint(java.lang.String label, java.lang.String cname, java.util.List refObjects, java.util.Properties props)
           
 
Method Summary
private  void _draw(java.awt.Graphics g)
           
 void addConstraintName(java.lang.String cname)
           
 boolean compare(java.util.List refObjects)
          Check whether the reference objects of this constraint is the same as another collection of objects.
 void drawMain(java.awt.Graphics g)
          The main body of the drawing method
 java.lang.String getConstraintNamesAsString()
           
 java.util.Vector getEdges()
           
 java.util.Vector getNodes()
           
private  java.lang.String getSemanticConstraintSymbol()
          If this is a semantic constraint then obtain its symbolic name
 java.util.Collection getShapes()
           
private  java.lang.String name2Symbol(java.lang.String cname)
          Convert a constraint name to a symbol name.
 void redrawMain(java.awt.Graphics g)
          The main body of redraw
 
Methods inherited from class uk.ac.ic.doc.automed.p2p.gui.graph.GraphComponent
addEdge, addNode, addNodes, contains, drawAfter, drawAt, drawBefore, drawBound, drawOverlay, drawTo, equals, getBaseCenterPoint, getBasePoint, getBooleanProperty, getBound, getEdges, getEdgesArray, getIsGrouped, getNodesArray, getNumericProperty, getProperty, getShapesArray, getShapesForUpdate, init, redraw, removeShape, setEdges, setEdgesArray, setIsChanged, setIsGrouped, setIsVisible, setNodes, setNodesArray, setUp, update, updateBound, updateControl, updateHighlighted
 
Methods inherited from class uk.ac.ic.doc.automed.p2p.gui.graph.GShape
clear, clear, contains, contains, contains, contains, copyProperties, cos, dcos, draw, drawAlternative, drawControl, drawHighlighted, dsin, dtan, getAutoID, getBounds, getBounds2D, getBrPoint, getCenter, getColor, getData, getDefaultBound, getDrawerInstance, getHandlerObject, getID, getIDShape, getIsVisible, getIsVisibleOnHighlighted, getLabel, getLabelBounds, getLabelPoint, getName, getPathIterator, getPathIterator, getPoint, getProperties, getProperty, getPropertyObject, getPropertyObjects, getStringBounds, getType, hashCode, highlightLabel, highlightLabel, intersects, intersects, isActive, isAltDrawing, isChanged, isEnabled, isHighlighted, isMovable, isMutableColor, isOnClick, isRefresh, isSelectable, newDrawerInstance, paintBlank, preDraw, preDraw, redrawAfter, redrawBefore, refresh, setBound, setBound, setColorProperty, setColorProperty, setColorProperty, setEnabled, setHandlerObject, setIsAltDrawing, setIsHighlighted, setIsMovable, setIsOnClick, setIsRefresh, setIsSelectable, setLabel, setName, setProperties, setProperty, setPropertyObject, setStrokeStyle, setTLPoint, setTLPoint, setType, setUpHighlightedShape, setVisibleOnHighlighted, sin, tan, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

refObjects

private java.util.List refObjects

constraintNames

private java.util.List constraintNames
Constructor Detail

GConstraint

public GConstraint(java.lang.String label,
                   java.lang.String cname,
                   java.util.List refObjects,
                   java.util.Properties props)
Method Detail

getShapes

public java.util.Collection getShapes()
Overrides:
getShapes in class GraphComponent

getNodes

public java.util.Vector getNodes()
Overrides:
getNodes in class GraphComponent

getEdges

public java.util.Vector getEdges()
Overrides:
getEdges in class GraphComponent

addConstraintName

public void addConstraintName(java.lang.String cname)

getConstraintNamesAsString

public java.lang.String getConstraintNamesAsString()

getSemanticConstraintSymbol

private java.lang.String getSemanticConstraintSymbol()
If this is a semantic constraint then obtain its symbolic name

Returns:

name2Symbol

private java.lang.String name2Symbol(java.lang.String cname)
Convert a constraint name to a symbol name.

Parameters:
cname -
Returns:

compare

public boolean compare(java.util.List refObjects)
Check whether the reference objects of this constraint is the same as another collection of objects.

Parameters:
refObjects -
Returns:

redrawMain

public void redrawMain(java.awt.Graphics g)
Description copied from class: GraphComponent
The main body of redraw

Overrides:
redrawMain in class GraphComponent

drawMain

public void drawMain(java.awt.Graphics g)
Description copied from class: GraphComponent
The main body of the drawing method

Overrides:
drawMain in class GraphComponent

_draw

private void _draw(java.awt.Graphics g)