au.edu.swin.synergy.plugin.modeller
Class BModelArc
java.lang.Object
|
+--au.edu.swin.synergy.plugin.diagram.BDrawable
|
+--au.edu.swin.synergy.plugin.modeller.BModelElement
|
+--au.edu.swin.synergy.plugin.modeller.BModelArc
- public class BModelArc
- extends BModelElement
- implements BSaveable
- See Also:
- Serialized Form
Fields inherited from class au.edu.swin.synergy.plugin.diagram.BDrawable |
bounds,
iconOOZ,
kBackward,
kDefaultName,
kDefaultStatus,
kEmptyFlag,
kForward,
kHighlightFlag,
kHitBounds,
kHitSizer,
kKeyName,
kKeyStatus,
kNotHit,
kSelectedFlag,
kSizerCtrlPoint1,
kSizerCtrlPoint2,
kSizerEndArc,
kSizerHalfH,
kSizerHalfW,
kSizerNorthEast,
kSizerNorthWest,
kSizerSouthEast,
kSizerSouthWest,
kSizerStartArc,
lastFrame,
name,
paintCount,
pos,
sizerColour,
statusFlag,
tmpBounds |
Methods inherited from class au.edu.swin.synergy.plugin.modeller.BModelElement |
addProperties,
checkID,
doPasted,
doSaveText,
getChildAt,
getChildCount,
getConflict,
getID,
getIndexOf,
getMetaElement,
getName,
getParent,
getPropertyValue,
getRuleStatus,
getUniqueID,
isChangeAllowed,
isLeaf,
removeAllChildren,
resolveText,
setConflict,
setMetaElement,
setParent,
setRuleStatus,
updateCommon |
Methods inherited from class au.edu.swin.synergy.plugin.diagram.BDrawable |
checkXFormHit,
contains,
continueAdd,
copy,
getBasicStroke,
getBounds,
getColour,
getIconHeight,
getIconWidth,
getPos,
incPos,
isDeletable,
isHighlighted,
isInside,
isSelected,
isStatusFlag,
isTransformed,
setFlag,
setHighlighted,
setName,
setPos,
setPos,
snapToGrid,
stopResize,
toString |
count
public static int count
kKeyStartNode
protected static final String kKeyStartNode
- Loads the BDrawable from a file
kKeyEndNode
protected static final String kKeyEndNode
kKeyControlPoints
protected static final String kKeyControlPoints
kKeyType
protected static final String kKeyType
kKeyColor
protected static final String kKeyColor
kKeyStyle
protected static final String kKeyStyle
BModelArc
public BModelArc(BPackageArc pArc)
BModelArc
public BModelArc(BModelArc src)
BModelArc
public BModelArc()
- Default constructor for BSaveable
getProperties
public Vector getProperties()
- Overrides:
- getProperties in class BModelElement
getPropertyPanel
public BPropPanel getPropertyPanel()
- Overrides:
- getPropertyPanel in class BDrawable
setStartNode
public void setStartNode(BModelNode start)
setEndNode
public void setEndNode(BModelNode end)
getStartNode
public BModelNode getStartNode()
getEndNode
public BModelNode getEndNode()
getPackageArc
public BPackageArc getPackageArc()
delete
public void delete()
- Overrides:
- delete in class BDrawable
transform
public void transform(BView viewport,
BScalarPoint parentPos,
int frameCounter)
- Transforms the coordinates of the drawable object
to a new coordinate space, as defined by the
viewport and parent pos.
Subclasses should follow the following equation for
tranforming relevant points etc.
xformPt.x = ((localPt.x + parentPos.x + pos.x - viewport.x) * viewport.zoom ) + viewport.halfx;
- Parameters:
BView
- viewport - the viewport that this object is going to be drawn inPoint
- parentPos - coordinates of any parent object- Overrides:
- transform in class BModelElement
render
public void render(Graphics2D g2)
- Renders the transformed coordinates of the drawable
object to a Graphics2D
- Parameters:
Graphics2D
- g2 - the place to render the object to.- Overrides:
- render in class BModelElement
checkSizerHit
public int checkSizerHit(Point pt)
- Checks to see if a sizer has been hit by a point
Works on xformed values.
Subclasses should determine appropriate places for
the sizer..
- Parameters:
Point
- pt - the point to check the hit against- Returns:
- kNotHit - not hit
- Overrides:
- checkSizerHit in class BDrawable
setSelected
public void setSelected(boolean b)
- Overrides:
- setSelected in class BDrawable
checkXFormBounds
public int checkXFormBounds(Point pt)
- checks the tranformed bounds...used for hit testing with the mouse..
- Overrides:
- checkXFormBounds in class BDrawable
startResize
public void startResize(int sizerNum)
- called when the drawable is about to be resized..
- Parameters:
int
- sizerNum - a sizerNum returned from checkSizerHit- Overrides:
- startResize in class BDrawable
dragResize
public void dragResize(BScalarPoint deltaXY)
- Called as the drawable is being resized
- Overrides:
- dragResize in class BDrawable
startAdd
public void startAdd()
- called when the drawable is about to be added..
- Overrides:
- startAdd in class BDrawable
stopAdd
public void stopAdd()
- called when the drawable has finished being added..
- Overrides:
- stopAdd in class BDrawable
startMove
public void startMove()
- Overrides:
- startMove in class BDrawable
dragMove
public void dragMove(BScalarPoint deltaXY)
- Overrides:
- dragMove in class BDrawable
stopMove
public void stopMove()
- Overrides:
- stopMove in class BDrawable
intersects
public boolean intersects(BScalarRect point)
- Overrides:
- intersects in class BDrawable
newInstance
public BDrawable newInstance()
- Creates and returns a new instance of the BDrawable object
- Returns:
- a new instance of this BDrawable object.
- Overrides:
- newInstance in class BModelElement
dragAdd
public void dragAdd(BScalarPoint deltaXY)
- Overrides:
- dragAdd in class BDrawable
paintIcon
public void paintIcon(Component c,
Graphics g,
int x,
int y)
- Overrides:
- paintIcon in class BDrawable
copy
public void copy(BModelArc src)
load
public boolean load(BDataFile file)
- Specified by:
- load in interface BSaveable
- Overrides:
- load in class BModelElement
resolveLoadedObject
public void resolveLoadedObject(BModel model)
- Overrides:
- resolveLoadedObject in class BModelElement
save
public boolean save(BDataFile file)
- Saves the BDrawable to a file
- Specified by:
- save in interface BSaveable
- Parameters:
BDataFile
- file - the file to save to- Returns:
- boolean - true on success, false on failure.
- Overrides:
- save in class BModelElement
updateBounds
public void updateBounds()
- Overrides:
- updateBounds in class BModelElement
findChanges
public int findChanges(BModelElement oldElement)
- Overrides:
- findChanges in class BModelElement