Synergy Home Page

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

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

public class BPackageNode
extends BDrawable
implements BTreeNode

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
  BPackageNode()
          This is the default constructor needed for the BSaveable interface
  BPackageNode(BMetaElement element)
          Please complete the missing tags for BPackageNode
protected BPackageNode(BPackageNode pNode)
           
  BPackageNode(int x, int y, BMetaElement element)
          Please complete the missing tags for BPackageNode
 
Method Summary
 void addDrawable(BDrawable drawable)
           
 void addTextProperty(int index, BScalarPoint pos)
           
 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(BPackageNode src)
           
 Object getChildAt(int index)
           
 int getChildCount()
           
 int getDrawableIndex(BDrawable drawable)
           
 Vector getDrawables()
           
 int getIndexOf(Object node)
           
 BMetaElement getMetaElement()
           
 String getName()
           
 Object getParent()
           
 Vector getProperties()
           
 BDrawable getTextProperty(int index)
           
 Rectangle getXFormedBounds()
           
 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 setParent(Object parent)
           
 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, dragResize, 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, startResize, stopAdd, stopMove, stopResize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BPackageNode

public BPackageNode(BMetaElement element)
Please complete the missing tags for BPackageNode
Parameters:
-  

BPackageNode

public BPackageNode(int x,
                    int y,
                    BMetaElement element)
Please complete the missing tags for BPackageNode
Parameters:
-  

BPackageNode

protected BPackageNode(BPackageNode pNode)

BPackageNode

public BPackageNode()
This is the default constructor needed for the BSaveable interface
Method Detail

getProperties

public Vector getProperties()

getMetaElement

public BMetaElement getMetaElement()

getXFormedBounds

public final Rectangle getXFormedBounds()

getTextProperty

public BDrawable getTextProperty(int index)

addTextProperty

public void addTextProperty(int index,
                            BScalarPoint pos)

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
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

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
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
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)

getDrawableIndex

public int getDrawableIndex(BDrawable drawable)

removeDrawable

public void removeDrawable(BDrawable drawable)

removeDrawable

public void removeDrawable(int index)

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(BPackageNode 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

Synergy Home Page