org.LexGrid.LexBIG.gui.displayResults
Class TextContent
java.lang.Object
org.LexGrid.LexBIG.gui.displayResults.TextContent
public class TextContent
- extends java.lang.Object
This class makes it easier to display formatted text in a SWT StyledText. You
can mark up your text with tags like - basic html tags - and it will
create the necessary style ranges for the StyledText object.
Supported Tags: (pre is not supported - it is just here so you can read this
from the javadocs)
<b> - bold
<i> - italic
<u> - underline
<so> - strikeout
<red> - red font color
<green> - green font color
<blue> - blue font color
- Version:
- subversion $Revision: $ checked in on $Date: $
- Author:
- Dan Armbrust
Field Summary |
protected org.eclipse.swt.graphics.Color |
black
|
protected org.eclipse.swt.graphics.Color |
blue
|
protected java.lang.String |
content
|
protected org.eclipse.swt.custom.StyleRange |
curRange
|
protected org.eclipse.swt.graphics.Color |
green
|
protected int |
nesting
|
protected int |
rangeStyle
|
protected org.eclipse.swt.graphics.Color |
red
|
protected java.util.List<org.eclipse.swt.custom.StyleRange> |
styleRanges
|
protected org.eclipse.swt.graphics.Color |
white
|
Constructor Summary |
TextContent(org.eclipse.swt.widgets.Display display)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
content
protected java.lang.String content
nesting
protected int nesting
styleRanges
protected java.util.List<org.eclipse.swt.custom.StyleRange> styleRanges
black
protected org.eclipse.swt.graphics.Color black
white
protected org.eclipse.swt.graphics.Color white
red
protected org.eclipse.swt.graphics.Color red
green
protected org.eclipse.swt.graphics.Color green
blue
protected org.eclipse.swt.graphics.Color blue
curRange
protected org.eclipse.swt.custom.StyleRange curRange
rangeStyle
protected int rangeStyle
TextContent
public TextContent(org.eclipse.swt.widgets.Display display)
getContent
public java.lang.String getContent()
- Returns:
- Returns the content.
setContent
public void setContent(java.lang.String content)
- Parameters:
content
- The content to set.
startRange
protected void startRange(int posn)
endRange
protected void endRange(int posn)
toPlainText
public java.lang.String toPlainText()
getStyleRanges
public org.eclipse.swt.custom.StyleRange[] getStyleRanges()