|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel com.ephox.editlive.ELJBean
public class ELJBean
A JavaBean interface to EditLive!. This class provides methods to setup, initialize and work with EditLive! from within a Java application.
It is strongly recommended that you create an instance of ELJBean using the ELJBean(boolean)
constructor, setting the parameter to false. Then use the set methods to configure the instance as required
and finally call init() to initialize the bean so it is ready to be added to the GUI layout.
By deferring the initialization of the ELJBean until after all the configuration is complete, the start up time will be significantly reduced as the ELJBean will not need to reinitialize to accommodate changes.
Some features such as custom views will not work correctly unless they are configured prior to the ELJBean being initialized.
Since the ELJBean extends from and operates on Swing classes, all method calls should be performed on the
Swing thread once the bean has been initialized. The call to init()
should also be made on the Swing thread.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
ELJBean()
Creates a standard EditLive! |
|
ELJBean(boolean init)
Creates a standard EditLive! |
|
ELJBean(String sHTML,
String sStyles,
int iWidth,
int iHeight,
Document dXML,
boolean init)
Creates a standard EditLive! |
|
ELJBean(String sHTML,
String sStyles,
int iWidth,
int iHeight,
File fXML)
Creates a standard EditLive! |
|
ELJBean(String sHTML,
String sStyles,
int iWidth,
int iHeight,
File fXML,
boolean init)
Creates a standard EditLive! |
|
ELJBean(String sHTML,
String sStyles,
int iWidth,
int iHeight,
String sXML)
Creates a standard EditLive! |
|
ELJBean(String sHTML,
String sStyles,
int iWidth,
int iHeight,
String sXML,
boolean init)
Creates a standard EditLive! |
|
ELJBean(String sHTML,
String sStyles,
int iWidth,
int iHeight,
URL xmlURL)
Creates a EditLive! |
|
ELJBean(String sHTML,
String sStyles,
int iWidth,
int iHeight,
URL xmlURL,
boolean init)
Creates a standard EditLive! |
Method Summary | |
---|---|
void |
addCrashListener(CrashListener crashListener)
Adds a listener which is invoked when the editor crashes. |
void |
addEditorEventListener(EventListener oListener)
Deprecated. use EventBroadcaster.registerBeanEditorListener(EventListener) |
void |
addHyperlinkDialogComponent(Class<? extends HyperlinkDialogComponent> clazz,
Object[] params)
Adds a HyperlinkDialogComponent to the bean for use in the insert hyperlink dialog. |
void |
addHyperlinkDialogComponent(String className,
Object[] params)
Deprecated. Use addHyperlinkDialogComponent(Class, Object[]) |
void |
addImageDialogComponent(Class<? extends ImageDialogComponent> clazz,
Object[] params)
Adds an ImageDialogComponent to the bean for use in the insert image dialog. |
void |
addImageDialogComponent(String className,
Object[] params)
Deprecated. Use addImageDialogComponent(Class, Object[]) |
void |
addImagePreProcessor(PreProcessor processor)
Registers a PreProcessor instance on the editor |
void |
addInfobar(JPanel panel)
Adds an infobar to the editor, below any existing toolbars. |
void |
addPasteFilter(PasteFilter filter)
Add a pasteFilter to the list of paste filters that will be used when pasting content. |
void |
cleanup()
Releases memory used by the editor and shuts down background threads to aid in garbage collection. |
void |
clearUndos()
Clears the current list of undos and redos for the bean. |
static void |
enableDebugLogging()
Turns on debug logging to assist with identifying problems. |
EphoxAction |
getAction(Map<String,String> map)
Deprecated. Use ActionController.getAction(Map) |
EphoxAction |
getAction(String name)
Deprecated. Use ActionController.getAction(String) |
ActionController |
getActionController()
Returns the Action Controller for this editor. |
URL |
getAppletDownloadDirectory()
Returns the location of the applet "DownloadDirectory" setting if EditLive! |
Parameters |
getAppletParameters()
Returns the current applet parameters if EditLive! |
String |
getBaseURL()
Returns the Base URL used for loading resources (e.g. images, stylesheets) referenced with a relative URL. |
String |
getBody()
Returns the body of HTML document currently in the Editor. |
String |
getBody(boolean uploadImages)
Returns the body of HTML document currently in the Editor. |
CacheManager |
getCacheManager()
Returns the cache manager. |
int |
getCharacterCount()
Retrieves the number of characters within the document. |
ConfigItem |
getConfig()
Gets the root node of the EditLive! |
Document |
getConfigurationDOM()
Returns the DOM being used for the configuration of this bean. |
File |
getConfigurationFile()
Returns the Configuration File. |
String |
getConfigurationText()
Returns the String version of the Configuration Text. |
String |
getConfigurationURL()
Returns the String version of the Configuration URL. |
String |
getCookie()
Returns the cookie that will be sent with HTTP requests. |
File |
getCurrentFile()
Returns the file currently being edited. |
String |
getCurrentURL()
Retrieves the last saved or opened URL. |
String |
getCustomTagContent(String id)
Returns the value associated with a specified custom tag. |
CustomTagController |
getCustomTagController()
Returns the CustomTagController for this editor. |
String |
getDocument()
Returns the content of the HTML document. |
String |
getDocument(boolean uploadImages)
Returns the content of the HTML document. |
DocumentManager |
getDocumentManager()
Returns a DocumentManager instance for the current document. |
DocumentModifier |
getDocumentModifier()
Retrieves the document modifier. |
EditorActions |
getEditorActions()
Returns an EditorActions instance for this editor. |
EditorMode |
getEditorMode()
Returns the mode (design view or code view) the editor is in. |
EphoxEditorPane |
getEditorPane()
Method used return the Design View Editor Pane. |
Registry |
getEphoxRegistry()
Returns an instance of the registry. |
EventBroadcaster |
getEventBroadcaster()
Returns an EventBroadcaster instance for this editor. |
SourceFilter |
getFilter()
Get the filter that will be applied to content on the way in and out of the editor. |
static Locale |
getGlobalLocale()
|
JTextPane |
getHTMLPane()
Deprecated. use getEditorPane() instead |
HttpManagerFactory |
getHttpFactory()
Returns a HttpManagerFactory instance for this editor. |
HTTPUrlCallback |
getHttpUrlCallback()
Gets the HTTPUrlCallback object to call into before making an http request to allow for user controlled redirects. |
String |
getHyperlinkAtCursor()
Returns the currently selected hyperlink object or the selected text if there is not a hyperlink at the cursor. |
ImageManager |
getImageManager()
Returns an ImageManager instance for this editor. |
String |
getLoadTimeErrorMessage()
Checks for a load-time error message that may have displayed to the user. |
Locale |
getLocale()
Deprecated. use getGlobalLocale() instead |
JMenuBar |
getMenuBar()
Returns the menubar for this bean, or null if no menubar is set. |
OperationManager |
getOperationManager()
Gets the track changes operation manager. |
String |
getOutputCharacterSet()
Retrieves the character set that content should be output in. |
PasteFilter |
getPasteFilter()
Deprecated. please use getPasteFilters() instead. |
PasteFilter[] |
getPasteFilters()
Get the list of paste filters. |
boolean |
getReadOnly()
Get the read-only state of the bean |
JScrollPane |
getScrollPane()
Returns the visible area of the editor |
String |
getSelectedText()
Returns the currently selected text, including the html tags surrounding the text. |
SelectionManager |
getSelectionManager()
Returns a SelectionManager instance for this editor. |
StyleManager |
getStyleManager()
Returns a StyleManager instance for this editor. |
String |
getStyles()
Gets additional CSS styles being used by EditLive!. |
TableManager |
getTableManager()
Returns a TableManager instance for the current document. |
JTextComponent |
getTextPane()
Get the JTextComponent used for the code view. |
JComponent |
getToolBar()
Returns the toolbar for this bean. |
ToolbarFactory |
getToolbarFactory()
Returns a ToolbarFactory instance for this editor. |
static String |
getVersion()
Returns the version number of EditLive!. |
VersionManager |
getVersionManager()
Returns the VersionManager. |
ViewManager |
getViewManager()
Returns a ViewManager instance for this editor. |
String |
getWordAtCursor()
Returns the current word that the cursor is in. |
int |
getWordCount()
Retrieves the number of words within the document. |
void |
init()
Initializes the bean. |
void |
insertHTMLAtCursor(String html)
Inserts the specified html at the current caret position. |
boolean |
isCrippled()
Determines whether or not functionality has been restricted. |
boolean |
isDirty()
Returns true if the content in the editor has been changed. |
boolean |
isEditorRunningAsApplet()
Determines if the editor is running through the EditLive! |
boolean |
isInitFinished()
Checks if the bean init state has been updated after the LOADING_COMPLETE event has fired |
boolean |
isLicensedForEnterpriseEdition(boolean startTrial)
Checks if the editor is enabled for Enterprise Edition features, with the option to begin the Enterprise Edition trial. |
boolean |
isMenuEmbedded()
Determines whether or not the menubar is currently embedded in the bean. |
boolean |
isToolBarEmbedded()
Determines whether or not the toolbar is currently embedded in the bean. |
void |
raiseEvent(TextEvent e)
Deprecated. use EventBroadcaster.broadcastEvent(TextEvent) |
void |
registerCustomBlockTag(String tagName,
Icon startIcon,
String startLabel,
Icon endIcon,
String endLabel,
ViewClickListener listener)
Deprecated. Use CustomTagController.registerCustomBlockTag(String, Icon, String, Icon, String, ViewClickListener) |
void |
registerCustomBlockView(String tagName,
Class<?> viewClass,
Object extraData)
Deprecated. Use CustomTagController.registerCustomBlockView(String, Class, Object) |
void |
registerCustomBlockView(String tagName,
String viewClass,
Object extraData)
Deprecated. Use registerCustomBlockView(String, Class, Object) |
void |
registerCustomCollapsedView(String tagName,
Class<?> viewName,
Object extraData)
Deprecated. Use CustomTagController.registerCustomCollapsedView(String, Class, Object) |
void |
registerCustomCollapsedView(String tagName,
String viewName,
Object extraData)
Deprecated. Use registerCustomCollapsedView(String, Class, Object) |
void |
registerCustomEmptyTag(String tagName,
Icon icon,
String label,
ViewClickListener listener)
Deprecated. Use CustomTagController.registerCustomEmptyTag(String, Icon, String, ViewClickListener) |
void |
registerCustomEmptyView(String tagName,
Class<?> viewClass,
Object extraData)
Deprecated. Use CustomTagController.registerCustomEmptyView(String, Class, Object) |
void |
registerCustomEmptyView(String tagName,
String viewClass,
Object extraData)
Deprecated. Use registerCustomEmptyView(String, Class, Object) |
void |
registerCustomInlineTag(String tagName,
Icon startIcon,
String startLabel,
Icon endIcon,
String endLabel,
ViewClickListener listener)
Deprecated. Use CustomTagController.registerCustomInlineTag(String, Icon, String, Icon, String, ViewClickListener) |
void |
registerCustomInlineView(String tagName,
Class<?> viewClass,
Object extraData)
Deprecated. Use CustomTagController.registerCustomInlineView(String, Class, Object) |
void |
registerCustomInlineView(String tagName,
String viewClass,
Object extraData)
Deprecated. Use registerCustomInlineView(String, Class, Object) |
void |
removeEditorEventListener(EventListener oListener)
Deprecated. use EventBroadcaster.removeBeanEditorListener(EventListener) |
void |
removeInfobar(JPanel panel)
Remove an infobar that was added using addInfobar. |
void |
setBaseURL(String url)
Sets the Base URL used for loading resources (e.g. images, stylesheets) when referenced with a relative URL. |
void |
setBody(String sBody)
Sets the body of HTML document currently in the Editor. |
void |
setBrowserCallback(Object object)
Deprecated. Please listen for the TextEvent.CALL_JAVASCRIPT event instead, and call out to javascript
using the JSObject TextEvent.CALL_JAVASCRIPT events use an instance of JSFunctionCall
as their extraObject |
void |
setConfigurationDOM(Document doc)
Sets the DOM to use as the configuration for this bean. |
void |
setConfigurationFile(File confFile)
Sets the Configuration File. |
void |
setConfigurationText(String confT)
Sets the Configuration Text. |
void |
setConfigurationURL(String url)
Deprecated. use setConfigurationURL(URL) instead. As of 8.0, if the url string is malformed this will now throw RuntimeException immediately. |
void |
setConfigurationURL(URL url)
Sets the Configuration URL. |
void |
setCookie(String cookie)
Sets the cookie to send with HTTP requests. |
void |
setCookie(String cookie,
URL url)
Sets the cookie to send with HTTP requests. |
void |
setCurrentFile(File file)
Sets the path to the currently edited file. |
void |
setCustomResourceBundle(ResourceBundle b)
Sets a custom resource bundle to be used for the user interface. |
void |
setCustomTagContent(String id,
String value)
Specifies a custom tag value and it's matching key identifier. |
void |
setDirty(boolean dirty)
Sets whether or not the content in the editor has been changed. |
void |
setDocument(String doc)
Sets the contents of the HTML document. |
void |
setFileUploader(FileUploader fileUploader)
Set the FileUploader to use when uploading local resources. |
void |
setFilter(SourceFilter filter)
Set the filter to apply to content on the way in and out of the editor. |
static void |
setGlobalLocale(String locale)
Sets the global EditLive! |
void |
setHeight(int height)
Sets the height in pixels. |
void |
setHttpLayerManager(String layerId)
Deprecated. use HttpLayerManager.setManager(HttpLayer) instead |
void |
setHTTPUrlCallback(HTTPUrlCallback req)
Sets a HTTPUrlCallback object to call into before making an http request to allow for user controlled redirects. |
void |
setImageUploadHTTPRequestCallback(HTTPRequestCallback req)
Sets a HTTPRequestCallback object to call into before each image is uploaded. |
void |
setLocale(Locale locale)
Deprecated. use setGlobalLocale(String) instead |
void |
setMenuEmbedded(boolean embed)
Sets whether or not the menubar is embedded in the bean. |
void |
setMinCrashTimeout(int timeout)
Sets the wait timeout on long operations before displaying the crash screen. |
void |
setOutputCharacterSet(String charset)
Sets the character set that content should be output in. |
void |
setPasteFilter(PasteFilter filter)
Deprecated. please use addPasteFilter(PasteFilter) instead. |
void |
setReadOnly(boolean readOnly)
Set the read-only state of the bean. |
static void |
setSettingsDirectory(File settingsDirectory)
Sets the directory that EditLive! |
void |
setSpellerLoader(SpellerLoader loader)
Replaces the editor's spelling engine. |
void |
setStyles(String sStyles)
Sets additional CSS styles to be used by EditLive!. |
void |
setToolBarEmbedded(boolean embed)
Sets whether or not the toolbar is embedded in the bean. |
void |
setUnregisteredCustomTagView(Class<?> viewClass,
Object extraData)
Deprecated. Use CustomTagController.setUnregisteredCustomTagView(Class, Object) |
void |
setUsername(String name)
Set the username for track changes |
void |
setWidth(int width)
Sets the width in pixels. |
void |
uploadLocalImages()
Uploads all local images stored within the document and also adjusts their src attribute. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ELJBean()
By default a standard configuration file is loaded, and the width is set to 800 and the height to 600.
public ELJBean(boolean init)
init
- whether or not to initialize the bean immediately. If set to true, a standard configuration file
is loaded and the width is set to 800 and the height to 600. A very basic HTML document is also built
and
then the editor is initialized. If set to false, the bean is not initialized and the init()
method
must be called manually to initialize the bean.public ELJBean(String sHTML, String sStyles, int iWidth, int iHeight, URL xmlURL)
By default a standard configuration file is loaded, and the width is set to 800 and the height to 600.
sHTML
- HTML document to be loaded into EditLive!. This can
be the entire document of just the body text.sStyles
- Additional CSS style information to be loaded into
EditLive!.iWidth
- Width in pixels.iHeight
- Height in pixels.xmlURL
- URL to load the XML configuration file from.public ELJBean(String sHTML, String sStyles, int iWidth, int iHeight, URL xmlURL, boolean init)
By default a standard configuration file is loaded, and the width is set to 800 and the height to 600. A very basic HTML document is also built
sHTML
- HTML document to be loaded into EditLive!. This can
be the entire document of just the body text.sStyles
- Additional CSS style information to be loaded into
EditLive!.iWidth
- Width in pixels.iHeight
- Height in pixels.xmlURL
- URL to load the XML configuration file from.init
- true if the bean should be initialized immediately, false if
initialization should be delayed.public ELJBean(String sHTML, String sStyles, int iWidth, int iHeight, String sXML)
By default a standard configuration file is loaded, and the width is set to 800 and the height to 600. A very basic HTML document is also built
sHTML
- HTML document to be loaded into EditLive!. This can
be the entire document of just the body text.sStyles
- Additional CSS style information to be loaded into
EditLive!.iWidth
- Width in pixels.iHeight
- Height in pixels.sXML
- String representing the XML configuration to be loaded in the
EditLive!public ELJBean(String sHTML, String sStyles, int iWidth, int iHeight, String sXML, boolean init)
By default a standard configuration file is loaded, and the width is set to 800 and the height to 600. A very basic HTML document is also built
sHTML
- HTML document to be loaded into EditLive!. This can
be the entire document of just the body text.sStyles
- Additional CSS style information to be loaded into
EditLive!.iWidth
- Width in pixels.iHeight
- Height in pixels.sXML
- String representing the XML configuration to be loaded in the
EditLive!init
- true if the bean should be initialized immediately, false if
initialization should be delayed.public ELJBean(String sHTML, String sStyles, int iWidth, int iHeight, File fXML)
By default a standard configuration file is loaded, and the width is set to 800 and the height to 600. A very basic HTML document is also built
sHTML
- HTML document to be loaded into EditLive!. This can
be the entire document of just the body text.sStyles
- Additional CSS style information to be loaded into
EditLive!.iWidth
- Width in pixels.iHeight
- Height in pixels.fXML
- XML configuration file to be loaded into EditLive!.public ELJBean(String sHTML, String sStyles, int iWidth, int iHeight, File fXML, boolean init)
By default a standard configuration file is loaded, and the width is set to 800 and the height to 600. A very basic HTML document is also built
sHTML
- HTML document to be loaded into EditLive!. This can
be the entire document of just the body text.sStyles
- Additional CSS style information to be loaded into
EditLive!.iWidth
- Width in pixels.iHeight
- Height in pixels.fXML
- XML configuration file to be loaded into EditLive!.init
- true if the bean should be initialized immediately, false if
initialization should be delayed.public ELJBean(String sHTML, String sStyles, int iWidth, int iHeight, Document dXML, boolean init)
By default a standard configuration file is loaded, and the width is set to 800 and the height to 600. A very basic HTML document is also built.
sHTML
- HTML document to be loaded into EditLive!. This can
be the entire document of just the body text.sStyles
- Additional CSS style information to be loaded into
EditLive!.iWidth
- Width in pixels.iHeight
- Height in pixels.dXML
- a Document
to use as the XML configuration.init
- true if the bean should be initialized immediately, false if
initialization should be delayed.Method Detail |
---|
public static String getVersion()
public static Locale getGlobalLocale()
public static void setGlobalLocale(String locale)
locale
- One of the
Supported EditLive! interface languagespublic static void setSettingsDirectory(File settingsDirectory)
Note that this only applies to all platforms. Developers should ensure that the file location specified is appropriate for the current platform.
settingsDirectory
- the file to write user preferences and licensing information to. Must be readable and
writable by the current user.public static void enableDebugLogging()
When logging a support case with Ephox, please enable logging, reproduce the issue and include the output with your support case.
public boolean isMenuEmbedded()
public void setMenuEmbedded(boolean embed)
If set to false, the menubar will not be displayed in the bean and the application must ensure that it adds the menubar to the frame.
embed
- true if the menubar should be embedded, otherwise false.getMenuBar()
public JMenuBar getMenuBar()
setMenuEmbedded(boolean)
,
isMenuEmbedded()
public boolean isToolBarEmbedded()
public void setToolBarEmbedded(boolean embed)
If set to false, the toolbar will not be displayed in the bean and the application must ensure that it adds the toolbar to the frame.
embed
- true if the toolbar should be embedded, otherwise false.getToolBar()
public JComponent getToolBar()
setToolBarEmbedded(boolean)
,
isToolBarEmbedded()
public String getBody()
public String getBody(boolean uploadImages)
uploadImages
- true to upload the images, false to not upload images
public void setBody(String sBody)
sBody
- Body to be loaded into the HTML document.public int getCharacterCount()
public int getWordCount()
public String getCurrentURL()
public String getConfigurationURL()
Returns the String version of the Configuration URL.
@Deprecated public void setConfigurationURL(String url)
setConfigurationURL(URL)
instead. As of 8.0, if the url string is malformed this will now throw RuntimeException
immediately.
RuntimeException
- if the URL is invalid, with the underlying MalformedURLException
as the causepublic void setConfigurationURL(URL url)
Sets the Configuration URL. If this is set then the Editor loads up with this passed Configuration URL. The passed String MUST be an absolute URL.
ELJBean will use configuration information from configurationText first, then configurationFile and finally configurationURL, in that order.
e.g. http://192.168.0.31/test.xml
url
- URL representing the configuration to be used.public File getConfigurationFile()
Returns the Configuration File.
public void setConfigurationFile(File confFile)
Sets the Configuration File. If this is set then the Editor loads up with this passed Configuration file.
ELJBean will use configuration information from configurationText first, then configurationFile and finally configurationURL, in that order.
e.g File f = new File("c:\\myfile.xml")
public String getConfigurationText()
Returns the String version of the Configuration Text.
If configurationText has NOT be specifically set, getConfigurationText will NOT return a text version of the configurationFile (if it has been set).
ELJBean will use configuration information from configurationText first, then configurationFile and finally configurationURL, in that order.public void setConfigurationText(String confT)
Sets the Configuration Text. If this is set then the Editor loads up with this passed Configuration text.
ELJBean will use configuration information from configurationText first, then configurationFile and finally configurationURL, in that order.
confT
- String that contains the configuration text to be loaded
into EditLive!.public String getDocument()
Returns the content of the HTML document. This is the complete source, and may include more information than is seen in HTML View, and may also be filtered some what, depending on the contents of the configuration file.
public String getDocument(boolean uploadImages)
Returns the content of the HTML document. This is the complete source, and may include more information than is seen in HTML View, and may also be filtered some what, depending on the contents of the configuration file. Images will be uploaded if the uploadImages parameter is set to true.
uploadImages
- true to upload the images, false to not upload images
public void setDocument(String doc)
doc
- The HTML document to be loaded into EditLive!.public String getHyperlinkAtCursor()
public String getSelectedText()
public String getWordAtCursor()
public void clearUndos()
public void init()
ELJBean(String, String, int, int, Document, boolean)
constructor
was used and init was false.
public void setCookie(String cookie)
cookie
- the cookie to include with any HTTP requests generated.getCookie()
public void setCookie(String cookie, URL url)
cookie
- the cookie to include with any HTTP requests generated.url
- URL to associate the cookie with.getCookie()
public String getCookie()
setCookie(String)
public String getCustomTagContent(String id)
id
- unique identifier for the custom tag
public void setCustomTagContent(String id, String value)
id
- a unique identifier to represent the custom tag valuevalue
- the custom tag valuepublic void setOutputCharacterSet(String charset)
charset
- The character set that content comes out of the the bean inpublic String getOutputCharacterSet()
public void setWidth(int width)
width
- the width in pixels.public void setHeight(int height)
height
- the new height.public void setStyles(String sStyles)
sStyles
- Additional CSS style information to be loaded into EditLive!.public String getStyles()
public boolean isDirty()
public void setDirty(boolean dirty)
dirty
- true if the content in the editor has been changed,
otherwise false.@Deprecated public JTextPane getHTMLPane()
getEditorPane()
instead
public EphoxEditorPane getEditorPane()
Note that this method must not be called until loading is complete (signified by a
TextEvent.LOADING_COMPLETE
event being fired or isInitFinished()
returning true).
public JTextComponent getTextPane()
Note that this method must not be called until loading is complete (signified by a
TextEvent.LOADING_COMPLETE
event being fired.
@Deprecated public void registerCustomBlockTag(String tagName, Icon startIcon, String startLabel, Icon endIcon, String endLabel, ViewClickListener listener)
CustomTagController.registerCustomBlockTag(String, Icon, String, Icon, String, ViewClickListener)
@Deprecated public void registerCustomInlineTag(String tagName, Icon startIcon, String startLabel, Icon endIcon, String endLabel, ViewClickListener listener)
CustomTagController.registerCustomInlineTag(String, Icon, String, Icon, String, ViewClickListener)
@Deprecated public void registerCustomEmptyTag(String tagName, Icon icon, String label, ViewClickListener listener)
CustomTagController.registerCustomEmptyTag(String, Icon, String, ViewClickListener)
@Deprecated public void registerCustomBlockView(String tagName, String viewClass, Object extraData)
registerCustomBlockView(String, Class, Object)
@Deprecated public void registerCustomBlockView(String tagName, Class<?> viewClass, Object extraData)
CustomTagController.registerCustomBlockView(String, Class, Object)
@Deprecated public void registerCustomInlineView(String tagName, String viewClass, Object extraData)
registerCustomInlineView(String, Class, Object)
@Deprecated public void registerCustomInlineView(String tagName, Class<?> viewClass, Object extraData)
CustomTagController.registerCustomInlineView(String, Class, Object)
@Deprecated public void registerCustomEmptyView(String tagName, String viewClass, Object extraData)
registerCustomEmptyView(String, Class, Object)
@Deprecated public void registerCustomEmptyView(String tagName, Class<?> viewClass, Object extraData)
CustomTagController.registerCustomEmptyView(String, Class, Object)
@Deprecated public void registerCustomCollapsedView(String tagName, String viewName, Object extraData)
registerCustomCollapsedView(String, Class, Object)
@Deprecated public void registerCustomCollapsedView(String tagName, Class<?> viewName, Object extraData)
CustomTagController.registerCustomCollapsedView(String, Class, Object)
@Deprecated public void setUnregisteredCustomTagView(Class<?> viewClass, Object extraData)
CustomTagController.setUnregisteredCustomTagView(Class, Object)
public Document getConfigurationDOM()
public void setConfigurationDOM(Document doc)
doc
- the Document to use as the configuration for the bean.public void insertHTMLAtCursor(String html)
html
- the html to insert.public void uploadLocalImages()
Uploads all local images stored within the document and also adjusts their src attribute.
public boolean isCrippled()
@Deprecated public void setBrowserCallback(Object object)
TextEvent.CALL_JAVASCRIPT
event instead, and call out to javascript
using the JSObject TextEvent.CALL_JAVASCRIPT
events use an instance of JSFunctionCall
as their extraObject
object
- the callback. This should be an instance of netscape.javascript.JSObject
.
On OS X it can be a String representing the JavaScript path
to the frame the applet is in eg window.mainFrame.contentFrame
However, this is not recommended for modern browsers.@Deprecated public void addImageDialogComponent(String className, Object[] params)
addImageDialogComponent(Class, Object[])
public void addImageDialogComponent(Class<? extends ImageDialogComponent> clazz, Object[] params)
clazz
- the class to be loaded.params
- array of objects to be passed in as parameters when the class is instantiated@Deprecated public void addHyperlinkDialogComponent(String className, Object[] params)
addHyperlinkDialogComponent(Class, Object[])
public void addHyperlinkDialogComponent(Class<? extends HyperlinkDialogComponent> clazz, Object[] params)
clazz
- the class to be loaded.params
- array of objects to be passed in as parameters when the class is instantiatedpublic String getBaseURL()
public void setBaseURL(String url)
url
- the Base URLpublic void setImageUploadHTTPRequestCallback(HTTPRequestCallback req)
req
- HTTPRequestCallback to be used for image uploadspublic void setHTTPUrlCallback(HTTPUrlCallback req)
req
- HTTPUrlCallback to be used for http requestspublic HTTPUrlCallback getHttpUrlCallback()
public void setCustomResourceBundle(ResourceBundle b)
b
- resource bundle to be used.public void setFilter(SourceFilter filter)
filter
- the filter to apply to the content.public SourceFilter getFilter()
@Deprecated public void setHttpLayerManager(String layerId)
HttpLayerManager.setManager(HttpLayer)
instead
public boolean isInitFinished()
@Deprecated public EphoxAction getAction(String name)
ActionController.getAction(String)
@Deprecated public EphoxAction getAction(Map<String,String> map)
ActionController.getAction(Map)
public OperationManager getOperationManager()
public DocumentModifier getDocumentModifier()
public void setReadOnly(boolean readOnly)
public boolean getReadOnly()
@Deprecated public void setPasteFilter(PasteFilter filter)
addPasteFilter(PasteFilter)
instead.
filter
- the paste filter to use to filter the clipboard.@Deprecated public PasteFilter getPasteFilter()
getPasteFilters()
instead.
getPasteFilters()
and addPasteFilter(PasteFilter)
methods.
public void addPasteFilter(PasteFilter filter)
filter
- The paste filter to add, which will be used when pasting content from the clipboard.public PasteFilter[] getPasteFilters()
public void setUsername(String name)
public JScrollPane getScrollPane()
public void setCurrentFile(File file)
TextEvent.SAVE_ACTION
will save to this file without prompting the user. If set to null, the user will be prompted as in the
TextEvent.SAVE_AS_ACTION
. The default behaviour of the TextEvent.OPEN_ACTION
and
TextEvent.SAVE_AS_ACTION
will set the current file to the users selection.
file
- the file to save to by default.getCurrentFile()
public File getCurrentFile()
setCurrentFile(File)
public String getLoadTimeErrorMessage()
public final boolean isLicensedForEnterpriseEdition(boolean startTrial)
startTrial
- Should the editor begin the Enterprise Edition trial if a Standard Edition license is in use
IllegalStateException
- if the editor hasn't finished loadingpublic void setFileUploader(FileUploader fileUploader)
fileUploader
- the FileUploader implementation to use to upload local resources.public ConfigItem getConfig()
public CustomTagController getCustomTagController()
public ActionController getActionController()
public void addInfobar(JPanel panel)
removeInfobar
removeInfobar(JPanel)
public void removeInfobar(JPanel panel)
addInfobar
addInfobar(JPanel)
public void cleanup()
@Deprecated public void addEditorEventListener(EventListener oListener)
EventBroadcaster.registerBeanEditorListener(EventListener)
@Deprecated public void removeEditorEventListener(EventListener oListener)
EventBroadcaster.removeBeanEditorListener(EventListener)
@Deprecated public void raiseEvent(TextEvent e)
EventBroadcaster.broadcastEvent(TextEvent)
public TableManager getTableManager()
public DocumentManager getDocumentManager()
public CacheManager getCacheManager()
public SelectionManager getSelectionManager()
public StyleManager getStyleManager()
public ViewManager getViewManager()
public VersionManager getVersionManager()
public EventBroadcaster getEventBroadcaster()
public boolean isEditorRunningAsApplet()
public Parameters getAppletParameters()
UnsupportedOperationException
- if applet parameters are not availablepublic Registry getEphoxRegistry()
@Deprecated public Locale getLocale()
getGlobalLocale()
instead
setGlobalLocale(String)
that overrides Component.getLocale()
.
getLocale
in class Component
@Deprecated public void setLocale(Locale locale)
setGlobalLocale(String)
instead
setGlobalLocale(String)
that overrides Component.setLocale(Locale)
.
If this method must be used, a typical use case should be:
ELJBean(boolean)
passing false
init()
setLocale
in class Component
locale
- One of the Supported EditLive! interface languages
UnsupportedOperationException
- if used after the bean has been initializedpublic void addImagePreProcessor(PreProcessor processor)
public HttpManagerFactory getHttpFactory()
public ToolbarFactory getToolbarFactory()
public ImageManager getImageManager()
public EditorActions getEditorActions()
public void setMinCrashTimeout(int timeout)
timeout
- Minimum number of seconds to wait
IllegalArgumentException
- If negative or zero is specifiedpublic void addCrashListener(CrashListener crashListener)
crashListener
- listener to addpublic URL getAppletDownloadDirectory()
UnsupportedOperationException
- if applet parameters are not availablepublic void setSpellerLoader(SpellerLoader loader)
loader
- An object that knows how to load a SpellChecker
.public EditorMode getEditorMode()
|
Copyright (c) 2005-2013 Ephox Pty Ltd. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |