|
||||||||||
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.BRectShape
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 |
kDefaultStrokeCap
|
protected static String |
kDefaultStrokeJoin
|
protected static String |
kDefaultStrokeLimit
|
protected static String |
kDefaultStrokePhase
|
protected static String |
kDefaultStrokeWidth
|
protected static String |
kDefaultUseFillColor
|
protected static String |
kDefaultUseOutlineColor
|
protected static String |
kKeyDoFill
loads a BRectShape form a data file |
protected static String |
kKeyDoOutline
|
protected static String |
kKeyFillColor
|
protected static String |
kKeyLineColor
|
protected static String |
kKeyOutlineColor
|
protected static String |
kKeyShapeStyle
|
protected static String |
kKeyStrokeCap
|
protected static String |
kKeyStrokeDash
|
protected static String |
kKeyStrokeJoin
|
protected static String |
kKeyStrokeLimit
|
protected static String |
kKeyStrokePhase
|
protected static String |
kKeyStrokeWidth
|
protected static String |
kKeyUseFillColor
|
protected static String |
kKeyUseOutlineColor
|
protected Color |
lineColour
|
protected int |
lineSize
When multiple lines are drawn, this is assigned line width, instead creating new instance. |
protected BScalarRect |
local
|
protected Color |
outlineColour
|
protected Integer |
shapeStyle
|
protected int |
sizerNum
|
protected BasicStroke |
stroke
|
protected Rectangle |
tmpXformed
|
protected boolean |
useFillColour
|
protected boolean |
useOutlineColour
|
protected Rectangle |
xformed
|
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 | |
protected |
BRectShape()
|
protected |
BRectShape(int x,
int y,
int w,
int h)
|
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 |
copy(BRectShape src)
copies the data from the src BRectShape into this one. |
void |
dragAdd(BScalarPoint deltaXY)
|
void |
dragResize(BScalarPoint deltaXY)
Called as the drawable is being resized |
Color |
getFillColour()
|
Color |
getLineColour()
|
BPropPanel |
getPropertyPanel()
|
BasicStroke |
getStroke()
|
Integer |
getStyle()
|
boolean |
load(BDataFile file)
|
abstract 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)
|
abstract void |
renderFill(Graphics2D g2)
|
void |
renderOutlineAndSizers(Graphics2D g2)
Only render the outline and the sizing boxes.... |
void |
renderRect(Graphics2D g2,
int noLines)
|
void |
renderRectShape(Graphics2D g2)
Renders the transformed coordinates of the drawable object to a Graphics2D Left to subclasses to implement as needed Subclasses should check to make sure if they are supposed to fill or outline the shape, as well as whether or not they should use their own colours. |
abstract void |
renderShape(Graphics2D g2)
|
boolean |
save(BDataFile file)
saaves the BRectShape to a data file |
void |
setDoFill(boolean doFill)
|
void |
setFillColour(Color colour)
|
void |
setHighlighted(boolean on)
|
void |
setLineColour(Color colour)
|
void |
setLocalBounds(BRectShape rec)
|
void |
setLocalWH(int w,
int h)
|
void |
setLocalXY(BScalarPoint pt)
|
void |
setOutlineColour(Color colour)
|
void |
setSelected(boolean on)
|
void |
setStroke(BasicStroke stroke)
|
void |
setStyle(Integer style)
|
void |
startAdd()
|
void |
startResize(int sizerNum)
called when the drawable is about to be resized.. |
void |
stopAdd()
|
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,
continueAdd,
copy,
delete,
doPasted,
dragMove,
getBasicStroke,
getBounds,
getColour,
getIconHeight,
getIconWidth,
getName,
getPos,
incPos,
intersects,
isDeletable,
isHighlighted,
isInside,
isSelected,
isStatusFlag,
isTransformed,
setFlag,
setName,
setPos,
setPos,
snapToGrid,
startMove,
stopMove,
toString |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected BScalarRect local
protected Rectangle xformed
protected Rectangle tmpXformed
protected boolean doFill
protected boolean doOutline
protected boolean useFillColour
protected boolean useOutlineColour
protected Color fillColour
protected Color outlineColour
protected Color lineColour
protected int sizerNum
protected int lineSize
protected Integer shapeStyle
protected transient BasicStroke stroke
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
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 |
protected BRectShape(int x, int y, int w, int h)
protected BRectShape()
Method Detail |
public void renderRectShape(Graphics2D g2)
Graphics2D
- g2 - the place to render the object to.public abstract void renderFill(Graphics2D g2)
public abstract void renderShape(Graphics2D g2)
public void renderRect(Graphics2D g2, int noLines)
public abstract BDrawable newInstance()
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 render(Graphics2D g2)
public void renderOutlineAndSizers(Graphics2D g2)
public void paintIcon(Component c, Graphics g, int x, int y)
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 againstpublic void startAdd()
public void dragAdd(BScalarPoint deltaXY)
public void stopAdd()
public void startResize(int sizerNum)
int
- sizerNum - a sizerNum returned from checkSizerHitpublic void dragResize(BScalarPoint deltaXY)
public void stopResize()
public void updateBounds()
public void copy(BRectShape src)
BRectShape
- src - the sourc BRectShape..public BPropPanel getPropertyPanel()
public void setLocalXY(BScalarPoint pt)
public void setLocalWH(int w, int h)
public void setLocalBounds(BRectShape rec)
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 void setHighlighted(boolean on)
public void setSelected(boolean on)
public boolean load(BDataFile file)
public boolean save(BDataFile file)
file
- the file to save the rect shape to
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |