Class StyledTextPrint
- java.lang.Object
-
- org.eclipse.nebula.paperclips.core.text.StyledTextPrint
-
-
Constructor Summary
Constructors Constructor Description StyledTextPrint()Constructs a new StyledTextPrint.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StyledTextPrintappend(java.lang.String text)Appends the given text to the end of the document, using the default style.StyledTextPrintappend(java.lang.String text, TextStyle style)Appends the given text to the end of the document, using the given style.StyledTextPrintappend(Print element)Appends the given element to the document.booleanequals(java.lang.Object obj)inthashCode()PrintIteratoriterator(org.eclipse.swt.graphics.Device device, org.eclipse.swt.graphics.GC gc)Returns a PrintIterator for laying out the contents of this Print.StyledTextPrintnewline()Appends a line break to the document.StyledTextPrintsetStyle(TextStyle style)Sets the text style that will be applied to text added through theappend(String)
-
-
-
Method Detail
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
setStyle
public StyledTextPrint setStyle(TextStyle style)
Sets the text style that will be applied to text added through theappend(String)- Parameters:
style- the new text style.- Returns:
- this StyledTextPrint, for chaining method calls.
-
append
public StyledTextPrint append(java.lang.String text)
Appends the given text to the end of the document, using the default style. This method is equivalent to calling append(text, getStyle()).- Parameters:
text- the text to append.- Returns:
- this StyledTextPrint, for chaining method calls.
-
append
public StyledTextPrint append(java.lang.String text, TextStyle style)
Appends the given text to the end of the document, using the given style.- Parameters:
text- the text to append.style- the text style.- Returns:
- this StyledTextPrint, for chaining method calls.
-
newline
public StyledTextPrint newline()
Appends a line break to the document. If a line break produces a blank line, that line will take the height of the font in the default text style.- Returns:
- this StyledTextPrint, for chaining method calls.
-
append
public StyledTextPrint append(Print element)
Appends the given element to the document.- Parameters:
element- the element to append.- Returns:
- this StyledTextPrint, for chaining method calls.
-
iterator
public PrintIterator iterator(org.eclipse.swt.graphics.Device device, org.eclipse.swt.graphics.GC gc)
Description copied from interface:PrintReturns a PrintIterator for laying out the contents of this Print. The iterator uses a snapshot of the print at the time this method is invoked, so subsequent changes to the Print will not affect the output of the iterator.
-
-