|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.EventObject
gov.sandia.ccaffeine.dc.user_iface.MVC.event.DisplayEvent
public class DisplayEvent
This event can be used to notify components
that an entity wants some information.
This event can be used to
request the following info:
display palette
display arena
display chain
display component
display state
A view might respond to a "draw palette" by rendering icons in a palette. The end-user can drag-and-drop icons from the palette to the main workspace (the arena).
A view might respond to a "draw arena" by redendering cca components in the main workspace. An end-user can drag components to different locations, remove components, view or set property values, draw a line between two different components, etc.
A view might respond to a "draw chain" by drawing a line between two ports that are inside of two different cca components. A port is usually rendered as a small rectangle inside of a component.
A view might respond to a "draw component" by rendering one cca component in the main workspace (the arena). The end-user can drag the component to a new location, remove the component, draw a line to/from to different component, view or edit the component's properties, etc.
A view might respond to a "draw state" by redering components in the main workspace (the arena) and by rendering lines between all of the components that are connected.
Field Summary | |
---|---|
static java.lang.String |
ARENA
One of the entity values |
static java.lang.String |
CHAIN
One of the entity values |
static java.lang.String |
COMPONENT
One of the entity values |
protected java.lang.String |
componentInstanceName
|
protected java.lang.String |
entity
|
protected int |
numberOfArguments
|
static java.lang.String |
PALETTE
One of the entity values |
static java.lang.String |
STATE
One of the entity values |
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
DisplayEvent(java.lang.Object source,
int numberOfArguments,
java.lang.String entity)
Create a DisplayEvent. |
|
DisplayEvent(java.lang.Object source,
int numberOfArguments,
java.lang.String entity,
java.lang.String componentInstanceName)
Create a DisplayEvent. |
|
DisplayEvent(java.lang.Object source,
java.lang.String entity)
Create a DisplayEvent. |
Method Summary | |
---|---|
java.lang.String |
getComponentInstanceName()
|
java.lang.String |
getEntity()
|
int |
getNumberOfArguments()
Retrieve the number of arguments in the request string. |
Methods inherited from class java.util.EventObject |
---|
getSource, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int numberOfArguments
public static final java.lang.String PALETTE
public static final java.lang.String ARENA
public static final java.lang.String CHAIN
public static final java.lang.String COMPONENT
public static final java.lang.String STATE
protected java.lang.String entity
protected java.lang.String componentInstanceName
Constructor Detail |
---|
public DisplayEvent(java.lang.Object source, java.lang.String entity)
source
- The entity that created this event.entity
- We are requesting info
on which entity? We can
request info on the PALETTE,
ARENA, CHAIN, COMPONENT,
STATE.public DisplayEvent(java.lang.Object source, int numberOfArguments, java.lang.String entity)
source
- The entity that created this event.entity
- We are requesting info
on which entity? We can
request info on the PALETTE,
ARENA, CHAIN, COMPONENT,
STATE.public DisplayEvent(java.lang.Object source, int numberOfArguments, java.lang.String entity, java.lang.String componentInstanceName)
source
- The entity that created this event.entity
- We are requesting info
on which entity? We can
request info on the PALETTE,
ARENA, CHAIN, COMPONENT,
STATE.componentInstanceName
- If an entity wants some info on
a particular component, then that
entity has to supply the name of
the component.
The instance
name is usually the name of the component's
java class (without the package name)
concatenated with an index number.
EXAMPLE: "StarterComponent0"
Can be set to null.Method Detail |
---|
public int getNumberOfArguments()
public java.lang.String getEntity()
public java.lang.String getComponentInstanceName()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |