|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
The interface for a rich text control.
A rich text control is an editable user interface object that displays rich text and images.
| Field Summary | |
|---|---|
static java.lang.String |
PROPERTY_NAME
|
| 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 this 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 |
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 econtrol. |
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. |
| Field Detail |
public static final java.lang.String PROPERTY_NAME
| Method Detail |
public org.eclipse.swt.widgets.Control getControl()
public void setLayoutData(java.lang.Object layoutData)
layoutData - the layout data to setpublic java.lang.Object getLayoutData()
public void setFocus()
public boolean hasFocus()
true if this control has the user-interface focuspublic java.lang.String getBasePath()
public boolean getEditable()
true if the content is ediatblepublic void setEditable(boolean editable)
editable - the editable statepublic boolean getModified()
true if the content has been modifiedpublic void setModified(boolean modified)
modified - the modified statepublic java.lang.String getText()
public void setText(java.lang.String text)
text - the rich text content formatted in a markup languagepublic void restoreText()
public java.lang.String getSelectedText()
"" if there is no selectionpublic java.lang.Object getData(java.lang.String key)
key - the name of the property
null if it has not
been set
public void setData(java.lang.String key,
java.lang.Object value)
key - the name of the propertyvalue - the property valuepublic int executeCommand(java.lang.String command)
RichTextCommand.
- 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.
- 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.
- 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 java.util.Iterator getModifyListeners()
public void addKeyListener(org.eclipse.swt.events.KeyListener listener)
listener - the listener which should be notifiedpublic void removeKeyListener(org.eclipse.swt.events.KeyListener listener)
listener - the listener which should no longer be notifiedpublic void addModifyListener(org.eclipse.swt.events.ModifyListener listener)
listener - the listener which should be notifiedpublic void removeModifyListener(org.eclipse.swt.events.ModifyListener listener)
listener - the listener which should no longer be notifiedpublic void addDisposeListener(org.eclipse.swt.events.DisposeListener listener)
listener - the listener which should be notifiedpublic void removeDisposeListener(org.eclipse.swt.events.DisposeListener listener)
listener - the listener which should no longer be notifiedpublic void addHelpListener(org.eclipse.swt.events.HelpListener listener)
listener - the listener which should be notifiedpublic void removeHelpListener(org.eclipse.swt.events.HelpListener listener)
listener - the listener which should no longer be notified
public void addListener(int eventType,
org.eclipse.swt.widgets.Listener listener)
eventType - 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)
eventType - the type of event to listen tolistener - the listener which should no longer be notified when the event
occurspublic java.util.Iterator getListeners()
public void dispose()
public boolean isDisposed()
true if this control is disposed successfully
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||