ewe.ui.formatted
Class FormattedTextMaker
java.lang.Object
ewe.ui.formatted.FormattedTextMakerBase
ewe.ui.formatted.FormattedTextMaker
- All Implemented Interfaces:
- EventListener, ImageResolver
- public class FormattedTextMaker
- extends ewe.ui.formatted.FormattedTextMakerBase
- implements EventListener, ImageResolver
This is used to build up formatted text - via add() or parseHtml(), which
is then added to a TextDisplay.
|
Method Summary |
void |
add(char[] toAdd,
int start,
int length)
|
void |
add(String toAdd)
|
void |
addBlankLine()
|
void |
addHtml(String toAdd)
|
void |
addTo(TextDisplay pad)
|
int |
addType(TextFormatter f)
|
FormattedTextMaker.Entry |
cancel(int type)
|
void |
conditionalLineBreak()
|
FormattedTextMaker.Entry |
end(int type)
|
void |
endHtml()
|
FormattedTextMaker.Entry |
findFirst(int[] types)
|
protected Handle |
getAnImage(Object nameOrProperties,
boolean documentImage)
|
void |
lineBreak()
|
void |
linesSplit(TextDisplay pad)
|
void |
onEvent(Event ev)
|
void |
parseHtml(TextDisplay forDisplay,
String text,
Handle handle)
|
void |
removeEntry(FormattedTextMaker.Entry e)
|
void |
removeFrom(TextDisplay pad)
|
Handle |
resolveImage(PropertyList imageProperties,
boolean allowAnimatedImages,
Dimension maxSize)
Resolve the image. |
IImage |
resolveImageNow(String src,
boolean allowAnimatedImages,
Dimension maxSize,
PropertyList imageProperties)
|
void |
setFormatFlags(FormattedTextMaker.Entry myEntry,
TextFormatter tf,
FormattedTextMaker.Entry e,
boolean isFirst,
PropertyList attributes)
|
protected void |
setupHotspot(HotSpot hs)
|
FormattedTextMaker.Entry |
start(int type)
|
FormattedTextMaker.Entry |
start(int type,
PropertyList attributes)
|
FormattedTextMaker.Entry |
startOrEnd(int type,
PropertyList attributes,
boolean ending)
|
String |
valueToName(int value)
|
headerData
public PropertyList headerData
bodyData
public PropertyList bodyData
properties
public PropertyList properties
LF_ORDERED_LIST
protected static final int LF_ORDERED_LIST
- See Also:
- Constant Field Values
BOLD
public static final int BOLD
- See Also:
- Constant Field Values
ITALIC
public static final int ITALIC
- See Also:
- Constant Field Values
UNDERLINE
public static final int UNDERLINE
- See Also:
- Constant Field Values
HYPERLINK
public static final int HYPERLINK
- See Also:
- Constant Field Values
ANCHOR
public static final int ANCHOR
- See Also:
- Constant Field Values
SPAN
public static final int SPAN
- See Also:
- Constant Field Values
FONT
public static final int FONT
- See Also:
- Constant Field Values
BIG
public static final int BIG
- See Also:
- Constant Field Values
SMALL
public static final int SMALL
- See Also:
- Constant Field Values
TELETYPE
public static final int TELETYPE
- See Also:
- Constant Field Values
EM
public static final int EM
- See Also:
- Constant Field Values
STRONG
public static final int STRONG
- See Also:
- Constant Field Values
DFN
public static final int DFN
- See Also:
- Constant Field Values
IMAGE
public static final int IMAGE
- See Also:
- Constant Field Values
BLOCK_LEVEL
public static final int BLOCK_LEVEL
- See Also:
- Constant Field Values
STARTS_FRESH
public static final int STARTS_FRESH
- See Also:
- Constant Field Values
IS_PARAGRAPH
public static final int IS_PARAGRAPH
- See Also:
- Constant Field Values
CENTERED
public static final int CENTERED
- See Also:
- Constant Field Values
HEADING1
public static final int HEADING1
- See Also:
- Constant Field Values
HEADING2
public static final int HEADING2
- See Also:
- Constant Field Values
HEADING3
public static final int HEADING3
- See Also:
- Constant Field Values
HEADING4
public static final int HEADING4
- See Also:
- Constant Field Values
HEADING5
public static final int HEADING5
- See Also:
- Constant Field Values
HEADING6
public static final int HEADING6
- See Also:
- Constant Field Values
TITLE
public static final int TITLE
- See Also:
- Constant Field Values
HR
public static final int HR
- See Also:
- Constant Field Values
PARAGRAPH
public static final int PARAGRAPH
- See Also:
- Constant Field Values
DIV
public static final int DIV
- See Also:
- Constant Field Values
PREFORMAT
public static final int PREFORMAT
- See Also:
- Constant Field Values
BLOCKQUOTE
public static final int BLOCKQUOTE
- See Also:
- Constant Field Values
BLOCKIMAGE
public static final int BLOCKIMAGE
- See Also:
- Constant Field Values
ADDRESS
public static final int ADDRESS
- See Also:
- Constant Field Values
BODY
public static final int BODY
- See Also:
- Constant Field Values
TABLE
public static final int TABLE
- See Also:
- Constant Field Values
TROW
public static final int TROW
- See Also:
- Constant Field Values
TCELL
public static final int TCELL
- See Also:
- Constant Field Values
TEST
public static final int TEST
- See Also:
- Constant Field Values
UL
public static final int UL
- See Also:
- Constant Field Values
OL
public static final int OL
- See Also:
- Constant Field Values
ULI
public static final int ULI
- See Also:
- Constant Field Values
OLI
public static final int OLI
- See Also:
- Constant Field Values
DL
public static final int DL
- See Also:
- Constant Field Values
DT
public static final int DT
- See Also:
- Constant Field Values
DD
public static final int DD
- See Also:
- Constant Field Values
FormattedTextMaker
public FormattedTextMaker()
add
public void add(String toAdd)
add
public void add(char[] toAdd,
int start,
int length)
addHtml
public void addHtml(String toAdd)
lineBreak
public void lineBreak()
conditionalLineBreak
public void conditionalLineBreak()
addBlankLine
public void addBlankLine()
setupHotspot
protected void setupHotspot(HotSpot hs)
setFormatFlags
public void setFormatFlags(FormattedTextMaker.Entry myEntry,
TextFormatter tf,
FormattedTextMaker.Entry e,
boolean isFirst,
PropertyList attributes)
start
public FormattedTextMaker.Entry start(int type)
start
public FormattedTextMaker.Entry start(int type,
PropertyList attributes)
end
public FormattedTextMaker.Entry end(int type)
removeEntry
public void removeEntry(FormattedTextMaker.Entry e)
startOrEnd
public FormattedTextMaker.Entry startOrEnd(int type,
PropertyList attributes,
boolean ending)
findFirst
public FormattedTextMaker.Entry findFirst(int[] types)
cancel
public FormattedTextMaker.Entry cancel(int type)
linesSplit
public void linesSplit(TextDisplay pad)
addTo
public void addTo(TextDisplay pad)
removeFrom
public void removeFrom(TextDisplay pad)
onEvent
public void onEvent(Event ev)
- Specified by:
onEvent in interface EventListener
addType
public int addType(TextFormatter f)
getAnImage
protected Handle getAnImage(Object nameOrProperties,
boolean documentImage)
parseHtml
public void parseHtml(TextDisplay forDisplay,
String text,
Handle handle)
endHtml
public void endHtml()
resolveImage
public Handle resolveImage(PropertyList imageProperties,
boolean allowAnimatedImages,
Dimension maxSize)
- Description copied from interface:
ImageResolver
- Resolve the image.
- Specified by:
resolveImage in interface ImageResolver
- Parameters:
imageProperties - The properties for the Image. This should contain at least one property called "src".allowAnimatedImages - If this is true then animated images will be resolved into
an AnimatedIcon.maxSize - An optional limit to the size of the image returned.
- Returns:
- A Handle that can be used to monitor the progress of the resolution. When the Handle
status reports Handle.Succeeded then the returnValue of the Handle will hold the resolved
image.
resolveImageNow
public IImage resolveImageNow(String src,
boolean allowAnimatedImages,
Dimension maxSize,
PropertyList imageProperties)
valueToName
public String valueToName(int value)