|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.eclipse.epf.richtext.RichText
The default rich text control implementation.
The default rich text editor uses XHTML as the underlying markup language for
the rich text content. It is implemented using a SWT Browser
control and DHTML (HTML, CSS and JavaScript).
| Field Summary |
|---|
| Fields inherited from interface org.eclipse.epf.richtext.IRichText |
|---|
PROPERTY_NAME |
| Constructor Summary | |
|---|---|
RichText(org.eclipse.swt.widgets.Composite parent,
int style)
Creates a new instance. |
|
RichText(org.eclipse.swt.widgets.Composite parent,
int style,
java.lang.String basePath)
Creates a new instance. |
|
| Method Summary | |
|---|---|
void |
addDisposeListener(org.eclipse.swt.events.DisposeListener listener)
Adds the listener to the collection of listeners who will be notifed when this control is disposed. |
void |
addHelpListener(org.eclipse.swt.events.HelpListener listener)
Adds a listener to the collection of listeners who will be notified when help events are generated for this control. |
void |
addKeyListener(org.eclipse.swt.events.KeyListener listener)
Adds a listener to the collection of listeners who will be notified when keys are pressed and released within this control. |
void |
addListener(int eventType,
org.eclipse.swt.widgets.Listener listener)
Adds the listener to the collection of listeners who will be notifed when an event of the given type occurs within this control. |
void |
addModifyListener(org.eclipse.swt.events.ModifyListener listener)
Adds a listener to the collection of listeners who will be notified when the content of this control is modified. |
void |
dispose()
Disposes the operating system resources allocated by the control. |
int |
executeCommand(java.lang.String command)
Executes the given rich text command. |
int |
executeCommand(java.lang.String command,
java.lang.String param)
Executes the given rich text command with a single parameter. |
int |
executeCommand(java.lang.String command,
java.lang.String[] params)
Executes the given rich text command with an array of parameters. |
java.lang.String |
getBasePath()
Returns the base path used for resolving text and image links. |
org.eclipse.swt.widgets.Control |
getControl()
Returns this rich text control. |
java.lang.Object |
getData(java.lang.String key)
Returns an application specific property value. |
boolean |
getEditable()
Returns the editable state. |
java.lang.Object |
getLayoutData()
Returns the layout data. |
java.util.Iterator |
getListeners()
Returns the event listeners attached to this control. |
boolean |
getModified()
Checks whether the content has been modified. |
java.util.Iterator |
getModifyListeners()
Returns the modify listeners attached to this control. |
java.lang.String |
getSelectedText()
Returns the currently selected text. |
java.lang.String |
getText()
Returns the rich text content. |
boolean |
hasFocus()
Checks whether this control has focus. |
boolean |
isDisposed()
Checks whether this control has been disposed. |
void |
notifyModifyListeners()
Notifies the modify listeners that the rich text editor content has changed. |
void |
removeDisposeListener(org.eclipse.swt.events.DisposeListener listener)
Removes a listener from the collection of listeners who will be notified when this control is disposed. |
void |
removeHelpListener(org.eclipse.swt.events.HelpListener listener)
Removes a listener from the collection of listeners who will be notified when help events are generated for this control. |
void |
removeKeyListener(org.eclipse.swt.events.KeyListener listener)
Removes a listener from the collection of listeners who will be notified when keys are pressed and released within this control. |
void |
removeListener(int eventType,
org.eclipse.swt.widgets.Listener listener)
Removes the listener from the collection of listeners who will be notifed when an event of the given type occurs within this control. |
void |
removeModifyListener(org.eclipse.swt.events.ModifyListener listener)
Removes a listener from the collection of listeners who will be notified when the content of this control is modified. |
void |
restoreText()
Restores the rich text content back to the initial value. |
void |
setData(java.lang.String key,
java.lang.Object value)
Sets an application specific property name and value. |
void |
setEditable(boolean editable)
Sets the editable state. |
void |
setFocus()
Sets focus to this control. |
void |
setLayoutData(java.lang.Object layoutData)
Sets the layout data. |
void |
setModified(boolean modified)
Sets the modified state. |
void |
setText(java.lang.String text)
Sets the rich text content. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public RichText(org.eclipse.swt.widgets.Composite parent,
int style,
java.lang.String basePath)
parent - the parent compositestyle - the style for this controlbasePath - the path used for resolving links
public RichText(org.eclipse.swt.widgets.Composite parent,
int style)
parent - the parent compositestyle - the style for this control| Method Detail |
public org.eclipse.swt.widgets.Control getControl()
getControl in interface IRichTextpublic void setLayoutData(java.lang.Object layoutData)
setLayoutData in interface IRichTextlayoutData - the layout data to setpublic java.lang.Object getLayoutData()
getLayoutData in interface IRichTextpublic void setFocus()
setFocus in interface IRichTextpublic boolean hasFocus()
hasFocus in interface IRichTexttrue if this control has the user-interface focuspublic java.lang.String getBasePath()
getBasePath in interface IRichTextpublic boolean getEditable()
getEditable in interface IRichTexttrue if the content is ediatblepublic void setEditable(boolean editable)
setEditable in interface IRichTexteditable - the editable statepublic boolean getModified()
getModified in interface IRichTexttrue if the content has been modifiedpublic void setModified(boolean modified)
setModified in interface IRichTextmodified - the modified statepublic java.lang.String getText()
getText in interface IRichTextpublic void setText(java.lang.String text)
setText in interface IRichTexttext - the rich text content formatted in a markup languagepublic void restoreText()
restoreText in interface IRichTextpublic java.lang.String getSelectedText()
getSelectedText in interface IRichText"" if there is no selectionpublic java.lang.Object getData(java.lang.String key)
getData in interface IRichTextkey - the name of the property
null if it has not
been set
public void setData(java.lang.String key,
java.lang.Object value)
setData in interface IRichTextkey - the name of the propertyvalue - the property valuepublic int executeCommand(java.lang.String command)
RichTextCommand.
- Specified by:
executeCommand in interface IRichText
- Parameters:
command - a rich text command string.
- Returns:
- a status code returned by the executed command
public int executeCommand(java.lang.String command,
java.lang.String param)
RichTextCommand.
- Specified by:
executeCommand in interface IRichText
- Parameters:
command - a rich text command stringparam - a parameter for the command or null
- Returns:
- a status code returned by the executed command
public int executeCommand(java.lang.String command,
java.lang.String[] params)
RichTextCommand.
- Specified by:
executeCommand in interface IRichText
- Parameters:
command - a rich text command stringparams - an array of parameters for the command or null
- Returns:
- a status code returned by the executed command
public void dispose()
dispose in interface IRichTextpublic boolean isDisposed()
isDisposed in interface IRichTexttrue if this control is disposed successfullypublic java.util.Iterator getModifyListeners()
getModifyListeners in interface IRichTextpublic void addKeyListener(org.eclipse.swt.events.KeyListener listener)
addKeyListener in interface IRichTextlistener - the listener which should be notifiedpublic void removeKeyListener(org.eclipse.swt.events.KeyListener listener)
removeKeyListener in interface IRichTextlistener - the listener which should no longer be notifiedpublic void addModifyListener(org.eclipse.swt.events.ModifyListener listener)
addModifyListener in interface IRichTextlistener - the listener which should be notifiedpublic void removeModifyListener(org.eclipse.swt.events.ModifyListener listener)
removeModifyListener in interface IRichTextlistener - the listener which should no longer be notifiedpublic void addDisposeListener(org.eclipse.swt.events.DisposeListener listener)
addDisposeListener in interface IRichTextlistener - the listener which should be notifiedpublic void removeDisposeListener(org.eclipse.swt.events.DisposeListener listener)
removeDisposeListener in interface IRichTextlistener - the listener which should no longer be notifiedpublic void addHelpListener(org.eclipse.swt.events.HelpListener listener)
addHelpListener in interface IRichTextlistener - the listener which should be notifiedpublic void removeHelpListener(org.eclipse.swt.events.HelpListener listener)
removeHelpListener in interface IRichTextlistener - the listener which should no longer be notified
public void addListener(int eventType,
org.eclipse.swt.widgets.Listener listener)
addListener in interface IRichTexteventType - the type of event to listen forlistener - the listener which should be notified when the event occurs
public void removeListener(int eventType,
org.eclipse.swt.widgets.Listener listener)
removeListener in interface IRichTexteventType - the type of event to listen forlistener - the listener which should no longer be notified when the event
occurspublic java.util.Iterator getListeners()
getListeners in interface IRichTextpublic void notifyModifyListeners()
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||