Synergy Home Page

au.edu.swin.synergy.plugin.packager
Class BPackageTerminator

java.lang.Object
  |
  +--au.edu.swin.synergy.plugin.diagram.BDrawable
        |
        +--au.edu.swin.synergy.plugin.packager.BPackageTerminator

public class BPackageTerminator
extends BDrawable
implements BTreeNode, BSaveable, BView

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
 
Constructor Summary
  BPackageTerminator()
          Default constructor for BSaveable
protected BPackageTerminator(BPackageTerminator pTerm)
           
  BPackageTerminator(int x, int y, String name)
           
  BPackageTerminator(String name)
          Please complete the missing tags for BPackageTerminator
 
Method Summary
 void addDrawable(BDrawable drawable)
           
 void bringSelectionToFront(Vector selection)
           
 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(BPackageTerminator src)
           
 void dragResize(BScalarPoint deltaXY)
          Called as the drawable is being resized
 Object getChildAt(int index)
           
 int getChildCount()
           
 int getDrawableIndex(BDrawable drawable)
           
 Vector getDrawables()
           
 int getHalfHeight()
           
 BScalarPoint getHalfWH()
           
 int getHalfWidth()
           
 int getHeight()
           
 int getIndexOf(Object node)
           
 String getName()
           
 BScalar getOOZ()
           
 Object getParent()
           
 BScalarRect getViewBounds()
           
 BScalarRect getViewCoords()
           
 int getWidth()
           
 Rectangle getXFormedBounds()
           
 int getXPos()
           
 int getYPos()
           
 BScalar getZ()
           
 boolean isaDummy()
           
 boolean isLeaf()
           
 boolean load(BDataFile file)
          Loads the BDrawable from a file
 BDrawable newInstance()
          Creates and returns a new instance of the BDrawable object
 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
 void renderOutlineAndSizers(Graphics2D g2)
           
 boolean save(BDataFile file)
          Saves the BDrawable to a file
 void sendSelectionToBack(Vector selection)
           
 void setColour(Color colour)
           
 void setDummyStatus(boolean dummy)
           
 void setParent(Object parent)
           
 void startResize(int sizerNum)
          called when the drawable is about to be resized..
 void stopResize()
          called when the drawable has finished being resized..
 String toString()
          Please complete the missing tags for toString
 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 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, dragAdd, dragMove, getBasicStroke, getBounds, getColour, getIconHeight, getIconWidth, getPos, getPropertyPanel, incPos, intersects, isDeletable, isHighlighted, isInside, isSelected, isStatusFlag, isTransformed, paintIcon, setFlag, setHighlighted, setName, setPos, setPos, setSelected, snapToGrid, startAdd, startMove, stopAdd, stopMove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BPackageTerminator

public BPackageTerminator(String name)
Please complete the missing tags for BPackageTerminator
Parameters:
-  

BPackageTerminator

public BPackageTerminator()
Default constructor for BSaveable

BPackageTerminator

public BPackageTerminator(int x,
                          int y,
                          String name)

BPackageTerminator

protected BPackageTerminator(BPackageTerminator pTerm)
Method Detail

setDummyStatus

public void setDummyStatus(boolean dummy)

isaDummy

public boolean isaDummy()

getXFormedBounds

public final Rectangle getXFormedBounds()

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.
Parameters:
BViewport - viewport - the viewport that this object is going to be drawn in
Point - parentPos - coordinates of any parent object, but this time in view coords.
Overrides:
transform in class BDrawable

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 BDrawable

renderOutlineAndSizers

public void renderOutlineAndSizers(Graphics2D g2)

checkXFormBounds

public int checkXFormBounds(Point pt)
Checks to see if a point has hit the transformed bounds of this object
Parameters:
Point - pt - the point to check the hit against..
Returns:
kNotHit - not hit
Overrides:
checkXFormBounds in class BDrawable

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

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

stopResize

public void stopResize()
called when the drawable has finished being resized..
Overrides:
stopResize 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 BDrawable

load

public boolean load(BDataFile file)
Loads the BDrawable from a file
Specified by:
load in interface BSaveable
Parameters:
BDataFile - file - the file to load from
Returns:
boolean - true on success, false on failure.
Overrides:
load in class BDrawable

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 BDrawable

updateBounds

public void updateBounds()
updates the bounding region of the drawable Called when something requires the bounds of the drawable to be updated. Subclasses should determine a suitable way to update themselves.
Overrides:
updateBounds in class BDrawable

getDrawables

public Vector getDrawables()

addDrawable

public void addDrawable(BDrawable drawable)

removeDrawable

public void removeDrawable(BDrawable drawable)

removeDrawable

public void removeDrawable(int index)

getDrawableIndex

public int getDrawableIndex(BDrawable drawable)

bringSelectionToFront

public void bringSelectionToFront(Vector selection)

sendSelectionToBack

public void sendSelectionToBack(Vector selection)

toString

public String toString()
Please complete the missing tags for toString
Parameters:
-  
Returns:
 
Overrides:
toString in class BDrawable
Pre Condition:
 
Post Condition:
 

setColour

public void setColour(Color colour)

copy

public void copy(BPackageTerminator src)

isLeaf

public boolean isLeaf()
Specified by:
isLeaf in interface BTreeNode

getChildAt

public Object getChildAt(int index)
Specified by:
getChildAt in interface BTreeNode

getChildCount

public int getChildCount()
Specified by:
getChildCount in interface BTreeNode

getParent

public Object getParent()
Specified by:
getParent in interface BTreeNode

getIndexOf

public int getIndexOf(Object node)
Specified by:
getIndexOf in interface BTreeNode

setParent

public void setParent(Object parent)
Specified by:
setParent in interface BTreeNode

removeAllChildren

public void removeAllChildren()
Specified by:
removeAllChildren in interface BTreeNode

getName

public String getName()
Specified by:
getName in interface BTreeNode
Overrides:
getName in class BDrawable

getZ

public BScalar getZ()
Specified by:
getZ in interface BView

getOOZ

public BScalar getOOZ()
Specified by:
getOOZ in interface BView

getHalfWidth

public int getHalfWidth()
Specified by:
getHalfWidth in interface BView

getHalfHeight

public int getHalfHeight()
Specified by:
getHalfHeight in interface BView

getWidth

public int getWidth()
Specified by:
getWidth in interface BView

getHeight

public int getHeight()
Specified by:
getHeight in interface BView

getXPos

public int getXPos()
Specified by:
getXPos in interface BView

getYPos

public int getYPos()
Specified by:
getYPos in interface BView

getViewCoords

public BScalarRect getViewCoords()
Specified by:
getViewCoords in interface BView

getViewBounds

public BScalarRect getViewBounds()
Specified by:
getViewBounds in interface BView

getHalfWH

public BScalarPoint getHalfWH()
Specified by:
getHalfWH in interface BView

Synergy Home Page