|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.xoetrope.optional.layout.Guide
public class Guide
A container fro information about an individual guide
Copyright (c) Xoetrope Ltd., 2002-2005
$Revision: 1.5 $
License: see License.txt
| Field Summary | |
|---|---|
static int |
ABSOLUTE_COORDINATES
The coordinate is specified in absolute terms (pixels) |
static int |
ABSOLUTE_POSITION
The position is specified in terms of the parent's size |
protected int |
coordinates
the type of coordinate system used |
protected int |
id
the id of this guide |
protected boolean |
isVertical
Is the guie vertical? |
protected int |
maxExtent
the maximum absolute position |
protected double |
maxPosition
the max allowable position |
protected double |
minPosition
the minimum allowed position |
protected double |
position
the position value |
protected int |
positioning
the type of positioning used |
protected Guide |
previousGuide
a reference to a previous guide |
static int |
RELATIVE_COORDINATES
The coordinate is specified in relative terms (percentage of the parent's size) |
static int |
RELATIVE_POSITION
The position is specified as a distance from the previous guide |
protected int |
snapRange
the range within which snapping to this guide occurs |
| Constructor Summary | |
|---|---|
Guide(double pos,
int guideId,
int max,
boolean isVert)
Creates a new instance of XGuide using relative coordinates |
|
Guide(int pos,
int guideId,
int max,
boolean isVert)
Creates a new instance of XGuide using relative coordinates |
|
| Method Summary | |
|---|---|
int |
compareTo(java.lang.Object obj)
Compares to objects |
boolean |
equals(java.lang.Object obj)
Check for equality |
int |
getAbsoluteCoordinates()
Get the coordinates in absolute coordinates |
int |
getAbsolutePosition()
Get the absolute position in absolute coordinates |
int |
getCoordinates()
Get the flag indicating the type of coordinate system used |
int |
getId()
Get the ID of this guide |
boolean |
getIsVertical()
Get the flag indicating the orientation of this guide |
int |
getMaxExtent()
Get the maximum absolute position of the guide or the dimension against which scaling ratios are calculated |
double |
getMaxPosition()
Get the maimum allowable position of the guide. |
double |
getMinPosition()
Get the minimum allowable location of the guide |
double |
getPosition()
Get the position or offset of the guide, depending on the type of positioning. |
int |
getPositioning()
Get the position of this component |
Guide |
getPreviousGuide()
Get the previous guide. |
int |
getSnapRange()
Get the pixel range within which a component will snap to the guide |
void |
setAbsolutePosition(int newPos)
Set the new position of the guide |
void |
setCoordinates(int c)
Set the flag indicating the type of coordinate system used |
void |
setId(int i)
Set the ID of this guide |
void |
setMaxExtent(int extent)
Set the maximum absolute position of the guide or the dimension against which scaling ratios are calculated |
void |
setPosition(double pos)
Set the position or offset of the guide, depending on the type of positioning. |
void |
setPositioning(int p)
Set the position of this component |
void |
setPreviousGuide(Guide prevGuide)
Set the previous guide. |
void |
useAbsolutePosition()
Get the absolute position in absolute coordinates |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int ABSOLUTE_COORDINATES
public static final int RELATIVE_COORDINATES
public static final int ABSOLUTE_POSITION
public static final int RELATIVE_POSITION
protected boolean isVertical
protected int positioning
protected int coordinates
protected double position
protected double minPosition
protected double maxPosition
protected int maxExtent
protected int snapRange
protected int id
protected Guide previousGuide
| Constructor Detail |
|---|
public Guide(int pos,
int guideId,
int max,
boolean isVert)
guideId - the idmax - the maximum positionisVert - true if the guide is verticalpos - the relative coordinate/offset
public Guide(double pos,
int guideId,
int max,
boolean isVert)
guideId - the guide idmax - the maximum positionisVert - true if the guide is verticalpos - the relative coordinate/offset| Method Detail |
|---|
public void setPreviousGuide(Guide prevGuide)
prevGuide - the previous guide referencepublic Guide getPreviousGuide()
public int getAbsoluteCoordinates()
public int getAbsolutePosition()
public void setAbsolutePosition(int newPos)
newPos - the new absolute position in absolute coordinatespublic void useAbsolutePosition()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object to compare
public int compareTo(java.lang.Object obj)
compareTo in interface java.lang.Comparableobj - the object to compare
public boolean getIsVertical()
public int getPositioning()
public int getCoordinates()
public double getPosition()
public double getMinPosition()
public double getMaxPosition()
public int getMaxExtent()
public int getSnapRange()
public int getId()
public void setPosition(double pos)
pos - location or offset of the guidepublic void setPositioning(int p)
p - ABSOLUTE_POSITION for an absolute position in pixels or RELATIVE_POSITION
for a position relative to some other guidepublic void setCoordinates(int c)
c - ABSOLUTE_COORDINATES for coordinates in pixels, or RELATIVE_COORDINATES
for coordinates expressed in terms of the page size (width or height)public void setId(int i)
i - the idpublic void setMaxExtent(int extent)
extent - the maximum dimension (size or width normally)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||