com.ephox.editlive
Class ELJBean

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.ephox.editlive.ELJBean
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class ELJBean
extends JPanel

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.

See Also:
Serialized Form

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.
 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 javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ELJBean

public ELJBean()
Creates a standard EditLive! Editor Bean.

By default a standard configuration file is loaded, and the width is set to 800 and the height to 600.


ELJBean

public ELJBean(boolean init)
Creates a standard EditLive! JavaBean.

Parameters:
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.

ELJBean

public ELJBean(String sHTML,
               String sStyles,
               int iWidth,
               int iHeight,
               URL xmlURL)
Creates a EditLive! Editor Bean.

By default a standard configuration file is loaded, and the width is set to 800 and the height to 600.

Parameters:
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.

ELJBean

public ELJBean(String sHTML,
               String sStyles,
               int iWidth,
               int iHeight,
               URL xmlURL,
               boolean init)
Creates a standard EditLive! Editor Bean.

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

Parameters:
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.

ELJBean

public ELJBean(String sHTML,
               String sStyles,
               int iWidth,
               int iHeight,
               String sXML)
Creates a standard EditLive! Editor Bean.

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

Parameters:
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!

ELJBean

public ELJBean(String sHTML,
               String sStyles,
               int iWidth,
               int iHeight,
               String sXML,
               boolean init)
Creates a standard EditLive! Editor Bean.

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

Parameters:
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.

ELJBean

public ELJBean(String sHTML,
               String sStyles,
               int iWidth,
               int iHeight,
               File fXML)
Creates a standard EditLive! Editor Bean.

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

Parameters:
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!.

ELJBean

public ELJBean(String sHTML,
               String sStyles,
               int iWidth,
               int iHeight,
               File fXML,
               boolean init)
Creates a standard EditLive! Editor Bean.

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

Parameters:
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.

ELJBean

public ELJBean(String sHTML,
               String sStyles,
               int iWidth,
               int iHeight,
               Document dXML,
               boolean init)
Creates a standard EditLive! Editor Bean.

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.

Parameters:
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

getVersion

public static String getVersion()
Returns the version number of EditLive!.

Returns:
Version number as a string

getGlobalLocale

public static Locale getGlobalLocale()
Returns:
The current global locale of EditLive!
Since:
7.5

setGlobalLocale

public static void setGlobalLocale(String locale)
Sets the global EditLive! language for all editors. Must be done before the editor loads. Changing this setting at runtime will not update text on screen.

Parameters:
locale - One of the Supported EditLive! interface languages
Since:
7.5

setSettingsDirectory

public static void setSettingsDirectory(File settingsDirectory)
Sets the directory that EditLive! will use when writing out its registry, cache folder, spelling and thesaurus files. This file must be readable and writable by the current user or EditLive! initialization will fail. It is recommended that the same file by used for all users on the machine when possible - EditLive! will maintain separate preferences for each user as required.

Note that this only applies to all platforms. Developers should ensure that the file location specified is appropriate for the current platform.

Parameters:
settingsDirectory - the file to write user preferences and licensing information to. Must be readable and writable by the current user.

enableDebugLogging

public static void enableDebugLogging()
Turns on debug logging to assist with identifying problems. This method should be called as early as possible during application startup to ensure that all information is logged. All applications should provide a simple way to activate this logging without needing to deploy a new build such as a command line option, webstart configuration parameter or configuration file.

When logging a support case with Ephox, please enable logging, reproduce the issue and include the output with your support case.


isMenuEmbedded

public boolean isMenuEmbedded()
Determines whether or not the menubar is currently embedded in the bean.

Returns:
true if the menu is embedded, otherwise false.

setMenuEmbedded

public void setMenuEmbedded(boolean embed)
Sets whether or not the menubar is embedded in the bean.

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.

Parameters:
embed - true if the menubar should be embedded, otherwise false.
See Also:
getMenuBar()

getMenuBar

public JMenuBar getMenuBar()
Returns the menubar for this bean.

Returns:
the menubar for this bean.
See Also:
setMenuEmbedded(boolean), isMenuEmbedded()

isToolBarEmbedded

public boolean isToolBarEmbedded()
Determines whether or not the toolbar is currently embedded in the bean.

Returns:
true if the toolbar is embedded, otherwise false.

setToolBarEmbedded

public void setToolBarEmbedded(boolean embed)
Sets whether or not the toolbar is embedded in the bean.

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.

Parameters:
embed - true if the toolbar should be embedded, otherwise false.
See Also:
getToolBar()

getToolBar

public JComponent getToolBar()
Returns the toolbar for this bean.

Returns:
the toolbar for this bean.
See Also:
setToolBarEmbedded(boolean), isToolBarEmbedded()

getBody

public String getBody()
Returns the body of HTML document currently in the Editor. The Body is everything between the opening and closing BODY Tags.

Returns:
Body of the HTML document.

getBody

public String getBody(boolean uploadImages)
Returns the body of HTML document currently in the Editor. The Body is everything between the opening and closing BODY Tags.

Parameters:
uploadImages - true to upload the images, false to not upload images
Returns:
Body of the HTML document.

setBody

public void setBody(String sBody)
Sets the body of HTML document currently in the Editor. The Body is everything between the opening and closing BODY Tags.

Parameters:
sBody - Body to be loaded into the HTML document.

getCharacterCount

public int getCharacterCount()
Retrieves the number of characters within the document.

Returns:
The number of characters in the document

getWordCount

public int getWordCount()
Retrieves the number of words within the document.

Returns:
The number of words in the document

getCurrentURL

public String getCurrentURL()
Retrieves the last saved or opened URL.

Returns:
The last saved or opened URL

getConfigurationURL

public String getConfigurationURL()

Returns the String version of the Configuration URL.

Returns:
String representing the configuration URL.

setConfigurationURL

@Deprecated
public 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.

Throws:
RuntimeException - if the URL is invalid, with the underlying MalformedURLException as the cause

setConfigurationURL

public 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

Parameters:
url - URL representing the configuration to be used.
Since:
8.0

getConfigurationFile

public File getConfigurationFile()

Returns the Configuration File.

Returns:
Configuration file that is currently loaded.

setConfigurationFile

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")


getConfigurationText

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.


setConfigurationText

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.

Parameters:
confT - String that contains the configuration text to be loaded into EditLive!.

getDocument

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.

Returns:
String representing the current HTML document contents within EditLive!

getDocument

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.

Parameters:
uploadImages - true to upload the images, false to not upload images
Returns:
String representing the current HTML document contents within EditLive!

setDocument

public void setDocument(String doc)
Sets the contents of the HTML document. That is everything between the HTML tags.

Parameters:
doc - The HTML document to be loaded into EditLive!.

getHyperlinkAtCursor

public String getHyperlinkAtCursor()
Returns the currently selected hyperlink object or the selected text if there is not a hyperlink at the cursor.

Returns:
The currently selected hyperlink or the currently selected word

getSelectedText

public String getSelectedText()
Returns the currently selected text, including the html tags surrounding the text.

Returns:
The currently selected text plus any html tags within the selection

getWordAtCursor

public String getWordAtCursor()
Returns the current word that the cursor is in.

Returns:
The current word the cursor is in

clearUndos

public void clearUndos()
Clears the current list of undos and redos for the bean. This is useful when an entirely new document has been set.


init

public void init()
Initializes the bean. This only needs to be called if the ELJBean(String, String, int, int, Document, boolean)constructor was used and init was false.


setCookie

public void setCookie(String cookie)
Sets the cookie to send with HTTP requests.

Parameters:
cookie - the cookie to include with any HTTP requests generated.
See Also:
getCookie()

setCookie

public void setCookie(String cookie,
                      URL url)
Sets the cookie to send with HTTP requests.

Parameters:
cookie - the cookie to include with any HTTP requests generated.
url - URL to associate the cookie with.
See Also:
getCookie()

getCookie

public String getCookie()
Returns the cookie that will be sent with HTTP requests.

Returns:
the cookie set on this bean.
See Also:
setCookie(String)

getCustomTagContent

public String getCustomTagContent(String id)
Returns the value associated with a specified custom tag. Custom tag ids are represented by String eljCustomAttributeXXXend, where XXX is a unique number.

Parameters:
id - unique identifier for the custom tag
Returns:
String representing the value for that key in customTag Hashmap

setCustomTagContent

public void setCustomTagContent(String id,
                                String value)
Specifies a custom tag value and it's matching key identifier. If custom tag id specified already exists for another custom tag, this current custom tag will not be registered.

Parameters:
id - a unique identifier to represent the custom tag value
value - the custom tag value

setOutputCharacterSet

public void setOutputCharacterSet(String charset)
Sets the character set that content should be output in.

Parameters:
charset - The character set that content comes out of the the bean in

getOutputCharacterSet

public String getOutputCharacterSet()
Retrieves the character set that content should be output in.

Returns:
The character set that content will be output in

setWidth

public void setWidth(int width)
Sets the width in pixels.

Parameters:
width - the width in pixels.

setHeight

public void setHeight(int height)
Sets the height in pixels.

Parameters:
height - the new height.

setStyles

public void setStyles(String sStyles)
Sets additional CSS styles to be used by EditLive!.

Parameters:
sStyles - Additional CSS style information to be loaded into EditLive!.

getStyles

public String getStyles()
Gets additional CSS styles being used by EditLive!.

Returns:
Styles information stored within the style tag in the document.

isDirty

public boolean isDirty()
Returns true if the content in the editor has been changed.

Returns:
true if the content has been changed, otherwise false.

setDirty

public void setDirty(boolean dirty)
Sets whether or not the content in the editor has been changed. This is useful if you are using your own load and save functions.

Parameters:
dirty - true if the content in the editor has been changed, otherwise false.

getHTMLPane

@Deprecated
public JTextPane getHTMLPane()
Deprecated. use getEditorPane() instead


getEditorPane

public EphoxEditorPane getEditorPane()
Method used return the Design View Editor Pane. This method should only be used when the TextEvent class does not support the required operation.

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).

Returns:
Underlying EphoxEditorPane instance.

getTextPane

public JTextComponent getTextPane()
Get the JTextComponent used for the code view. This method should only be used when the TextEvent class does not support the required operation.

Note that this method must not be called until loading is complete (signified by a TextEvent.LOADING_COMPLETE event being fired.

Returns:
the text component used for the source code view.

registerCustomBlockTag

@Deprecated
public void registerCustomBlockTag(String tagName,
                                              Icon startIcon,
                                              String startLabel,
                                              Icon endIcon,
                                              String endLabel,
                                              ViewClickListener listener)
Deprecated. Use CustomTagController.registerCustomBlockTag(String, Icon, String, Icon, String, ViewClickListener)


registerCustomInlineTag

@Deprecated
public void registerCustomInlineTag(String tagName,
                                               Icon startIcon,
                                               String startLabel,
                                               Icon endIcon,
                                               String endLabel,
                                               ViewClickListener listener)
Deprecated. Use CustomTagController.registerCustomInlineTag(String, Icon, String, Icon, String, ViewClickListener)


registerCustomEmptyTag

@Deprecated
public void registerCustomEmptyTag(String tagName,
                                              Icon icon,
                                              String label,
                                              ViewClickListener listener)
Deprecated. Use CustomTagController.registerCustomEmptyTag(String, Icon, String, ViewClickListener)


registerCustomBlockView

@Deprecated
public void registerCustomBlockView(String tagName,
                                               String viewClass,
                                               Object extraData)
Deprecated. Use registerCustomBlockView(String, Class, Object)


registerCustomBlockView

@Deprecated
public void registerCustomBlockView(String tagName,
                                               Class<?> viewClass,
                                               Object extraData)
Deprecated. Use CustomTagController.registerCustomBlockView(String, Class, Object)


registerCustomInlineView

@Deprecated
public void registerCustomInlineView(String tagName,
                                                String viewClass,
                                                Object extraData)
Deprecated. Use registerCustomInlineView(String, Class, Object)


registerCustomInlineView

@Deprecated
public void registerCustomInlineView(String tagName,
                                                Class<?> viewClass,
                                                Object extraData)
Deprecated. Use CustomTagController.registerCustomInlineView(String, Class, Object)


registerCustomEmptyView

@Deprecated
public void registerCustomEmptyView(String tagName,
                                               String viewClass,
                                               Object extraData)
Deprecated. Use registerCustomEmptyView(String, Class, Object)


registerCustomEmptyView

@Deprecated
public void registerCustomEmptyView(String tagName,
                                               Class<?> viewClass,
                                               Object extraData)
Deprecated. Use CustomTagController.registerCustomEmptyView(String, Class, Object)


registerCustomCollapsedView

@Deprecated
public void registerCustomCollapsedView(String tagName,
                                                   String viewName,
                                                   Object extraData)
Deprecated. Use registerCustomCollapsedView(String, Class, Object)


registerCustomCollapsedView

@Deprecated
public void registerCustomCollapsedView(String tagName,
                                                   Class<?> viewName,
                                                   Object extraData)
Deprecated. Use CustomTagController.registerCustomCollapsedView(String, Class, Object)


setUnregisteredCustomTagView

@Deprecated
public void setUnregisteredCustomTagView(Class<?> viewClass,
                                                    Object extraData)
Deprecated. Use CustomTagController.setUnregisteredCustomTagView(Class, Object)


getConfigurationDOM

public Document getConfigurationDOM()
Returns the DOM being used for the configuration of this bean. The DOM must not be changed once it has been set.

Returns:
the Document being used for the configuration of this bean if any.

setConfigurationDOM

public void setConfigurationDOM(Document doc)
Sets the DOM to use as the configuration for this bean. The bean's configuration is automatically updated to reflect the contents of document .

Parameters:
doc - the Document to use as the configuration for the bean.

insertHTMLAtCursor

public void insertHTMLAtCursor(String html)
Inserts the specified html at the current caret position.

Parameters:
html - the html to insert.

uploadLocalImages

public void uploadLocalImages()

Uploads all local images stored within the document and also adjusts their src attribute.


isCrippled

public boolean isCrippled()
Determines whether or not functionality has been restricted. This will return true if the 30 day trial has expired and no valid license was supplied in the XML configuration.

Returns:
true if the trial period has expired and no valid license was found.

setBrowserCallback

@Deprecated
public 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

Provides the data required for custom actions which call back to functions in the browser to work. This is not generally useful except when the ELJBean is being embedded inside an applet and custom actions such as getWordCount, getCharacterCount and raiseEvent should be sent to the browser. Most users should not call this function.

Parameters:
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.

addImageDialogComponent

@Deprecated
public void addImageDialogComponent(String className,
                                               Object[] params)
Deprecated. Use addImageDialogComponent(Class, Object[])


addImageDialogComponent

public void addImageDialogComponent(Class<? extends ImageDialogComponent> clazz,
                                    Object[] params)
Adds an ImageDialogComponent to the bean for use in the insert image dialog.

Parameters:
clazz - the class to be loaded.
params - array of objects to be passed in as parameters when the class is instantiated

addHyperlinkDialogComponent

@Deprecated
public void addHyperlinkDialogComponent(String className,
                                                   Object[] params)
Deprecated. Use addHyperlinkDialogComponent(Class, Object[])


addHyperlinkDialogComponent

public void addHyperlinkDialogComponent(Class<? extends HyperlinkDialogComponent> clazz,
                                        Object[] params)
Adds a HyperlinkDialogComponent to the bean for use in the insert hyperlink dialog.

Parameters:
clazz - the class to be loaded.
params - array of objects to be passed in as parameters when the class is instantiated

getBaseURL

public String getBaseURL()
Returns the Base URL used for loading resources (e.g. images, stylesheets) referenced with a relative URL.

Returns:
String representing the Base URL

setBaseURL

public void setBaseURL(String url)
Sets the Base URL used for loading resources (e.g. images, stylesheets) when referenced with a relative URL. This method should be called before the init().

Parameters:
url - the Base URL

setImageUploadHTTPRequestCallback

public void setImageUploadHTTPRequestCallback(HTTPRequestCallback req)
Sets a HTTPRequestCallback object to call into before each image is uploaded.

Parameters:
req - HTTPRequestCallback to be used for image uploads

setHTTPUrlCallback

public void setHTTPUrlCallback(HTTPUrlCallback req)
Sets a HTTPUrlCallback object to call into before making an http request to allow for user controlled redirects.

Parameters:
req - HTTPUrlCallback to be used for http requests

getHttpUrlCallback

public HTTPUrlCallback getHttpUrlCallback()
Gets the HTTPUrlCallback object to call into before making an http request to allow for user controlled redirects.

Returns:
the HTTPUrlCallback to be used for http requests

setCustomResourceBundle

public void setCustomResourceBundle(ResourceBundle b)
Sets a custom resource bundle to be used for the user interface.

Parameters:
b - resource bundle to be used.

setFilter

public void setFilter(SourceFilter filter)
Set the filter to apply to content on the way in and out of the editor. This allows content to be filtered before it is displayed in code view and again before being reinserted to the editor.

Parameters:
filter - the filter to apply to the content.

getFilter

public SourceFilter getFilter()
Get the filter that will be applied to content on the way in and out of the editor.

Returns:
the current filter.

setHttpLayerManager

@Deprecated
public void setHttpLayerManager(String layerId)
Deprecated. use HttpLayerManager.setManager(HttpLayer) instead


isInitFinished

public boolean isInitFinished()
Checks if the bean init state has been updated after the LOADING_COMPLETE event has fired

Returns:
true if all bean methods are available for use

getAction

@Deprecated
public EphoxAction getAction(String name)
Deprecated. Use ActionController.getAction(String)


getAction

@Deprecated
public EphoxAction getAction(Map<String,String> map)
Deprecated. Use ActionController.getAction(Map)


getOperationManager

public OperationManager getOperationManager()
Gets the track changes operation manager. The OperationManager allows developers to query the status of track changes operations and manipulate operations.

Returns:
the operation manager for the editor.

getDocumentModifier

public DocumentModifier getDocumentModifier()
Retrieves the document modifier. The document modifier is a simple interface that allows developers to make changes within the document that are correctly tracked via track changes.

Returns:
the document modifier.

setReadOnly

public void setReadOnly(boolean readOnly)
Set the read-only state of the bean. Has no effect if set after init.


getReadOnly

public boolean getReadOnly()
Get the read-only state of the bean

Returns:
true if the editor is read only, otherwise false.

setPasteFilter

@Deprecated
public void setPasteFilter(PasteFilter filter)
Deprecated. please use addPasteFilter(PasteFilter) instead.

Set the paste filter. This method is here for backwards compatibility, addPasteFilter should be used instead.

Parameters:
filter - the paste filter to use to filter the clipboard.

getPasteFilter

@Deprecated
public PasteFilter getPasteFilter()
Deprecated. please use getPasteFilters() instead.

Get the current paste filter, that was added by setPasteFilter. This method has been kept for backwards compatibility, and should not be used. It was replaced by the getPasteFilters() and addPasteFilter(PasteFilter) methods.

Returns:
the paste filter to use to filter the clipboard.

addPasteFilter

public void addPasteFilter(PasteFilter filter)
Add a pasteFilter to the list of paste filters that will be used when pasting content.

Parameters:
filter - The paste filter to add, which will be used when pasting content from the clipboard.

getPasteFilters

public PasteFilter[] getPasteFilters()
Get the list of paste filters.

Returns:
the list of paste filters currently in use by the bean.

setUsername

public void setUsername(String name)
Set the username for track changes


getScrollPane

public JScrollPane getScrollPane()
Returns the visible area of the editor

Returns:
JScrollPane that controls the visible area

setCurrentFile

public void setCurrentFile(File file)
Sets the path to the currently edited file. If this is set to a non-null value, the 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.

Parameters:
file - the file to save to by default.
See Also:
getCurrentFile()

getCurrentFile

public File getCurrentFile()
Returns the file currently being edited.

Returns:
the file currently being editor or null if no file is set.
See Also:
setCurrentFile(File)

getLoadTimeErrorMessage

public String getLoadTimeErrorMessage()
Checks for a load-time error message that may have displayed to the user.

Returns:
The error message, or an empty String if there were no errors.

isLicensedForEnterpriseEdition

public final boolean isLicensedForEnterpriseEdition(boolean startTrial)
Checks if the editor is enabled for Enterprise Edition features, with the option to begin the Enterprise Edition trial.
If the editor is within the initial 30 day trial, Enterprise Edition features are automatically enabled and the allowTrial parameter is ignored.

NOTE: When the Enterprise Edition trial begins, a message will be displayed to the user.
NOTE: This method must not be called before the editor has finished loading.

Parameters:
startTrial - Should the editor begin the Enterprise Edition trial if a Standard Edition license is in use
Returns:
true if Enterprise Edition features are enabled
Throws:
IllegalStateException - if the editor hasn't finished loading

setFileUploader

public void setFileUploader(FileUploader fileUploader)
Set the FileUploader to use when uploading local resources.

Parameters:
fileUploader - the FileUploader implementation to use to upload local resources.

getConfig

public ConfigItem getConfig()
Gets the root node of the EditLive! configuration XML. Will return null until init() is called.

Returns:
root node

getCustomTagController

public CustomTagController getCustomTagController()
Returns the CustomTagController for this editor.
NOTE: This method must not be called before the editor has finished loading.

Since:
7.0

getActionController

public ActionController getActionController()
Returns the Action Controller for this editor.
NOTE: This method must not be called before the editor has finished loading.

Since:
7.0

addInfobar

public void addInfobar(JPanel panel)
Adds an infobar to the editor, below any existing toolbars. The infobar should be used to contain informational messages for users. A standard swing JPanel is used to contain the message, allowing custom decoration. The panel will be displayed below the toolbars. Use removeInfobar to remove the panel when you no longer wish it to be displayed. In order to successfully remove the panel at a later stage it is recommended that a reference to the panel is retained in the implementing code, so that it can be used to call removeInfobar

Since:
7.0
See Also:
removeInfobar(JPanel)

removeInfobar

public void removeInfobar(JPanel panel)
Remove an infobar that was added using addInfobar. This will cause an update of the user interface, and the panel to be removed from view. This method partners addInfobar

Since:
7.0
See Also:
addInfobar(JPanel)

cleanup

public void cleanup()
Releases memory used by the editor and shuts down background threads to aid in garbage collection. This method only applies to the Swing SDK, it has no effect in the Applet Advanced API where cleanup is handled automatically.
NOTE:This instance of EditLive! will be unusable after performing this action.

Since:
7.1

addEditorEventListener

@Deprecated
public void addEditorEventListener(EventListener oListener)
Deprecated. use EventBroadcaster.registerBeanEditorListener(EventListener)


removeEditorEventListener

@Deprecated
public void removeEditorEventListener(EventListener oListener)
Deprecated. use EventBroadcaster.removeBeanEditorListener(EventListener)


raiseEvent

@Deprecated
public void raiseEvent(TextEvent e)
Deprecated. use EventBroadcaster.broadcastEvent(TextEvent)


getTableManager

public TableManager getTableManager()
Returns a TableManager instance for the current document.

Since:
7.5

getDocumentManager

public DocumentManager getDocumentManager()
Returns a DocumentManager instance for the current document.

Since:
7.5

getCacheManager

public CacheManager getCacheManager()
Returns the cache manager. This instance is not editor specific.

Since:
7.5

getSelectionManager

public SelectionManager getSelectionManager()
Returns a SelectionManager instance for this editor.

Since:
7.5

getStyleManager

public StyleManager getStyleManager()
Returns a StyleManager instance for this editor.

Since:
7.5

getViewManager

public ViewManager getViewManager()
Returns a ViewManager instance for this editor.

Since:
7.5

getVersionManager

public VersionManager getVersionManager()
Returns the VersionManager. This instance is not editor specific.

Since:
7.5

getEventBroadcaster

public EventBroadcaster getEventBroadcaster()
Returns an EventBroadcaster instance for this editor.

Since:
7.5

isEditorRunningAsApplet

public boolean isEditorRunningAsApplet()
Determines if the editor is running through the EditLive! JavaScript browser APIs.

Since:
7.5

getAppletParameters

public Parameters getAppletParameters()
Returns the current applet parameters if EditLive! is running through the JavaScript browser APIs.

Throws:
UnsupportedOperationException - if applet parameters are not available
Since:
7.5

getEphoxRegistry

public Registry getEphoxRegistry()
Returns an instance of the registry. This instance is not editor specific.

Since:
7.5

getLocale

@Deprecated
public Locale getLocale()
Deprecated. use getGlobalLocale() instead

Convenience method for setGlobalLocale(String) that overrides Component.getLocale().

Overrides:
getLocale in class Component
Returns:
The current global locale of EditLive!
Since:
7.5

setLocale

@Deprecated
public void setLocale(Locale locale)
Deprecated. use setGlobalLocale(String) instead

Convenience method for setGlobalLocale(String) that overrides Component.setLocale(Locale).

If this method must be used, a typical use case should be:

Overrides:
setLocale in class Component
Parameters:
locale - One of the Supported EditLive! interface languages
Throws:
UnsupportedOperationException - if used after the bean has been initialized
Since:
7.5

addImagePreProcessor

public void addImagePreProcessor(PreProcessor processor)
Registers a PreProcessor instance on the editor

Since:
7.5

getHttpFactory

public HttpManagerFactory getHttpFactory()
Returns a HttpManagerFactory instance for this editor.

Since:
7.5

getToolbarFactory

public ToolbarFactory getToolbarFactory()
Returns a ToolbarFactory instance for this editor.

Since:
7.5

getImageManager

public ImageManager getImageManager()
Returns an ImageManager instance for this editor.

Since:
7.5

getEditorActions

public EditorActions getEditorActions()
Returns an EditorActions instance for this editor.

Since:
7.5

setMinCrashTimeout

public void setMinCrashTimeout(int timeout)
Sets the wait timeout on long operations before displaying the crash screen. Defaults to 10.

Parameters:
timeout - Minimum number of seconds to wait
Throws:
IllegalArgumentException - If negative or zero is specified
Since:
7.6.1

addCrashListener

public void addCrashListener(CrashListener crashListener)
Adds a listener which is invoked when the editor crashes.

Parameters:
crashListener - listener to add
Since:
7.6.1

getAppletDownloadDirectory

public URL getAppletDownloadDirectory()
Returns the location of the applet "DownloadDirectory" setting if EditLive! is running through the JavaScript browser APIs.

Throws:
UnsupportedOperationException - if applet parameters are not available
Since:
8.0

setSpellerLoader

public void setSpellerLoader(SpellerLoader loader)
Replaces the editor's spelling engine.

Parameters:
loader - An object that knows how to load a SpellChecker.
Since:
8.0

getEditorMode

public EditorMode getEditorMode()
Returns the mode (design view or code view) the editor is in.

Since:
8.0

Copyright (c) 2005-2012 Ephox Pty Ltd. All rights reserved.