|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--mozile.edit.Command
Defined in edit.js
Field Summary | |
Boolean |
group
Indicates that this command does not contain more commands. |
String |
makesChanges
Specifies what kind of change this command makes to the document. |
String |
name
The name for this command. |
String |
watchesChanges
Specifies what kind of change will cause this command to change its isActive or isAvailable states. |
Constructor Summary | |
mozile.edit.Command
()
Commands are objects capable of making undoable changes to the document, and aware of the context in which those changes can be made. |
Method Summary | |
Void
|
evaluate(<String> code)
Evaluates the given JavaScript code string in the context of this object instance. |
mozile.edit.State
|
execute(<mozile.edit.State> state, <Boolean> fresh)
Executes the command and returns a "state" object which stores the information necessary to unexecute the command. |
Boolean
|
isActive(<Event> event)
Indicates that the command is currently active. |
Boolean
|
isAvailable(<Event> event)
Indicates that the command is available to be used. |
mozile.edit.State
|
prepare(<Event> event)
Creates a "state" object with all of the information needed to execute the command. |
mozile.edit.State
|
request(<mozile.edit.State> state, <Boolean> fresh, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
Used by commands to call other commands. |
Boolean
|
respond(<String> change)
Determines whether this command should respond to a change of a given type. |
Boolean
|
test(<Event> event)
Tests to see if the command should be executed. |
String
|
toString()
Returns a description of this object. |
mozile.edit.State
|
trigger(<Event> event)
Executes the command, but only if the test is successful. |
mozile.edit.State
|
unexecute(<mozile.edit.State> state, <Boolean> fresh)
Reverses the operation of the execute command. |
Field Detail |
Boolean group
String makesChanges
String name
String watchesChanges
Constructor Detail |
mozile.edit.Command()
name
- The command's name.
Method Detail |
Void evaluate(<String> code)
code
- The JavaScript code to be evaluated.
mozile.edit.State execute(<mozile.edit.State> state, <Boolean> fresh)
This method is meant to be overridden by instances and subclasses.
state
- A state object with the information necessary for executing this command.
fresh
- Optional. A value of "true" indicates that the window's selection is already in the correct place and does not need to be moved.
Boolean isActive(<Event> event)
event
- Optional. The current event object.
Boolean isAvailable(<Event> event)
event
- Optional. The current event object.
mozile.edit.State prepare(<Event> event)
event
- The event object to be converted into a state.
mozile.edit.State request(<mozile.edit.State> state, <Boolean> fresh, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
state
- The state object of the calling command.
fresh
- Optional. A value of "true" indicates that the window's selection is already in the correct place and does not need to be moved.
a
- * Other optional arguments, which will be sent to the perpare() method.
Boolean respond(<String> change)
change
- The type of change. Can be "state", "text", or "node". Each includes all the previous types. Can also be "none", which means all changes are ignored.
Boolean test(<Event> event)
event
- Optional. The event object which caused this command to be tested.
String toString()
mozile.edit.State trigger(<Event> event)
event
- The event object which may trigger the command.
mozile.edit.State unexecute(<mozile.edit.State> state, <Boolean> fresh)
This method is meant to be overridden by instances and subclasses.
state
- The state object returned by the execute() method. It will contain enough information to unexecute the command.
fresh
- Optional. A value of "true" indicates that the window's selection is already in the correct place and does not need to be moved.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |