xbneditor
Class Block

java.lang.Object
  |
  +--xbneditor.Block
Direct Known Subclasses:
ChanceBlock

public class Block
extends java.lang.Object

This is the basic node class that all of the other type of nodes will inherit from. It contains the values that are applicate to each of the other classes. (e.g. the name of the node, the type of node, it's location on the drawing area, and any additional comments that can be included with the node.


Constructor Summary
Block()
          Default constructor that is called when the class is being inherited from.
Block(java.lang.String name, double x, double y, java.lang.String type)
          Constructor that contains specific information about certian nodes.
 
Method Summary
 java.lang.String getBlockName()
          Returns the name of the block
 java.lang.String getType()
          Returns the type of the node.
 double getx()
          Returns the value of the x coordinate
 double gety()
          Returns the value of the y coordinate
 void setBlockName(java.lang.String name)
          Sets the block name to something specific
 void setCoordinates(double x, double y)
          Sets the x,y coordinates of the block
 void setType(java.lang.String type)
          Sets the type of this node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Block

public Block()
Default constructor that is called when the class is being inherited from.

Block

public Block(java.lang.String name,
             double x,
             double y,
             java.lang.String type)
Constructor that contains specific information about certian nodes.
Parameters:
name - the name of this node
x - the x coordinate of this node
y - the y coordinate of this node
type - the type of this node
Method Detail

getBlockName

public java.lang.String getBlockName()
Returns the name of the block
Returns:
name - returns the name associated with this node

setBlockName

public void setBlockName(java.lang.String name)
Sets the block name to something specific
Parameters:
name - the new Block name

setCoordinates

public void setCoordinates(double x,
                           double y)
Sets the x,y coordinates of the block

getx

public double getx()
Returns the value of the x coordinate
Returns:
x the x coordinate

gety

public double gety()
Returns the value of the y coordinate
Returns:
y the y coordinate

setType

public void setType(java.lang.String type)
Sets the type of this node. A node can be a nature, decision, or utility node.
Parameters:
type - the type of the node

getType

public java.lang.String getType()
Returns the type of the node.
Returns:
type - the type of the node