|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.arsdigita.bebop.util.Size
A class for Bebop size parameters.
private Page buildSomePage() {
Page page = new Page("Some Page");
// Put a 10-pixel margin around the contents of this page.
page.setMargin(new Size(10));
// Or, instead, put a 10% margin around it.
page.setMargin(new Size(10, UNIT_PERCENT));
page.lock();
return page;
}
| Field Summary | |
static int |
UNIT_PERCENT
Constant for describing a component in terms of percent size relative to its container. |
static int |
UNIT_PIXEL
Constant for describing sizes in pixels. |
static String |
versionId
|
| Constructor Summary | |
|
Size(float scalar,
int unitEnum)
Construct a new Size using the type indicated in unitEnum. |
protected |
Size(float scalar,
String unitAbbreviation)
Construct a new Size. |
|
Size(int numPixels)
Construct a new Size in pixels. |
| Method Summary | |
String |
toString()
Return the size as a string. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final String versionId
public static final int UNIT_PIXEL
public static final int UNIT_PERCENT
| Constructor Detail |
protected Size(float scalar,
String unitAbbreviation)
scalar - a simple magnitude. Note that this value may
be negative.unitAbbreviation - an unit abbreviation for use when the
size is printed.public Size(int numPixels)
numPixels - a simple magnitude. Note that this value may
be negative.
public Size(float scalar,
int unitEnum)
scalar - a simple magnitude. Note that this value may be
negative.unitEnum - a unit type.| Method Detail |
public String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||