|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
org.eclipse.swt.custom.ScrolledComposite
org.eclipse.ui.forms.widgets.SharedScrolledComposite
org.eclipse.ui.forms.widgets.ScrolledFormText
ScrolledFormText is a control that is capable of scrolling an instance of the FormText class. It should be created in a parent that will allow it to use all the available area (for example, a shell, a view or an editor). The form text can be created by the class itself, or set from outside. In the later case, the form text instance must be a direct child of the ScrolledFormText instance.
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
Field Summary |
---|
Fields inherited from class org.eclipse.swt.widgets.Control |
---|
handle |
Constructor Summary | |
---|---|
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 |
Method Summary | |
---|---|
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. |
Methods inherited from class org.eclipse.ui.forms.widgets.SharedScrolledComposite |
---|
isDelayedReflow, layout, reflow, setDelayedReflow, setExpandHorizontal, setExpandVertical, setFocus, setFont |
Methods inherited from class org.eclipse.swt.custom.ScrolledComposite |
---|
getAlwaysShowScrollBars, getContent, getOrigin, setAlwaysShowScrollBars, setLayout, setMinHeight, setMinSize, setMinSize, setMinWidth, setOrigin, setOrigin |
Methods inherited from class org.eclipse.swt.widgets.Composite |
---|
changed, checkSubclass, computeSize, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, setLayoutDeferred, setTabList |
Methods inherited from class org.eclipse.swt.widgets.Scrollable |
---|
computeTrim, getClientArea, getHorizontalBar, getVerticalBar |
Methods inherited from class org.eclipse.swt.widgets.Widget |
---|
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public 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.Method Detail |
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 SharedScrolledComposite
fg
- the foreground colorpublic void setBackground(Color bg)
setBackground
in class SharedScrolledComposite
bg
- the background colorpublic final void setContent(Control c)
setContent
in class SharedScrolledComposite
c
- content controlpublic void setText(String text)
text
- the text to be renderedpublic void setContents(InputStream is)
is
- content input streampublic FormText getFormText()
|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.