|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface JET2Writer
Protocol for content writing in JET2 templates.
This interface is not intended to be implemented by clients.
Method Summary | |
---|---|
void |
addEventListener(java.lang.String category,
IWriterListener listener)
Add a listener to the writer life cycle events. |
void |
addPosition(java.lang.String category,
org.eclipse.jface.text.Position position)
Deprecated. Use BufferedJET2Writer.getAdapter(Class) to return an IDocument, and then
use IDocument.addPosition(String, Position) . |
void |
addPositionCategory(java.lang.String category)
Deprecated. Use BufferedJET2Writer.getAdapter(Class) to return an IDocument, and then
use IDocument.addPositionCategory(String) . |
org.eclipse.jface.text.IDocument |
getDocument()
Deprecated. Use BufferedJET2Writer . |
IWriterListener[] |
getEventListeners()
Return the registered writer event listeners |
int |
getLength()
Deprecated. Use BufferedJET2Writer.getContentLength() |
JET2Writer |
getParentWriter()
Return the parent of this writer, if it was created via newNestedContentWriter() . |
org.eclipse.jface.text.Position[] |
getPositions(java.lang.String category)
Deprecated. Use BufferedJET2Writer.getAdapter(Class) to return an IDocument, and then
use IDocument.getPositions(String) . |
JET2Writer |
newNestedContentWriter()
Create a writer for handling nested content. |
void |
replace(int offset,
int length,
java.lang.String text)
Deprecated. Use BufferedJET2Writer.replaceContent(int, int, String) . |
void |
write(boolean b)
Write the passed boolean by calling String.valueOf(boolean) . |
void |
write(char c)
Write the passed character by calling String.valueOf(char) . |
void |
write(char[] data)
Write the passed character array by calling String.valueOf(char[]) . |
void |
write(double d)
Write the passed double value by calling String.valueOf(double) . |
void |
write(float f)
Write the passed float value by calling String.valueOf(float) . |
void |
write(int i)
Write the passed integer by calling String.valueOf(int) . |
void |
write(JET2Writer bodyContent)
Write the contents of the passed writer to this writer. |
void |
write(long l)
Write the passed long value calling String.valueOf(long) . |
void |
write(java.lang.Object obj)
Write the pass object by calling Object.toString() . |
void |
write(java.lang.String string)
Write the passed string. |
Method Detail |
---|
void write(java.lang.String string)
string
- a string value.void write(JET2Writer bodyContent)
bodyContent
- a writervoid write(boolean b)
String.valueOf(boolean)
.
b
- a boolean valuevoid write(char c)
String.valueOf(char)
.
c
- a char valuevoid write(char[] data)
String.valueOf(char[])
.
data
- an array of charactersvoid write(double d)
String.valueOf(double)
.
d
- a double valuevoid write(float f)
String.valueOf(float)
.
f
- a float valuevoid write(int i)
String.valueOf(int)
.
i
- an integer valuevoid write(long l)
String.valueOf(long)
.
l
- a long value.void write(java.lang.Object obj)
Object.toString()
.
obj
- an object.JET2Writer newNestedContentWriter()
BufferedJET2Writer
JET2Writer getParentWriter()
newNestedContentWriter()
.
null
.int getLength()
BufferedJET2Writer.getContentLength()
org.eclipse.jface.text.IDocument getDocument()
BufferedJET2Writer
.
void addEventListener(java.lang.String category, IWriterListener listener)
newNestedContentWriter()
, then the listener is added
to the root writer, rather than the listener itself.
category
- the listener categorylistener
- a listener
java.lang.NullPointerException
- if listener is null
.IWriterListener[] getEventListeners()
void addPositionCategory(java.lang.String category)
BufferedJET2Writer.getAdapter(Class)
to return an IDocument, and then
use IDocument.addPositionCategory(String)
.
category
- a Position Category
java.lang.IllegalArgumentException
- wrapping a BadPositionCategoryException
IDocument.addPositionCategory(java.lang.String)
void addPosition(java.lang.String category, org.eclipse.jface.text.Position position)
BufferedJET2Writer.getAdapter(Class)
to return an IDocument, and then
use IDocument.addPosition(String, Position)
.
BadPositionCategoryException
or
BadLocationException
is wrapped in a
a runtime exception.
category
- a position categoryposition
- a position
WriterPositionException
- wrapping a BadPositionCategoryException
or BadLocationException
IDocument.addPosition(java.lang.String, org.eclipse.jface.text.Position)
org.eclipse.jface.text.Position[] getPositions(java.lang.String category)
BufferedJET2Writer.getAdapter(Class)
to return an IDocument, and then
use IDocument.getPositions(String)
.
BadPositionCategoryException
is wrapped in a runtime exception.
category
- a position category
WriterPositionException
- wrapping a BadPositionCategoryException
IDocument.getPositions(java.lang.String)
void replace(int offset, int length, java.lang.String text)
BufferedJET2Writer.replaceContent(int, int, String)
.
BadLocationException
is wrapped in a runtime exception.
offset
- the offset of the text to replacelength
- the length of the text to replacetext
- the replacement text
WriterPositionException
- wrapping a BadLocationException
IDocument.replace(int, int, java.lang.String)
|
Copyright 2006 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |