|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DoTarget
A DoTarget represents the target for events (and can be a source of events). It also has the responsibilty of dispatching new events and keeping track of old events for the purpose of undoing and redoing actions.
| Method Summary | ||
|---|---|---|
void |
addListener(CommandListener l)
Add a DoListener. |
|
State |
addState(State state)
|
|
boolean |
canRedo()
Return true if there are events to redo. |
|
boolean |
canUndo()
Return true if there are events to undo. |
|
void |
dispatchEvent(DoCommand evt)
Put evt in the event queue. |
|
boolean |
fireCommand(DoCommand cmd)
|
|
boolean |
fireState(State state)
Fire a new state at all command listeners |
|
State |
getCurrentState(Object target)
|
|
|
getParameter(FileGroup key,
String name,
T defaultValue)
Get the parameter for the specified key and name. |
|
State |
getStableState(Object target)
|
|
Set<Tag> |
getTags(FileGroup key)
Get the available tags for specified FileGroup. |
|
State |
processState(DoCommand cmd)
have cmd change the state, but don't fire an event. |
|
void |
redo()
Do the last undone event. |
|
void |
registerCursor(String name,
String url,
Point hotspot)
Register the cursor. |
|
void |
removeControl(Object control)
Remove the control if this supports plugable controls. |
|
void |
removeListener(CommandListener l)
Remove a DoListener |
|
void |
setControl(Object control,
String cursor)
Add the control if this supports plugable controls. |
|
void |
setParameter(FileGroup key,
String name,
Object value)
Set the parameter |
|
void |
setParameters(FileGroup key,
Map<String,Object> parameters)
Do a bulk set of parameters. |
|
void |
setUndo(boolean canUndo)
|
|
void |
undo()
undo the last event. |
|
| Method Detail |
|---|
boolean fireState(State state)
evt -
State processState(DoCommand cmd)
cmd -
boolean fireCommand(DoCommand cmd)
State getCurrentState(Object target)
State getStableState(Object target)
State addState(State state)
void addListener(CommandListener l)
l - void dispatchEvent(DoCommand evt)
evt - void undo()
void redo()
boolean canUndo()
boolean canRedo()
void removeListener(CommandListener l)
l -
void setControl(Object control,
String cursor)
control - void removeControl(Object control)
control - void setUndo(boolean canUndo)
void registerCursor(String name,
String url,
Point hotspot)
name - url - hotspot -
<T> T getParameter(FileGroup key,
String name,
T defaultValue)
T - key - name - defaultValue -
void setParameter(FileGroup key,
String name,
Object value)
key - name - value - must be of type String or a primitive wrapper.
IllegalArgumentException - if value is the wrong type.
void setParameters(FileGroup key,
Map<String,Object> parameters)
key - parameters -
IllegalArgumentException - if any value is the wrong type.Set<Tag> getTags(FileGroup key)
key -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||