|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.paperclips.ColumnPrint
public class ColumnPrint
A wrapper Print which splits its child print into multiple columns.
This class is horizontally greedy. Greedy prints take up all the available space on the page.
ColumnPrint attempts to use the minimum possible vertical space on the page if isCompressed() returns true (the default). This behavior can be disabled by calling setCompressed(false).
Constructor Summary | |
---|---|
ColumnPrint(Print target,
int columns,
int spacing)
Constructs a ColumnPrint with the given target, number of columns, and column spacing (expressed in points). |
|
ColumnPrint(Print target,
int columns,
int spacing,
boolean compressed)
Constructs a ColumnPrint with the given target, column count, column spacing, and compression. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
int |
getColumnCount()
Returns the number of columns per page. |
int |
getColumnSpacing()
Returns the spacing between columns, in points. |
Print |
getTarget()
Returns the target print being split into columns. |
int |
hashCode()
|
boolean |
isCompressed()
Returns whether the columns are compressed to the smallest possible height on the last page. |
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. |
void |
setCompressed(boolean compressed)
Sets whether the columns are compressed to the smallest possible height on the last page. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ColumnPrint(Print target, int columns, int spacing)
target
- the print which will be split into columns.columns
- the number of columns to displayspacing
- the spacing between each column.public ColumnPrint(Print target, int columns, int spacing, boolean compressed)
target
- the print to display in columns.columns
- the number of columns to display.spacing
- the spacing between each column, expressed in points. 72
points = 1".compressed
- whether the columns on the final page are to beMethod Detail |
---|
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public Print getTarget()
public int getColumnCount()
public int getColumnSpacing()
public boolean isCompressed()
public void setCompressed(boolean compressed)
compressed
- whether to compress the columns.public PrintIterator iterator(org.eclipse.swt.graphics.Device device, org.eclipse.swt.graphics.GC gc)
Print
iterator
in interface Print
device
- the graphics device this Print will be drawn onto.gc
- the graphics context to be used for calculating layout and
drawing the Print's contents.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |