| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Objectorg.tigris.swidgets.Orientationorg.tigris.swidgets.Horizontalpublic class Horizontalextends OrientationOrientation. The
Singleton pattern is used to ensure that only one instance of this
class can exist.
Horizontal treats length as width, breadth as height
and position as x.
HORIZONTAL
A
|
position = y
|
V
+-------------+ A +-------------+ A
| | | | | |
<--position--> | | breadth = height | | length =
= x | | | | | |height
+-------------+ V +-------------+ V
<-- length--> <--breadth-->
= width = width
Constructor Summary | |
Method Summary | |
Dimension |
|
Dimension |
|
Dimension |
|
Point |
|
Point |
|
Point |
|
int |
|
int |
|
Cursor |
|
ArrowButton |
|
int |
|
static Orientation |
|
int |
|
int |
|
int |
|
int |
|
int |
|
Orientation |
|
int |
|
int |
|
int |
|
ArrowButton |
|
Point |
|
Dimension |
|
Dimension |
|
Dimension |
|
Dimension |
|
Point |
|
Point |
|
Point |
|
Point |
|
Dimension |
|
Dimension |
|
Dimension |
|
Methods inherited from class org.tigris.swidgets.Orientation | |
addLength, addLength, addLength, addToPosition, addToPosition, addToPosition, getBreadth, getBreadth, getCursor, getEndArrowButton, getFirstUsableOffset, getLastUsablePosition, getLength, getLength, getLengthMinusInsets, getOffset, getPerpendicular, getPosition, getPosition, getPosition, getStartArrowButton, newPoint, setBreadth, setBreadth, setLength, setLength, setPosition, subtractFromPosition, subtractFromPosition, subtractFromPosition, subtractLength, subtractLength, subtractLength | |
public Dimension addLength(Dimension original,
Component add)Create a newDimensionfrom an existingDimensionwith its length increased by the length of aComponent.
- Overrides:
- addLength in interface Orientation
- Returns:
- The resulting
Dimension.
public Dimension addLength(Dimension original,
Dimension add)Create a newDimensionfrom an existingDimensionwith its length increased by the length of anotherDimension.
- Overrides:
- addLength in interface Orientation
- Returns:
- The resulting
Dimension.
public Dimension addLength(Dimension original,
int add)Create a newDimensionfrom an existingDimensionwith its length increased by a given value.
- Overrides:
- addLength in interface Orientation
- Returns:
- The resulting
Dimension.
public Point addToPosition(Point original,
Component add)Create a newPointfrom an existingPointwith its length increased by the length of aComponent.
- Overrides:
- addToPosition in interface Orientation
- Returns:
- The resulting
Point.
public Point addToPosition(Point original,
Dimension add)Create a newPointfrom an existingPointwith its length increased by the length of aDimension.
- Overrides:
- addToPosition in interface Orientation
- Returns:
- The resulting
Point.
public Point addToPosition(Point original,
int add)Create a newPointfrom an existingPointwith its position increased by a given value.
- Overrides:
- addToPosition in interface Orientation
- Returns:
- The resulting
Point.
public int getBreadth(Component comp)
Get the breadth of aComponent.
- Overrides:
- getBreadth in interface Orientation
- Returns:
- The breadth of the
Component.
public int getBreadth(Dimension dim)
Get the breadth of aDimension.
- Overrides:
- getBreadth in interface Orientation
- Returns:
- The breadth of the
Dimension.
public Cursor getCursor()
Get a cursor object pointing in the same direction as the orientation.
- Overrides:
- getCursor in interface Orientation
- Returns:
- The resulting
Cursor.
public ArrowButton getEndArrowButton()
Get an arrow button pointing to the end of the orientation.
- Overrides:
- getEndArrowButton in interface Orientation
- Returns:
- The resulting
ArrowButton.
public int getFirstUsableOffset(Container cont)
Determines the first usable offset in aContainer. This takes into account theInsetsof theContainer.
- Overrides:
- getFirstUsableOffset in interface Orientation
- Returns:
- The offset of the
Container.
public static Orientation getInstance()
Get an instance of aHorizontalobject.
- Returns:
- An instance of
Orientation.
public int getLastUsablePosition(Container cont)
Determines the last usable position in aContainer. This takes into account theInsetsof theContainer.
- Overrides:
- getLastUsablePosition in interface Orientation
- Returns:
- The offset of the
Container.
public int getLength(Component comp)
Get the length of aComponent.
- Overrides:
- getLength in interface Orientation
- Returns:
- The length of the
Component.
public int getLength(Dimension dim)
Get the length of aDimension.
- Overrides:
- getLength in interface Orientation
- Returns:
- The length of the
Dimension.
public int getLengthMinusInsets(Container cont)
Get the usable length of aContainerminus itsinsets.
- Overrides:
- getLengthMinusInsets in interface Orientation
- Returns:
- The length of the
Component.
public int getOffset(Point point)
Get the offset of aComponent.
- Overrides:
- getOffset in interface Orientation
- Returns:
- The position of the
Component.
public Orientation getPerpendicular()
Get an instance of anOrientationperpendicular to this instance. If called on a horizontal instance then a vertical instance is returned. If called on a vertical instance then a horizontal instance is returned.
- Overrides:
- getPerpendicular in interface Orientation
- Returns:
- A vertical or horizontal orientation.
public int getPosition(Component comp)
Get the position of aComponent.
- Overrides:
- getPosition in interface Orientation
- Returns:
- The position of the
Component.
public int getPosition(MouseEvent me)
Get the position of aMouseEvent.
- Overrides:
- getPosition in interface Orientation
- Returns:
- The position of the
MouseEvent.
public int getPosition(Point point)
Get the position of aPoint.
- Overrides:
- getPosition in interface Orientation
- Returns:
- The position of the
Point.
public ArrowButton getStartArrowButton()
Get an arrow button pointing to the start of the orientation.
- Overrides:
- getStartArrowButton in interface Orientation
- Returns:
- The resulting
ArrowButton.
public Point newPoint(int position,
int offset)Generate a newPointobject from position and offset values.
- Overrides:
- newPoint in interface Orientation
- Returns:
- The newly created
Pointobject.
public Dimension setBreadth(Dimension original,
Dimension breadth)Create a newDimensionfrom an existingDimensionwith its breadth changed to the breadth of another givenDimension.
- Overrides:
- setBreadth in interface Orientation
- Returns:
- The resulting
Dimension.
public Dimension setBreadth(Dimension original,
int breadth)Create a newDimensionfrom an existingDimensionwith its breadth changed to a given value.
- Overrides:
- setBreadth in interface Orientation
- Returns:
- The resulting
Dimension.
public Dimension setLength(Dimension original,
Dimension length)Create a newDimensionfrom an existingDimensionwith its length changed to the length of another givenDimension.
- Overrides:
- setLength in interface Orientation
- Returns:
- The resulting
Dimension.
public Dimension setLength(Dimension original,
int length)Create a newDimensionfrom an existingDimensionwith its length changed to a given value.
- Overrides:
- setLength in interface Orientation
- Returns:
- The resulting
Dimension.
public Point setPosition(Point original,
int position)Create a newPointfrom an existingPointwith its position changed to a given value.
- Overrides:
- setPosition in interface Orientation
- Returns:
- The resulting
Point.
public Point subtractFromPosition(Point original,
Component subtract)Create a newPointfrom an existingPointwith its length decreased by the length of aComponent.
- Overrides:
- subtractFromPosition in interface Orientation
- Returns:
- The resulting
Point.
public Point subtractFromPosition(Point original,
Dimension subtract)Create a newPointfrom an existingPointwith its length decreased by the length of aDimension.
- Overrides:
- subtractFromPosition in interface Orientation
- Returns:
- The resulting
Point.
public Point subtractFromPosition(Point original,
int subtract)Create a newPointfrom an existingPointwith its position decreased by a given value.
- Overrides:
- subtractFromPosition in interface Orientation
- Returns:
- The resulting
Point.
public Dimension subtractLength(Dimension original,
Component subtract)Create a newDimensionfrom an existingDimensionwith its length decreased by the length of aComponent.
- Overrides:
- subtractLength in interface Orientation
- Returns:
- The resulting
Dimension.
public Dimension subtractLength(Dimension original,
Dimension subtract)Create a newDimensionfrom an existingDimensionwith its length decreased by the length of anotherDimension.
- Overrides:
- subtractLength in interface Orientation
- Returns:
- The resulting
Dimension.
public Dimension subtractLength(Dimension original,
int subtract)Create a newDimensionfrom an existingDimensionwith its length decreased by a given value.
- Overrides:
- subtractLength in interface Orientation
- Returns:
- The resulting
Dimension.