public class ScrolledFormText extends SharedScrolledComposite
The class assumes that text to be rendered contains formatting tags. In case of a string, it will enclose the text in 'form' root element if missing from the text as a convinience. For example:
ftext.setText("<p>Some text here</>");
will not cause an error. The same behavior does not exist for content from
the input stream, however - it must be well formed in that case.
FormText| Constructor and Description |
|---|
ScrolledFormText(Composite parent,
boolean createFormText)
Creates the new scrolled text instance in the provided parent
|
ScrolledFormText(Composite parent,
int style,
boolean createFormText)
Creates the new scrolled text instance in the provided parent
|
| Modifier and Type | Method and Description |
|---|---|
FormText |
getFormText()
Returns the instance of the form text.
|
void |
setBackground(Color bg)
Sets the background color of the scrolled form text.
|
void |
setContent(Control c)
The class sets the content widget.
|
void |
setContents(InputStream is)
Sets the contents to rendered in the scrolled form text.
|
void |
setForeground(Color fg)
Sets the foreground color of the scrolled form text.
|
void |
setFormText(FormText formText)
Sets the form text to be managed by this scrolled form text.
|
void |
setText(String text)
Sets the text to be rendered in the scrolled form text.
|
isDelayedReflow, layout, reflow, setDelayedReflow, setExpandHorizontal, setExpandVertical, setFocus, setFontgetAlwaysShowScrollBars, getContent, getExpandHorizontal, getExpandVertical, getMinHeight, getMinWidth, getOrigin, setAlwaysShowScrollBars, setLayout, setMinHeight, setMinSize, setMinSize, setMinWidth, setOrigin, setOriginchanged, checkSubclass, computeSize, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, setBackgroundMode, setLayoutDeferred, setTabListcomputeTrim, getClientArea, getHorizontalBar, getVerticalBaraddControlListener, addFocusListener, addHelpListener, addKeyListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addPaintListener, addTraverseListener, computeSize, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removePaintListener, removeTraverseListener, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setEnabled, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, updateaddDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toStringpublic ScrolledFormText(Composite parent, boolean createFormText)
parent - the parent compositecreateFormText - if true, enclosing form text instance will be
created in this constructor.public ScrolledFormText(Composite parent, int style, boolean createFormText)
parent - the parent compositestyle - the style to pass to the scrolled compositecreateFormText - if true, enclosing form text instance will be
created in this constructor.public void setFormText(FormText formText)
false must be passed in either of the constructors to
avoid creating form text instance.formText - the form text instance to use.public void setForeground(Color fg)
setForeground in class SharedScrolledCompositefg - the foreground colorpublic void setBackground(Color bg)
setBackground in class SharedScrolledCompositebg - the background colorpublic final void setContent(Control c)
setContent in class SharedScrolledCompositec - content controlpublic void setText(String text)
text - the text to be renderedpublic void setContents(InputStream is)
is - content input streampublic FormText getFormText()
Guidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.