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, setFont
getAlwaysShowScrollBars, getContent, getExpandHorizontal, getExpandVertical, getMinHeight, getMinWidth, getOrigin, getShowFocusedControl, setAlwaysShowScrollBars, setLayout, setMinHeight, setMinSize, setMinSize, setMinWidth, setOrigin, setOrigin, setShowFocusedControl, showControl
changed, checkSubclass, computeSize, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, setLayoutDeferred, setTabList
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
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.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()
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.