Class builder.Node
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class builder.Node

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----builder.Moveable
                                   |
                                   +----builder.Node

public class Node
extends Moveable
An Abstraction. Represents an Object that has an Icon representation which can be used to inform a Map how to handle the information that it contains. It may also have a GUI representation that appears inside a Form and either accepts input from the user or presents results. May be turned into an Abstract Class.

Variable Index

 o EDIT_COLOR
 o INPUT
 o OUTPUT

Method Index

 o action(Event, Object)
action Prints the actions for this Node.
 o addComponent(Component)
addComponent Adds the Component to this Node.
 o addWire(Wire)
addWire Adds Wire to the vector.
 o editMode()
editMode Changes the GUI representation of this node from non-Editable (run mode) to Editable (edit mode).
 o getArgument()
getArgument
 o getComponent()
getComponent
 o getFormLabel()
getFormLabel
 o getIcon()
getIcon
 o getIoOption()
getIoOption
 o getNodeNumber()
getNodeNumber
 o getPaint()
getPaint
 o incommingAction(Node)
incommingAction Must be overriden.
 o lockFormLabel(boolean)
lockFormLabel Locks the Label for this Node in place or unlocks it.
 o mouseDown(Event, int, int)
 o move(Point)
move Moves the GUI representation of this node within the Form.
 o moveIcon(Point)
moveIcon Moves the Icon within the map.
 o paint(Graphics)
paint Defines the message for the place-holder of this Node.
 o paintPlaceHolder(Graphics)
paintPlaceHolder Defines the message for the place-holder of this Node.
 o removeComponent(Component)
removeComponent Removes the Component to this Node.
 o runMode()
runMode Changes the GUI representation of this node from Editable (edit mode) to non-Editable (run mode).
 o setAttributes()
setAttributes Instantiates an Object that allows the builder to change the attributes of this Node.
 o setIcon(Icon)
setIcon Associates an Icon to this node.
 o setIcon(String, Map, Point)
setIcon Associates an Icon to this node.
 o setIoOption(char)
setIoOption Sets the state of this node.
 o setMoving(boolean)
setMoving sets the it's own moving status and the moving status of it's label.
 o setPaint(boolean)
setPaint Sets the status of the paint method used.

Variables

 o EDIT_COLOR
  public final static Color EDIT_COLOR
 o INPUT
  public final static char INPUT
 o OUTPUT
  public final static char OUTPUT

Methods

 o getNodeNumber
  public int getNodeNumber()
getNodeNumber
Returns:
the index of this Node.
 o getFormLabel
  public Name getFormLabel()
getFormLabel
Returns:
a Name associated with the GUI representation of this node.
 o lockFormLabel
  public void lockFormLabel(boolean lock)
lockFormLabel Locks the Label for this Node in place or unlocks it.
Parameters:
lock - true if locked, false if unlocked.
 o getIoOption
  public char getIoOption()
getIoOption
Returns:
the state of this node. Node.INPUT for input. Node.OUTPUT for output.
 o setIoOption
  public void setIoOption(char option)
setIoOption Sets the state of this node.
Parameters:
option - Node.INPUT for input. Node.OUTPUT for output.
 o getIcon
  public Icon getIcon()
getIcon
Returns:
the Icon associated with this node.
 o setIcon
  public void setIcon(String text,
                      Map map,
                      Point locMap)
setIcon Associates an Icon to this node.
Parameters:
text - the label associated with the icon.
map - the map where the icon will be located.
locMap - where in the map to locate the icon initially.
 o setIcon
  public void setIcon(Icon icon)
setIcon Associates an Icon to this node.
Parameters:
icon - a Moveable Icon.
 o moveIcon
  public void moveIcon(Point delta)
moveIcon Moves the Icon within the map.
Parameters:
delta - how much to move the icon from its present position.
 o setMoving
  public void setMoving(boolean status)
setMoving sets the it's own moving status and the moving status of it's label.
Parameters:
status - true if moving, flase if not moving.
Overrides:
setMoving in class Moveable
 o move
  public void move(Point delta)
move Moves the GUI representation of this node within the Form.
Parameters:
delta - how much to move the place-holder from its present position.
Overrides:
move in class Moveable
 o addWire
  public int addWire(Wire wire)
addWire Adds Wire to the vector.
Returns:
the index of the wire.
 o addComponent
  public void addComponent(Component c)
addComponent Adds the Component to this Node.
Parameters:
c - the component.
 o removeComponent
  public void removeComponent(Component c)
removeComponent Removes the Component to this Node.
Parameters:
c - the component.
 o getComponent
  public Component getComponent()
getComponent
Parameters:
c - the component.
Returns:
the Component of this Node. Must be overriden by every Node Type.
 o editMode
  public void editMode()
editMode Changes the GUI representation of this node from non-Editable (run mode) to Editable (edit mode).
 o runMode
  public boolean runMode()
runMode Changes the GUI representation of this node from Editable (edit mode) to non-Editable (run mode).
 o paint
  public void paint(Graphics g)
paint Defines the message for the place-holder of this Node.
Parameters:
g - the graphics context.
Overrides:
paint in class Component
 o paintPlaceHolder
  public void paintPlaceHolder(Graphics g)
paintPlaceHolder Defines the message for the place-holder of this Node.
Parameters:
g - the graphics context.
 o setPaint
  public void setPaint(boolean status)
setPaint Sets the status of the paint method used.
Parameters:
status - true if PlaceHolder is painted, false otherwise.
 o getPaint
  public boolean getPaint()
getPaint
Returns:
true if PlaceHolder should be painted, false otherwise.
 o setAttributes
  public void setAttributes()
setAttributes Instantiates an Object that allows the builder to change the attributes of this Node. And places it next to the GUI representation of the Node.
 o getArgument
  public Object getArgument()
getArgument
Returns:
the argument for this Node.
 o incommingAction
  public boolean incommingAction(Node caller)
incommingAction Must be overriden.
Returns:
true.
 o action
  public boolean action(Event evt,
                        Object arg)
action Prints the actions for this Node.
Overrides:
action in class Component
 o mouseDown
  public boolean mouseDown(Event evt,
                           int x,
                           int y)
Overrides:
mouseDown in class Moveable

All Packages  Class Hierarchy  This Package  Previous  Next  Index