|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectetomica.graphics.Device
public abstract class Device
Base class for all Devices. These are objects that permit manipulation of the fields of other objects. They provide a (usually) graphical interface to permit values of fields to be input and changed.
| Nested Class Summary | |
|---|---|
protected static class |
Device.ActionSet
|
| Field Summary | |
|---|---|
protected IController |
controller
|
protected Unit |
unit
|
| Constructor Summary | |
|---|---|
Device()
|
|
Device(IController controller)
|
|
| Method Summary | |
|---|---|
protected void |
doAction(IAction action)
Method called by subclasses to execute the action of the device. |
IController |
getController()
|
Dimension |
getDimension()
|
IAction |
getPostAction()
|
IAction |
getPreAction()
Returns the action to be performed before the primary action executed by the device. |
Unit |
getUnit()
|
Component |
graphic()
Same as graphic method with a null argument. |
abstract Component |
graphic(Object obj)
Interface for a Simulation element that would be used in a simulation graphical user interface (GUI) |
void |
setController(IController controller)
|
void |
setPostAction(IAction action)
Sets an action to be performed after the primary action executed by the device. |
void |
setPreAction(IAction action)
Sets an action to be performed before the primary action executed by the device. |
void |
setUnit(Unit u)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Unit unit
protected IController controller
| Constructor Detail |
|---|
public Device()
public Device(IController controller)
| Method Detail |
|---|
protected void doAction(IAction action)
public void setPreAction(IAction action)
public IAction getPreAction()
public void setPostAction(IAction action)
public IAction getPostAction()
public IController getController()
public void setController(IController controller)
controller - The controller to set.public abstract Component graphic(Object obj)
GraphicalElement
graphic in interface GraphicalElementobj - An object that might be used to specify the graphic that the GraphicalElement is to return.
In most cases the GraphicalElement ignores this parameter, and it can be set to null.
Device,
Displaypublic final Component graphic()
public void setUnit(Unit u)
setUnit in interface Dimensionedpublic Unit getUnit()
getUnit in interface Dimensionedpublic Dimension getDimension()
getDimension in interface Dimensioned
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||