Class MozileMediator

Object
   |
   +--MozileComponent
         |
         +--MozileMediator

class MozileMediator
extends MozileComponent

Defined in core.js


Field Summary
 Object changesSaved
          Mozile - Changes Saved - This is true after any of the output methods (documentToXML, etc.) have been called, and false after any other command.
 Object document
          
 Integer keyCounter
          Mozile - Key Counter - Counts the number of keypresses which lead to character insertion.
 Object undoCounter
          Mozile - Undo Counter - An integer which tracks the current position in the undoStack.
 Object undoStack
          Mozile - Undo Stack - An array which contains stored states for the document.
 
Constructor Summary
MozileMediator (<String> configString)
            Mozile Mediator - Coordinates the behaviour of the other objects.
 
Method Summary
 Element _cleanUpDOM(<Element> element)
           Removes all traces of Mozile in the document.
 Void _cleanUpInterfaces()
           Removes any interfaces which may have been injected into the document by the Mozile Extension.
 MozileCommand addAccelerator(<String> accel, <MozileCommand> command)
           Adds an accelerator string and a command to the accelerator list.
 MozileCommand addCommand(<MozileCommand> command)
           Adds a command to the commands list.
 Element addEditor(<Element> editor)
           Adds an element to the editors list.
 MozileModule addModule(<MozileModule> module)
           Adds a module to the modules list.
 MozileResource addResource(<MozileResource> resource)
           Adds a resource to the resources list.
 MozileModule addSaveModule(<MozileModule> module)
           Adds a module to the modules list.
 Void clearRequest()
           Clears the shared data attributes relevat to client requests.
 Void clientRequest(<String> requestCode, evalOnChange)
           If Mozile is enhanced, sends a request to the MozileExtension.
 Object content()
           Mozile - Content - Returns the string of Mozile's content, depending on the current save options.
 Object createEditor(id, options)
           Mozile - Create Editor - Creates a Mozile editor in the document using its id.
 Object createEditors(selector, options)
           Mozile - Create Editors - Creates multiple Mozile editors in the document, using a CSS selector.
 Object debug(details, level, message)
           Mozile Debug - A basic debugging tool.
 String documentToHTML()
           Extract the contents of the document as HTML, first cleaning up any mess that Mozile has made.
 String documentToXML()
           Mozile - Document To XML - Extract the contents of the document as XML, first cleaning up any mess that Mozile has made.
 String editorToHTML()
           Extract the contents of the current editor as HTML, first cleaning up any mess that Mozile has made.
 String editorToXML()
           Extract the contents of the current editor as XML, first cleaning up any mess that Mozile has made.
 Object executeCommand(id, event)
           Mozile - Execute Command - Calls the command() method of the command object corresponding to the given id.
 MozileInterface getAboutInterface()
           Gets Mozile's "About" interface box element.
 MozileCommand getAccelerator(<String> accel)
           Gets a command from the list by its accelerator string.
 Object getAccelerators()
           An array containing all of the keyboard shortcuts (accelerators) for Mozile commands.
 String getBrowserName()
           Gets the name of the browser.
 String getBrowserVersion()
           Gets the version number for the browser.
 MozileCommand getCommand(<String> id)
           Gets a command from the list by its id.
 MozileCommandList getCommandList()
           Does all the work required to add the Mozile toolbar to the current document.
 Object getCommands()
           An associative array containing all of the commands (but not the command lists) registered with this Mozile object.
 Element getCurrentEditor()
           Get the element of the editor which last had the focus.
 Integer getDebugLevel()
           An integer indicating how verbose debugging should be.
 Object getDocument()
           Mozile - Get Document - Returns the Document object for the current Mozile document.
 Array getEditors()
           An array containing entries for every editor in the document.
 String getGeckoVersion()
           Gets the Gecko version for the browser.
 MozileInterface getMessageInterface()
           Gets Mozile's "Message" interface box element.
 String getMode()
           The mode controls which tools are used to manipulate the document.
 MozileModule getModule(<String> name)
           Gets a module from the list by its name.
 Object getModules()
           An associative array containing all the loaded module objects, indexed by their names.
 String getMozillaVersion()
           Gets the version of Mozilla on which the browser is based.
 String getOperatingSystem()
           Mozile checks the UserAgent string for the browser, and tries to determine what operating system the browser is running under.
 MozileResource getResource(<String> id)
           Gets a resource from the list by its id.
 Object getResources()
           An associative array containing all the MozileResource objects for scripts, links, and styles.
 String getRoot()
           The root directory for this Mozile installation.
 MozileInterface getSaveInterface()
           Gets Mozile's "Save As" interface box element.
 MozileModule getSaveModule(<String> name)
           Gets a module from the list by its name.
 Object getSaveModules()
           An associative array containing entries for every save method available, the default method, and the user's custom method.
 Object getSaveOption(<String> mode, <String> key, defaultValue)
           Gets a save option.
 Object getSelection()
           Mozile - Get Selection - Returns the Selection object for the current Mozile document.
 String getSharedData(<String> attribute)
           Get an attribute from the core.js script tag.
 MozileInterface getSourceInterface()
           Gets Mozile's "Source" interface box element.
 Void getStatusbar()
           Gets the statusbar element, creating it fi necessary.
 CSSStyleSheet getStyleSheet()
           Gets the CSSStyleSheet object which is manipulated to add the XBL bindings which control the Mozile toolbar and the Mozile editors.
 Element getToolbar()
           Does all the work required to add the Mozile toolbar to the current document.
 String getVersion()
          
 Boolean hideCaret()
           Disables the editing caret unless the "caretAlwaysOn" preference is set.
 Void hideToolbar()
           Hides the Mozile toolbar.
 Boolean isEditable()
           "true" if editing has been started, "false" otherwise.
 Boolean isEditor(element)
           Returns true if the given element is in the editors array.
 Boolean isEnhanced(<String> name)
           Returns true if the Mozile Extension is enhancing this object, and false otherwise.
 Boolean isExtension()
           Returns true if this object is running in the Mozile Extension, and false otherwise.
 Void load()
           Loads "interface.js" which is the second stage of Mozile loading.
 Void loaded()
           A "post-load" function which calls methods after load is complete.
 Object makeDocumentEditable(options)
           Mozile - Make Document Editable - Makes the entire document editable.
 Object moveToolbar()
           Mozile - Move Toolbar - Centres the Mozile toolbar and statusbar in the window, by calculating the proper size of the CSS "left" property.
 Object restoreSelection(selectionArray)
           Mozile - Restore Selection - Restores the selection using the output from this.storeSelection.
 Object restoreState(index)
           Mozile - Restore State - Replaces the contents of all editors in the document with their states as recoreded at a given index of the undoStack.
 Object save()
           Mozile - Save - This function sets the Mozile.saveConfig property and calls the appropriate save function from Mozile Save List: either "default" or "custom".
 Object saveAs()
           Mozile - Save As - Opens Mozile's Save As dialog.
 Element setCurrentEditor(<Element> element)
           Sets the current editor.
 MozileModule setCustomSaveModule(<MozileModule> module)
           Sets the custom save module.
 MozileModule setDefaultSaveModule(<MozileModule> module)
           Sets the default save module.
 Object setSaveOption(<String> mode, <String> key, value)
           Sets a module from the list by its name.
 String setSharedData(<String> attribute, <String> value)
           Set an attribute from the core.js script tag.
 Boolean showCaret()
           Activates the editing caret.
 Object showToolbar()
           Mozile - Show Toolbar - Shows (unhides) the Mozile toolbar.
 Void startEditing()
           Enables editing in the document.
 Object status(details, level, message)
           Mozile - Status - Sets the content of the Mozile statusbar and enters a special kind of debugging message.
 Void stopEditing()
           Disables editing in the document.
 Object storeSelection()
           Mozile - Store Selection - Store the selection in a recoverable form.
 Object storeState(command)
           Mozile - Store State - This is the stub of a command used in the UndoRedo module.
 void testAlert()
          
 Object testFunction()
           Mozile - Test Function - This function is only used for testing.
 Object updateToolbar()
           Mozile - Update Toolbar - Updates all of the commands in the commandList so that they will reflect the current selection.
 Void useDefaultSaveOptions()
           Sets the default save module.
 Void watchSharedData()
           Checks for changes to the attributes.
 
Methods inherited from class MozileComponent
getName, getConfigString, getOptions, getOption, setOption, _cleanOption
 

Field Detail

changesSaved

Object changesSaved

document

Object document

keyCounter

Integer keyCounter

undoCounter

Object undoCounter

undoStack

Object undoStack

Constructor Detail

MozileMediator

MozileMediator(<String> configString)

Method Detail

_cleanUpDOM

Element _cleanUpDOM(<Element> element)

_cleanUpInterfaces

Void _cleanUpInterfaces()

addAccelerator

MozileCommand addAccelerator(<String> accel, <MozileCommand> command)

addCommand

MozileCommand addCommand(<MozileCommand> command)

addEditor

Element addEditor(<Element> editor)

addModule

MozileModule addModule(<MozileModule> module)

addResource

MozileResource addResource(<MozileResource> resource)

addSaveModule

MozileModule addSaveModule(<MozileModule> module)

clearRequest

Void clearRequest()

clientRequest

Void clientRequest(<String> requestCode, evalOnChange)

content

Object content()

createEditor

Object createEditor(id, options)

createEditors

Object createEditors(selector, options)

debug

Object debug(details, level, message)

documentToHTML

String documentToHTML()

documentToXML

String documentToXML()

editorToHTML

String editorToHTML()

editorToXML

String editorToXML()

executeCommand

Object executeCommand(id, event)

getAboutInterface

MozileInterface getAboutInterface()

getAccelerator

MozileCommand getAccelerator(<String> accel)

getAccelerators

Object getAccelerators()

getBrowserName

String getBrowserName()

getBrowserVersion

String getBrowserVersion()

getCommand

MozileCommand getCommand(<String> id)

getCommandList

MozileCommandList getCommandList()

getCommands

Object getCommands()

getCurrentEditor

Element getCurrentEditor()

getDebugLevel

Integer getDebugLevel()

getDocument

Object getDocument()

getEditors

Array getEditors()

getGeckoVersion

String getGeckoVersion()

getMessageInterface

MozileInterface getMessageInterface()

getMode

String getMode()

getModule

MozileModule getModule(<String> name)

getModules

Object getModules()

getMozillaVersion

String getMozillaVersion()

getOperatingSystem

String getOperatingSystem()

getResource

MozileResource getResource(<String> id)

getResources

Object getResources()

getRoot

String getRoot()

getSaveInterface

MozileInterface getSaveInterface()

getSaveModule

MozileModule getSaveModule(<String> name)

getSaveModules

Object getSaveModules()

getSaveOption

Object getSaveOption(<String> mode, <String> key, defaultValue)

getSelection

Object getSelection()

getSharedData

String getSharedData(<String> attribute)

getSourceInterface

MozileInterface getSourceInterface()

getStatusbar

Void getStatusbar()

getStyleSheet

CSSStyleSheet getStyleSheet()

getToolbar

Element getToolbar()

getVersion

String getVersion()

hideCaret

Boolean hideCaret()

hideToolbar

Void hideToolbar()

isEditable

Boolean isEditable()

isEditor

Boolean isEditor(element)

isEnhanced

Boolean isEnhanced(<String> name)

isExtension

Boolean isExtension()

load

Void load()

loaded

Void loaded()

makeDocumentEditable

Object makeDocumentEditable(options)

moveToolbar

Object moveToolbar()

restoreSelection

Object restoreSelection(selectionArray)

restoreState

Object restoreState(index)

save

Object save()

saveAs

Object saveAs()

setCurrentEditor

Element setCurrentEditor(<Element> element)

setCustomSaveModule

MozileModule setCustomSaveModule(<MozileModule> module)

setDefaultSaveModule

MozileModule setDefaultSaveModule(<MozileModule> module)

setSaveOption

Object setSaveOption(<String> mode, <String> key, value)

setSharedData

String setSharedData(<String> attribute, <String> value)

showCaret

Boolean showCaret()

showToolbar

Object showToolbar()

startEditing

Void startEditing()

status

Object status(details, level, message)

stopEditing

Void stopEditing()

storeSelection

Object storeSelection()

storeState

Object storeState(command)

testAlert

void testAlert()

testFunction

Object testFunction()

updateToolbar

Object updateToolbar()

useDefaultSaveOptions

Void useDefaultSaveOptions()

watchSharedData

Void watchSharedData()


Documentation generated by JSDoc on Thu Feb 16 20:20:37 2006