Class LineBreakPrint
java.lang.Object
org.eclipse.nebula.paperclips.core.text.LineBreakPrint
- All Implemented Interfaces:
Print
public class LineBreakPrint extends java.lang.Object implements Print
A class for adding line breaks corresponding to a particular font size.
Currently this class is used internally by StyledTextPrint to implement the
newline() feature.
-
Field Summary
Fields Modifier and Type Field Description (package private) org.eclipse.swt.graphics.FontData
font
-
Constructor Summary
Constructors Constructor Description LineBreakPrint(org.eclipse.swt.graphics.FontData font)
Constructs a new LineBreakPrint on the given font. -
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object obj)
int
hashCode()
PrintIterator
iterator(org.eclipse.swt.graphics.Device device, org.eclipse.swt.graphics.GC gc)
Returns a PrintIterator for laying out the contents of this Print.
-
Field Details
-
font
final org.eclipse.swt.graphics.FontData font
-
-
Constructor Details
-
LineBreakPrint
public LineBreakPrint(org.eclipse.swt.graphics.FontData font)Constructs a new LineBreakPrint on the given font.- Parameters:
font
- the font which determines the height of the line break.
-
-
Method Details
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equals
in classjava.lang.Object
-
iterator
public PrintIterator iterator(org.eclipse.swt.graphics.Device device, org.eclipse.swt.graphics.GC gc)Description copied from interface:Print
Returns 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.
-