|
||||||||||
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.shapes.BPolygon
Field Summary | |
protected boolean |
doFill
|
protected boolean |
doOutline
|
protected Color |
fillColour
|
protected static String |
kDefaultDoFill
|
protected static String |
kDefaultDoOutline
|
protected static String |
kDefaultFillColor
|
protected static String |
kDefaultLineColor
|
protected static String |
kDefaultOutlineColor
|
protected static String |
kDefaultShapeStyle
|
protected static String |
kDefaultUseFillColor
|
protected static String |
kDefaultUseOutlineColor
|
protected static String |
kKeyDoFill
|
protected static String |
kKeyDoOutline
|
protected static String |
kKeyFillColor
|
protected static String |
kKeyLineColor
|
protected static String |
kKeyOutlineColor
|
protected static String |
kKeyShapeStyle
|
protected static String |
kKeyUseFillColor
|
protected static String |
kKeyUseOutlineColor
|
protected Color |
lineColour
|
protected Color |
outlineColour
|
protected Vector |
points
|
protected int |
sizerNum
|
protected BasicStroke |
stroke
|
protected BScalarPoint |
tmpView
|
protected boolean |
useFillColour
|
protected boolean |
useOutlineColour
|
protected int[] |
xVals
|
protected int[] |
yVals
|
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 | |
BPolygon()
|
|
BPolygon(BPolygon line)
|
|
BPolygon(int x1,
int y1,
int x2,
int y2)
|
Method Summary | |
int |
checkSizerHit(Point pt)
Checks to see if a sizer has been hit by a point Works on xformed values. |
int |
checkXFormBounds(Point pt)
Checks to see if a point has hit the transformed bounds of this object |
void |
continueAdd(BScalarPoint pt)
continue adding this drawable... |
void |
copy(BPolygon src)
copies the data from the src BRectShape into this one. |
void |
dragAdd(BScalarPoint deltaXY)
called when the user is drag adding the line... |
void |
dragResize(BScalarPoint deltaXY)
|
Color |
getFillColour()
|
Color |
getLineColour()
|
String |
getName()
Returns the name of this drawable object |
BPropPanel |
getPropertyPanel()
|
BasicStroke |
getStroke()
|
Integer |
getStyle()
|
boolean |
load(BDataFile file)
Loads the BDrawable from a file |
BDrawable |
newInstance()
Creates and returns a new instance of the BDrawable object |
void |
paintIcon(Component c,
Graphics g,
int x,
int y)
|
void |
render(Graphics2D g2)
Renders the transformed coordinates of the line to a Graphics2D |
protected void |
renderFill(Graphics2D g2)
|
void |
renderOutlineAndSizers(Graphics2D g2)
|
protected void |
renderShape(Graphics2D g2)
|
boolean |
save(BDataFile file)
Saves the BDrawable to a file |
void |
setDoFill(boolean doFill)
|
void |
setFillColour(Color colour)
|
void |
setLineColour(Color colour)
|
void |
setOutlineColour(Color colour)
|
void |
setStroke(BasicStroke stroke)
|
void |
setStyle(Integer style)
|
void |
startAdd()
called when the drawable is about to be added.. |
void |
startResize(int sizerNum)
|
void |
stopAdd()
called when the drawable has finished being added.. |
void |
stopResize()
|
void |
transform(BView viewport,
BScalarPoint parentPos,
int frameCounter)
Transforms the coordinates of the rectshape to a new coordinate space, as defined by the viewport and parent pos. |
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,
copy,
delete,
doPasted,
dragMove,
getBasicStroke,
getBounds,
getColour,
getIconHeight,
getIconWidth,
getPos,
incPos,
intersects,
isDeletable,
isHighlighted,
isInside,
isSelected,
isStatusFlag,
isTransformed,
setFlag,
setHighlighted,
setName,
setPos,
setPos,
setSelected,
snapToGrid,
startMove,
stopMove,
toString |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected boolean doFill
protected boolean doOutline
protected boolean useFillColour
protected boolean useOutlineColour
protected Color fillColour
protected Color outlineColour
protected Color lineColour
protected BasicStroke stroke
protected Vector points
protected BScalarPoint tmpView
protected int[] xVals
protected int[] yVals
protected int sizerNum
protected static final String kKeyDoFill
protected static final String kDefaultDoFill
protected static final String kKeyUseFillColor
protected static final String kDefaultUseFillColor
protected static final String kKeyFillColor
protected static final String kDefaultFillColor
protected static final String kKeyDoOutline
protected static final String kDefaultDoOutline
protected static final String kKeyUseOutlineColor
protected static final String kDefaultUseOutlineColor
protected static final String kKeyOutlineColor
protected static final String kDefaultOutlineColor
protected static final String kKeyShapeStyle
protected static final String kDefaultShapeStyle
protected static final String kKeyLineColor
protected static final String kDefaultLineColor
Constructor Detail |
public BPolygon(int x1, int y1, int x2, int y2)
public BPolygon(BPolygon line)
public BPolygon()
Method Detail |
public void setDoFill(boolean doFill)
public void setFillColour(Color colour)
public Color getFillColour()
public void setOutlineColour(Color colour)
public void setLineColour(Color colour)
public Color getLineColour()
public void setStroke(BasicStroke stroke)
public void setStyle(Integer style)
public Integer getStyle()
public BasicStroke getStroke()
public BPropPanel getPropertyPanel()
public void render(Graphics2D g2)
Graphics2D
- g2 - the place to render the object to.protected void renderFill(Graphics2D g2)
protected void renderShape(Graphics2D g2)
public void renderOutlineAndSizers(Graphics2D g2)
public BDrawable newInstance()
public void startAdd()
public void dragAdd(BScalarPoint deltaXY)
public void continueAdd(BScalarPoint pt)
public void stopAdd()
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 paintIcon(Component c, Graphics g, int x, int y)
public boolean load(BDataFile file)
BDataFile
- file - the file to load frompublic boolean save(BDataFile file)
BDataFile
- file - the file to save topublic void startResize(int sizerNum)
public void dragResize(BScalarPoint deltaXY)
public void stopResize()
public void updateBounds()
public void copy(BPolygon src)
BRectShape
- src - the sourc BRectShape..public String getName()
public int checkXFormBounds(Point pt)
Point
- pt - the point to check the hit against..public int checkSizerHit(Point pt)
Point
- pt - the point to check the hit against
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |