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.
-
EDIT_COLOR
-
-
INPUT
-
-
OUTPUT
-
-
action(Event, Object)
- action
Prints the actions for this Node.
-
addComponent(Component)
- addComponent
Adds the Component to this Node.
-
addWire(Wire)
- addWire
Adds Wire to the vector.
-
editMode()
- editMode
Changes the GUI representation of this node from non-Editable (run mode)
to Editable (edit mode).
-
getArgument()
- getArgument
-
getComponent()
- getComponent
-
getFormLabel()
- getFormLabel
-
getIcon()
- getIcon
-
getIoOption()
- getIoOption
-
getNodeNumber()
- getNodeNumber
-
getPaint()
- getPaint
-
incommingAction(Node)
- incommingAction
Must be overriden.
-
lockFormLabel(boolean)
- lockFormLabel
Locks the Label for this Node in place or unlocks it.
-
mouseDown(Event, int, int)
-
-
move(Point)
- move
Moves the GUI representation of this node within the Form.
-
moveIcon(Point)
- moveIcon
Moves the Icon within the map.
-
paint(Graphics)
- paint
Defines the message for the place-holder of this Node.
-
paintPlaceHolder(Graphics)
- paintPlaceHolder
Defines the message for the place-holder of this Node.
-
removeComponent(Component)
- removeComponent
Removes the Component to this Node.
-
runMode()
- runMode
Changes the GUI representation of this node from Editable (edit mode)
to non-Editable (run mode).
-
setAttributes()
- setAttributes
Instantiates an Object that allows the builder to change the attributes
of this Node.
-
setIcon(Icon)
- setIcon
Associates an Icon to this node.
-
setIcon(String, Map, Point)
- setIcon
Associates an Icon to this node.
-
setIoOption(char)
- setIoOption
Sets the state of this node.
-
setMoving(boolean)
- setMoving
sets the it's own moving status and the moving status of it's label.
-
setPaint(boolean)
- setPaint
Sets the status of the paint method used.
EDIT_COLOR
public final static Color EDIT_COLOR
INPUT
public final static char INPUT
OUTPUT
public final static char OUTPUT
getNodeNumber
public int getNodeNumber()
- getNodeNumber
- Returns:
- the index of this Node.
getFormLabel
public Name getFormLabel()
- getFormLabel
- Returns:
- a Name associated with the GUI representation of this node.
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.
getIoOption
public char getIoOption()
- getIoOption
- Returns:
- the state of this node.
Node.INPUT for input.
Node.OUTPUT for output.
setIoOption
public void setIoOption(char option)
- setIoOption
Sets the state of this node.
- Parameters:
- option - Node.INPUT for input.
Node.OUTPUT for output.
getIcon
public Icon getIcon()
- getIcon
- Returns:
- the Icon associated with this node.
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.
setIcon
public void setIcon(Icon icon)
- setIcon
Associates an Icon to this node.
- Parameters:
- icon - a Moveable Icon.
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.
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
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
addWire
public int addWire(Wire wire)
- addWire
Adds Wire to the vector.
- Returns:
- the index of the wire.
addComponent
public void addComponent(Component c)
- addComponent
Adds the Component to this Node.
- Parameters:
- c - the component.
removeComponent
public void removeComponent(Component c)
- removeComponent
Removes the Component to this Node.
- Parameters:
- c - the component.
getComponent
public Component getComponent()
- getComponent
- Parameters:
- c - the component.
- Returns:
- the Component of this Node.
Must be overriden by every Node Type.
editMode
public void editMode()
- editMode
Changes the GUI representation of this node from non-Editable (run mode)
to Editable (edit mode).
runMode
public boolean runMode()
- runMode
Changes the GUI representation of this node from Editable (edit mode)
to non-Editable (run mode).
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
paintPlaceHolder
public void paintPlaceHolder(Graphics g)
- paintPlaceHolder
Defines the message for the place-holder of this Node.
- Parameters:
- g - the graphics context.
setPaint
public void setPaint(boolean status)
- setPaint
Sets the status of the paint method used.
- Parameters:
- status - true if PlaceHolder is painted, false otherwise.
getPaint
public boolean getPaint()
- getPaint
- Returns:
- true if PlaceHolder should be painted, false otherwise.
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.
getArgument
public Object getArgument()
- getArgument
- Returns:
- the argument for this Node.
incommingAction
public boolean incommingAction(Node caller)
- incommingAction
Must be overriden.
- Returns:
- true.
action
public boolean action(Event evt,
Object arg)
- action
Prints the actions for this Node.
- Overrides:
- action in class Component
mouseDown
public boolean mouseDown(Event evt,
int x,
int y)
- Overrides:
- mouseDown in class Moveable
All Packages Class Hierarchy This Package Previous Next Index