OracleJavaScript API Reference for Oracle ADF Faces

 

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

oracle.adfinternal.view.js.agent
Class AdfEditingAgent

Warning:

org.ecmascript.object.Object
   |
   +--oracle.adf.view.js.base.AdfObject
         |
         +--oracle.adfinternal.view.js.agent.AdfEditingAgent
Direct Known Subclasses:
AdfGeckoEditingAgent, AdfIEEditingAgent, AdfSafariEditingAgent

public class AdfEditingAgent
extends AdfObject
AdfEditingAgent capabilities.



Field Summary


Fields inherited from oracle.adf.view.js.base.AdfObject

constructor, superclass


Fields inherited from org.ecmascript.object.Object

prototype


Constructor Summary

public
AdfEditingAgent()
AdfEditingAgent capabilities.


Method Summary

protected Object
CreateLink(AdfRichTextEditor component, HTMLElement doc, String value)
Default implementation for executing a createlink command.
public Object
execCommand(AdfRichTextEditor component, HTMLFrameElement inlineFrame, String command, Object value)
Executes a command on the document, selection, or the given range.
private Object
_executeCommand(AdfRichTextEditor component, HTMLElement doc, String command, String value)
Default implementation for executing an editing command.
protected Object
ExecuteRedo(AdfRichTextEditor component, HTMLFrameElement inlineFrame, HTMLElement doc)
Default implementation for executing an redo command.
protected Object
ExecuteUndo(AdfRichTextEditor component, HTMLFrameElement inlineFrame, HTMLElement doc)
Default implementation for executing an undo command.
public Object
getColor(Object value)
public HTMLFrameElement
getContentWindow(HTMLElement inlineFrame)
Retrieves the contentWindow of the inline frame.
public Object
getDefaultContent()
public Object
getFocusBlurElement(HTMLFrameElement inlineFrame)
Gets the element that receives focus- and blur-events.
public String
getInlineFrameContent(HTMLFrameElement inlineFrame, Object keepOriginal)
Gets the content of the inlineFrame.
public HTMLDocument
getInlineFrameDocument(HTMLFrameElement inlineFrame)
Retrieves the document of the inline frame.
public static AdfEditingAgent
getInstance()
Gets the current instance of the agent.
private String
_getLinkURLForSelection(AdfRichTextEditor component, HTMLFrameElement inlineFrame)
Default implementation for obtaining the URL of the link wrapping the current selection.
public Object
getSelectionRange(HTMLFrameElement inlineFrame)
Gets the current selection-object.
public Object
handleTab(Object inlineFrame, Object keyDownEvt)
public Object
insertHtmlAtSelection(HTMLFrameElement inlineFrame, String htmlFragment)
Inserts an HTML fragment in place of the current selection or at the current cursor position.
public Object
isDesignMode(HTMLFrameElement inlineFrame)
Checks if the inlineFrame is in designMode.
public Object
isDesignModeReloadingFrame()
Returns true if setting design mode to "on" will reload the IFRAME, false otherwise
protected Boolean
IsNodeWrappingRange(Range range, Node node)
Default implementation for checking if the supplied node is wrapping a range
public Boolean
queryCommandEnabled(AdfRichTextEditor component, HTMLFrameElement inlineFrame, String command)
Checks if a command is enabled for the current context.
private Boolean
_queryCommandEnabled(AdfRichTextEditor component, HTMLFrameElement inlineFrame, String command)
Default implementation for checking if a command is enabled for the current context.
public Boolean
queryCommandIndeterminate(HTMLFrameElement inlineFrame, String commandIdentifier)
Queries whether the value for command is indeterminate.
public Object
queryCommandState(HTMLFrameElement inlineFrame, String commandIdentifier)
Queries the state of the current command.
public Object
queryCommandValue(HTMLFrameElement inlineFrame, String commandIdentifier)
Queries the value for the command.
protected Boolean
QueryRedoEnabled(AdfRichTextEditor component, HTMLFrameElement inlineFrame)
Default implementation for checking if the redo command is enabled for the current context.
protected Boolean
QueryUndoEnabled(AdfRichTextEditor component, HTMLFrameElement inlineFrame)
Default implementation for checking if the undo command is enabled for the current context.
public Object
setInlineFrameContent(HTMLFrameElement inlineFrame, String newContent)
Sets the content of the inlineFrame.
public Boolean
setInlineFrameContentEditable(HTMLFrameElement inlineFrame)
Makes an inline frame contentEditable.
public Object
setRTL(HTMLDocument doc)
Sets the RTL-value for this document.
public Object
setSelectionRange(HTMLFrameElement inlineFrame, DOMSelection range)
Sets the range of the selection
public String
toBrowserSpecificCommand(String command)
When given a command for use with document.execCommand, this will change the command to be a browser-specific command.
public Object
updateValueHistory(AdfRichTextEditor component, HTMLFrameElement inlineFrame, String newValue)
Updates the undo/redo information for this editor.


Methods inherited from oracle.adf.view.js.base.AdfObject

adopt, clone, createCallback, createInitializedObject, createSubclass, ensureClassInitialization, equals, getClass, GetLazyArrayProperty, GetLazyMapProperty, getTypeName, Init, toDebugString, toString


Field Detail


Constructor Detail


AdfEditingAgent

public AdfEditingAgent()

AdfEditingAgent capabilities.

Method Detail


CreateLink

protected Object CreateLink(AdfRichTextEditor component,
                            HTMLElement doc,
                            String value)

Default implementation for executing a createlink command.

Parameters:
component  -  Component the rich text editor component
doc  -  The editable document
value  -  The value given by the user
Return:
Object

execCommand

public Object execCommand(AdfRichTextEditor component,
                          HTMLFrameElement inlineFrame,
                          String command,
                          Object value)

Executes a command on the document, selection, or the given range.

Parameters:
component  -  Component the rich text editor component
inlineFrame  -  The inline frame
command  -  The command to execute
value  -  The value of the command
Return:
Object - the object

_executeCommand

private Object _executeCommand(AdfRichTextEditor component,
                               HTMLElement doc,
                               String command,
                               String value)

Default implementation for executing an editing command.

Parameters:
component  -  component the rich text editor component
doc  -  The editable document
command  -  The command to execute
value  -  The parameter paired with the command
Return:
Object

ExecuteRedo

protected Object ExecuteRedo(AdfRichTextEditor component,
                             HTMLFrameElement inlineFrame,
                             HTMLElement doc)

Default implementation for executing an redo command.

Parameters:
component  -  Component the rich text editor component
inlineFrame  -  The inline frame
doc  -  The editable document
Return:
Object

ExecuteUndo

protected Object ExecuteUndo(AdfRichTextEditor component,
                             HTMLFrameElement inlineFrame,
                             HTMLElement doc)

Default implementation for executing an undo command.

Parameters:
component  -  Component the rich text editor component
inlineFrame  -  The inline frame
doc  -  The editable document
Return:
Object

getColor

public Object getColor(Object value)

Parameters:
value    
Return:
Object

getContentWindow

public HTMLFrameElement getContentWindow(HTMLElement inlineFrame)

Retrieves the contentWindow of the inline frame.

Parameters:
inlineFrame  -  The inline frame
Return:
HTMLFrameElement - The window-object of the inline frame.

getDefaultContent

public Object getDefaultContent()

Return:
Object

getFocusBlurElement

public Object getFocusBlurElement(HTMLFrameElement inlineFrame)

Gets the element that receives focus- and blur-events.

Parameters:
inlineFrame  -  The inline-frame
Return:
Object

getInlineFrameContent

public String getInlineFrameContent(HTMLFrameElement inlineFrame,
                                    Object keepOriginal)

Gets the content of the inlineFrame.

Parameters:
inlineFrame  -  The inline frame
keepOriginal  -  indicates whether content should be returned as is without removing unnecessary content
Return:
String - The content of the inline frame.

getInlineFrameDocument

public HTMLDocument getInlineFrameDocument(HTMLFrameElement inlineFrame)

Retrieves the document of the inline frame.

Parameters:
inlineFrame  -  The inline frame
Return:
HTMLDocument - The document of the inline frame.

getInstance

public static AdfEditingAgent getInstance()

Gets the current instance of the agent.

Return:
AdfEditingAgent - the instance.

_getLinkURLForSelection

private String _getLinkURLForSelection(AdfRichTextEditor component,
                                       HTMLFrameElement inlineFrame)

Default implementation for obtaining the URL of the link wrapping the current selection.

Parameters:
component  -  The rich text editor component
inlineFrame  -  The inline frame
Return:
String - The URL of the link that contains the selection

getSelectionRange

public Object getSelectionRange(HTMLFrameElement inlineFrame)

Gets the current selection-object.

Parameters:
inlineFrame  -  The inline frame
Return:
Object

handleTab

public Object handleTab(Object inlineFrame,
                        Object keyDownEvt)

Parameters:
inlineFrame    
keyDownEvt    
Return:
Object

insertHtmlAtSelection

public Object insertHtmlAtSelection(HTMLFrameElement inlineFrame,
                                    String htmlFragment)

Inserts an HTML fragment in place of the current selection or at the current cursor position.

Parameters:
inlineFrame  -  the inline frame
htmlFragment  -  the HTML fragment to insert
Return:
Object

isDesignMode

public Object isDesignMode(HTMLFrameElement inlineFrame)

Checks if the inlineFrame is in designMode.

Parameters:
inlineFrame  -  The inline frame
Return:
Object

isDesignModeReloadingFrame

public Object isDesignModeReloadingFrame()

Returns true if setting design mode to "on" will reload the IFRAME, false otherwise

Return:
Object

IsNodeWrappingRange

protected Boolean IsNodeWrappingRange(Range range,
                                      Node node)

Default implementation for checking if the supplied node is wrapping a range

Parameters:
range  -  The range object, usually corresponding to a seleciton
node  -  The node object that potentially wrapps the range
Return:
Boolean - Whether the supplied node wraps the supplied range

queryCommandEnabled

public Boolean queryCommandEnabled(AdfRichTextEditor component,
                                   HTMLFrameElement inlineFrame,
                                   String command)

Checks if a command is enabled for the current context.

Parameters:
component  -  Component the rich text editor component
inlineFrame  -  The inline frame
command  -  The command to check
Return:
Boolean - Whether the command is enabled

_queryCommandEnabled

private Boolean _queryCommandEnabled(AdfRichTextEditor component,
                                     HTMLFrameElement inlineFrame,
                                     String command)

Default implementation for checking if a command is enabled for the current context.

Parameters:
component  -  The rich text editor component
inlineFrame  -  The inline frame
command  -  The command to check
Return:
Boolean - Whether the command is enabled

queryCommandIndeterminate

public Boolean queryCommandIndeterminate(HTMLFrameElement inlineFrame,
                                         String commandIdentifier)

Queries whether the value for command is indeterminate.

Parameters:
inlineFrame  -  The inline frame
commandIdentifier  -  The command
Return:
Boolean - Whether the command is indeterminate.

queryCommandState

public Object queryCommandState(HTMLFrameElement inlineFrame,
                                String commandIdentifier)

Queries the state of the current command.

Parameters:
inlineFrame  -  The inline frame
commandIdentifier  -  The command
Return:
Object - the value for the command

queryCommandValue

public Object queryCommandValue(HTMLFrameElement inlineFrame,
                                String commandIdentifier)

Queries the value for the command.

Parameters:
inlineFrame  -  The inline frame
commandIdentifier  -  The command
Return:
Object - The value for the command

QueryRedoEnabled

protected Boolean QueryRedoEnabled(AdfRichTextEditor component,
                                   HTMLFrameElement inlineFrame)

Default implementation for checking if the redo command is enabled for the current context.

Parameters:
component  -  The rich text editor component
inlineFrame  -  The inline frame
Return:
Boolean - Whether the command is enabled

QueryUndoEnabled

protected Boolean QueryUndoEnabled(AdfRichTextEditor component,
                                   HTMLFrameElement inlineFrame)

Default implementation for checking if the undo command is enabled for the current context.

Parameters:
component  -  The rich text editor component
inlineFrame  -  The inline frame
Return:
Boolean - Whether the command is enabled

setInlineFrameContent

public Object setInlineFrameContent(HTMLFrameElement inlineFrame,
                                    String newContent)

Sets the content of the inlineFrame.

Parameters:
inlineFrame  -  The inline frame
newContent  -  The new content of the inline frame
Return:
Object

setInlineFrameContentEditable

public Boolean setInlineFrameContentEditable(HTMLFrameElement inlineFrame)

Makes an inline frame contentEditable.

Parameters:
inlineFrame  -  The inline frame
Return:
Boolean - Whether the action succeeded

setRTL

public Object setRTL(HTMLDocument doc)

Sets the RTL-value for this document.

Parameters:
doc  -  The document
Return:
Object

setSelectionRange

public Object setSelectionRange(HTMLFrameElement inlineFrame,
                                DOMSelection range)

Sets the range of the selection

Parameters:
inlineFrame  -  The inlineFrame
range  -  The range
Return:
Object

toBrowserSpecificCommand

public String toBrowserSpecificCommand(String command)

When given a command for use with document.execCommand, this will change the command to be a browser-specific command.

Parameters:
command  -  The command
Return:
String - The new command

updateValueHistory

public Object updateValueHistory(AdfRichTextEditor component,
                                 HTMLFrameElement inlineFrame,
                                 String newValue)

Updates the undo/redo information for this editor.

Parameters:
component  -  Component the rich text editor component
inlineFrame  -  The inline frame
newValue  -  The new value
Return:
Object

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

 

Generated on 2012.08.25 02:16 UTC
Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.