|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--au.edu.swin.synergy.plugin.diagram.BDrawable | +--au.edu.swin.synergy.plugin.packager.BPackageArc
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 |
Constructor Summary | |
BPackageArc()
Default constructor for BSaveable |
|
BPackageArc(BMetaElement element)
|
|
BPackageArc(BPackageArc pa)
|
Method Summary | |
void |
addDrawable(BDrawable drawable)
|
void |
addTextProperty(int index,
BScalarPoint pos)
|
BScalarPoint |
calcDirection()
Calculates the direction of the line... |
int |
checkCurvedSizerHit(Point pt)
|
int |
checkSizerHit(Point pt)
Checks to see if a sizer has been hit by a point Works on xformed values. |
int |
checkStraightSizerHit(Point pt)
|
int |
checkXFormBounds(Point pt)
checks the tranformed bounds...used for hit testing with the mouse.. |
int |
checkXFormCurvedBounds(Point pt)
|
int |
checkXFormSteppedBounds(Point pt)
|
int |
checkXFormStraightBounds(Point pt)
|
void |
copy(BPackageArc src)
|
void |
dragAdd(BScalarPoint deltaXY)
|
void |
dragResize(BScalarPoint deltaXY,
int sizer)
Called as the drawable is being resized |
protected void |
drawCurve(Graphics2D g2)
|
BPackageTerminator |
getArcTerminator()
|
int |
getArcType()
|
Object |
getChildAt(int index)
|
int |
getChildCount()
|
Color |
getColour()
|
Vector |
getDrawables()
|
BScalarPoint |
getEndPos()
|
BPackageTerminator |
getEndTerminator()
|
int |
getIndexOf(Object node)
|
BScalarPoint |
getInfluence(BScalarPoint textPt)
|
BMetaElement |
getMetaElement()
|
String |
getName()
|
Object |
getParent()
|
Vector |
getProperties()
|
BPropPanel |
getPropertyPanel()
|
BPackageTerminator |
getStartTerminator()
|
int |
getSteppingType()
|
BasicStroke |
getStroke()
|
Integer |
getStyle()
|
BDrawable |
getTextProperty(int index)
|
void |
initCtrlPos()
|
void |
initEndPos(BScalarRect rect)
|
protected void |
intercept(Point start,
Point end,
int plane,
int bound,
Point icept)
|
boolean |
intersects(BScalarRect point)
|
boolean |
isLeaf()
|
boolean |
load(BDataFile file)
Loads the BDrawable from a file |
BDrawable |
newInstance()
Creates and returns a new instance of the BDrawable object |
protected int |
outcode(Rectangle rect,
int posX,
int posY)
|
void |
paintIcon(Component c,
Graphics g,
int x,
int y)
|
void |
removeAllChildren()
|
void |
removeDrawable(BDrawable drawable)
|
void |
removeDrawable(int index)
|
void |
render(Graphics2D g2)
Renders the transformed coordinates of the drawable object to a Graphics2D |
protected void |
renderCurve(Graphics2D g2)
|
void |
renderCurve(Graphics2D g2,
int style)
|
void |
renderLine(Graphics2D g2,
int style)
|
void |
renderProperties(Graphics2D g2)
|
protected void |
renderSizersAndOutLine(Graphics2D g2)
|
protected void |
renderStepped(Graphics2D g2)
|
void |
renderStepped(Graphics2D g2,
int style)
|
boolean |
save(BDataFile file)
Saves the BDrawable to a file |
void |
setArcTerminator(BPackageTerminator at)
|
void |
setArcType(int type)
|
void |
setColour(Color c)
|
void |
setCtrlPoints(BScalarPoint[] ctrl)
|
void |
setEndPos(BScalarPoint theEndPos)
|
void |
setEndTerminator(BPackageTerminator et)
|
void |
setParent(Object parent)
|
void |
setStartTerminator(BPackageTerminator st)
|
void |
setStroke(BasicStroke stroke)
|
void |
setStyle(Integer sStyle)
|
void |
startAdd()
|
void |
stopAdd()
|
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. |
void |
transformArc(BModelNode startNode,
BModelNode endNode,
BView viewport,
BScalarPoint parentPos,
int frameCounter)
|
void |
transformCtrl(BView viewport,
BScalarPoint parentPos,
int frameCounter)
|
protected void |
transformEndTerm(BView viewport,
int frameCounter)
|
protected void |
transformNodePos(BModelNode node,
BScalarPoint bspt,
Point pt,
BView viewport,
BScalarPoint parentPos,
int frameCounter)
|
void |
transformProperties(BView viewport,
int frameCounter)
|
protected void |
transformStartTerm(BView viewport,
int frameCounter)
|
void |
transformStepped(BView viewport,
BScalarPoint parentPos,
int frameCounter)
|
protected void |
transformSteppedToSide(BModelNode startNode,
BModelNode endNode,
BView viewport,
int frameCounter)
|
protected void |
transformToSide(BModelNode node,
Point center,
Point finalPt,
Point outPt)
tranforms a center point to the side of the model's bounding box. |
void |
updateBounds()
updates the bounding region of the drawable Called when something requires the bounds of the drawable to be updated. |
Methods inherited from class au.edu.swin.synergy.plugin.diagram.BDrawable |
checkXFormHit,
contains,
continueAdd,
copy,
delete,
doPasted,
dragMove,
dragResize,
getBasicStroke,
getBounds,
getIconHeight,
getIconWidth,
getPos,
incPos,
isDeletable,
isHighlighted,
isInside,
isSelected,
isStatusFlag,
isTransformed,
setFlag,
setHighlighted,
setName,
setPos,
setPos,
setSelected,
snapToGrid,
startMove,
startResize,
stopMove,
stopResize,
toString |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static final int kNumCtrlPoints
public static final int kStraightType
public static final int kSteppedType
public static final int kCurvedType
public static final int kDefaultHeight
public static final int kDefaultWidth
public static final int kHitLen
public static final int kHalfHitLen
public static final int kLeftRight
public static final int kTopBottom
public static final int kPositive
public static final int kNegative
protected Vector drawables
protected Vector properties
protected Object parent
protected Color arcColour
protected BasicStroke arcStroke
protected Integer lineStyle
protected int arcType
protected BMetaElement metaElement
protected BPackageTerminator startTerminator
protected BPackageTerminator endTerminator
protected BPackageTerminator arcTerminator
protected BScalarPoint dir
protected static final String kKeyArcType
protected static final String kDefaultArcType
protected static final String kKeyLineStyle
protected static final String kDefaultLineStyle
protected static final String kKeyArcColor
protected static final String kDefaultArcColor
protected static final String kKeyStrokeWidth
protected static final String kDefaultStrokeWidth
protected static final String kKeyStrokeCap
protected static final String kDefaultStrokeCap
protected static final String kKeyStrokeJoin
protected static final String kDefaultStrokeJoin
protected static final String kKeyStrokeLimit
protected static final String kDefaultStrokeLimit
protected static final String kKeyStrokePhase
protected static final String kDefaultStrokePhase
protected static final String kKeyStrokeDash
Constructor Detail |
public BPackageArc(BMetaElement element)
public BPackageArc(BPackageArc pa)
public BPackageArc()
Method Detail |
public Vector getProperties()
public final int getSteppingType()
public BPackageTerminator getEndTerminator()
public void setEndTerminator(BPackageTerminator et)
public BPackageTerminator getStartTerminator()
public void setStartTerminator(BPackageTerminator st)
public BPackageTerminator getArcTerminator()
public void setArcTerminator(BPackageTerminator at)
public BPropPanel getPropertyPanel()
public void initCtrlPos()
public void initEndPos(BScalarRect rect)
public void setEndPos(BScalarPoint theEndPos)
public Vector getDrawables()
public void setCtrlPoints(BScalarPoint[] ctrl)
public void addDrawable(BDrawable drawable)
public void removeDrawable(BDrawable drawable)
public void removeDrawable(int index)
public void setStroke(BasicStroke stroke)
public BasicStroke getStroke()
public void setArcType(int type)
public int getArcType()
public Integer getStyle()
public void setStyle(Integer sStyle)
public Color getColour()
public void setColour(Color c)
public BMetaElement getMetaElement()
protected int outcode(Rectangle rect, int posX, int posY)
protected void intercept(Point start, Point end, int plane, int bound, Point icept)
public void addTextProperty(int index, BScalarPoint pos)
public BScalarPoint getEndPos()
public BDrawable getTextProperty(int index)
public void transform(BView viewport, BScalarPoint parentPos, int frameCounter)
BView
- viewport - the viewport that this object is going to be drawn inPoint
- parentPos - coordinates of any parent objectpublic void transformArc(BModelNode startNode, BModelNode endNode, BView viewport, BScalarPoint parentPos, int frameCounter)
protected void transformStartTerm(BView viewport, int frameCounter)
protected void transformEndTerm(BView viewport, int frameCounter)
public void transformProperties(BView viewport, int frameCounter)
protected void transformNodePos(BModelNode node, BScalarPoint bspt, Point pt, BView viewport, BScalarPoint parentPos, int frameCounter)
protected void transformToSide(BModelNode node, Point center, Point finalPt, Point outPt)
protected void transformSteppedToSide(BModelNode startNode, BModelNode endNode, BView viewport, int frameCounter)
public void transformCtrl(BView viewport, BScalarPoint parentPos, int frameCounter)
public void transformStepped(BView viewport, BScalarPoint parentPos, int frameCounter)
public void render(Graphics2D g2)
Graphics2D
- g2 - the place to render the object to.public void renderProperties(Graphics2D g2)
public void renderLine(Graphics2D g2, int style)
public void renderStepped(Graphics2D g2, int style)
public void renderCurve(Graphics2D g2, int style)
protected void drawCurve(Graphics2D g2)
public BScalarPoint calcDirection()
public BScalarPoint getInfluence(BScalarPoint textPt)
public boolean intersects(BScalarRect point)
protected void renderCurve(Graphics2D g2)
protected void renderStepped(Graphics2D g2)
protected void renderSizersAndOutLine(Graphics2D g2)
public int checkXFormBounds(Point pt)
public int checkXFormCurvedBounds(Point pt)
public int checkXFormStraightBounds(Point pt)
public int checkXFormSteppedBounds(Point pt)
public int checkSizerHit(Point pt)
Point
- pt - the point to check the hit againstpublic int checkStraightSizerHit(Point pt)
public int checkCurvedSizerHit(Point pt)
public void startAdd()
public void dragAdd(BScalarPoint deltaXY)
public void stopAdd()
public void dragResize(BScalarPoint deltaXY, int sizer)
public void paintIcon(Component c, Graphics g, int x, int y)
public BDrawable newInstance()
public void copy(BPackageArc src)
public boolean load(BDataFile file)
BDataFile
- file - the file to load frompublic boolean save(BDataFile file)
BDataFile
- file - the file to save topublic void updateBounds()
public boolean isLeaf()
public Object getChildAt(int index)
public int getChildCount()
public Object getParent()
public int getIndexOf(Object node)
public void setParent(Object parent)
public void removeAllChildren()
public String getName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |