|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Object
|
+--org.argouml.swingext.Orientation
|
+--org.argouml.swingext.Horizontal
A horizontal implementation of Orientation. 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
| Field Summary | |
|---|---|
private static Horizontal |
horizontal
|
| Constructor Summary | |
|---|---|
protected |
Horizontal()
|
| Method Summary | |
|---|---|
java.awt.Dimension |
addLength(java.awt.Dimension original,
java.awt.Component add)
Create a new Dimension from an existing
Dimension with its length increased by the length
of a Component. |
java.awt.Dimension |
addLength(java.awt.Dimension original,
java.awt.Dimension add)
Create a new Dimension from an existing
Dimension with its length increased by the length
of another Dimension. |
java.awt.Dimension |
addLength(java.awt.Dimension original,
int add)
Create a new Dimension from an existing
Dimension with its length increased by a given
value. |
java.awt.Point |
addToPosition(java.awt.Point original,
java.awt.Component add)
Create a new Point from an existing
Point with its length increased by the length of a
Component. |
java.awt.Point |
addToPosition(java.awt.Point original,
java.awt.Dimension add)
Create a new Point from an existing
Point with its length increased by the length of a
Dimension. |
java.awt.Point |
addToPosition(java.awt.Point original,
int add)
Create a new Point from an existing
Point with its position increased by a given
value. |
int |
getBreadth(java.awt.Component comp)
Get the breadth of a Component. |
int |
getBreadth(java.awt.Dimension dim)
Get the breadth of a Dimension. |
java.awt.Cursor |
getCursor()
Get a cursor object pointing in the same direction as the orientation. |
ArrowButton |
getEndArrowButton()
Get an arrow button pointing to the end of the orientation. |
int |
getFirstUsableOffset(java.awt.Container cont)
Determines the first usable offset in a Container. |
static Orientation |
getInstance()
Get an instance of a Horizontal object. |
int |
getLastUsablePosition(java.awt.Container cont)
Determines the last usable position in a Container. |
int |
getLength(java.awt.Component comp)
Get the length of a Component. |
int |
getLength(java.awt.Dimension dim)
Get the length of a Dimension. |
int |
getLengthMinusInsets(java.awt.Container cont)
Get the usable length of a Container minus its
insets. |
int |
getOffset(java.awt.Point point)
Get the offset of a Component. |
Orientation |
getPerpendicular()
Get an instance of an Orientation perpendicular to
this instance. |
int |
getPosition(java.awt.Component comp)
Get the position of a Component. |
int |
getPosition(java.awt.event.MouseEvent me)
Get the position of a MouseEvent. |
int |
getPosition(java.awt.Point point)
Get the position of a Point. |
ArrowButton |
getStartArrowButton()
Get an arrow button pointing to the start of the orientation. |
java.awt.Point |
newPoint(int position,
int offset)
Generate a new Point object from position and offset values. |
java.awt.Dimension |
setBreadth(java.awt.Dimension original,
java.awt.Dimension breadth)
Create a new Dimension from an existing
Dimension with its breadth changed to the breadth
of another given Dimension. |
java.awt.Dimension |
setBreadth(java.awt.Dimension original,
int breadth)
Create a new Dimension from an existing
Dimension with its breadth changed to a given
value. |
java.awt.Dimension |
setLength(java.awt.Dimension original,
java.awt.Dimension length)
Create a new Dimension from an existing
Dimension with its length changed to the length of
another given Dimension. |
java.awt.Dimension |
setLength(java.awt.Dimension original,
int length)
Create a new Dimension from an existing
Dimension with its length changed to a given
value. |
java.awt.Point |
setPosition(java.awt.Point original,
int position)
Create a new Point from an existing
Point with its position changed to a given value. |
java.awt.Point |
subtractFromPosition(java.awt.Point original,
java.awt.Component subtract)
Create a new Point from an existing
Point with its length decreased by the length of a
Component. |
java.awt.Point |
subtractFromPosition(java.awt.Point original,
java.awt.Dimension subtract)
Create a new Point from an existing
Point with its length decreased by the length of a
Dimension. |
java.awt.Point |
subtractFromPosition(java.awt.Point original,
int subtract)
Create a new Point from an existing
Point with its position decreased by a given
value. |
java.awt.Dimension |
subtractLength(java.awt.Dimension original,
java.awt.Component subtract)
Create a new Dimension from an existing
Dimension with its length decreased by the length
of a Component. |
java.awt.Dimension |
subtractLength(java.awt.Dimension original,
java.awt.Dimension subtract)
Create a new Dimension from an existing
Dimension with its length decreased by the length
of another Dimension. |
java.awt.Dimension |
subtractLength(java.awt.Dimension original,
int subtract)
Create a new Dimension from an existing
Dimension with its length decreased by a given
value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final Horizontal horizontal
| Constructor Detail |
protected Horizontal()
| Method Detail |
public static Orientation getInstance()
Horizontal object.
Orientation.public Orientation getPerpendicular()
Orientation perpendicular 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.
getPerpendicular in class Orientationpublic int getLength(java.awt.Dimension dim)
Dimension.
getLength in class Orientationdim - The Dimension of which to determine
the length
Dimension.public int getLength(java.awt.Component comp)
Component.
getLength in class Orientationcomp - The Component of which to
determine the length
Component.public int getLengthMinusInsets(java.awt.Container cont)
Container minus its
insets.
getLengthMinusInsets in class Orientationcont - The Container of which to
determine the length
Component.public int getBreadth(java.awt.Dimension dim)
Dimension.
getBreadth in class Orientationdim - The Dimension of which to determine
the breadth
Dimension.public int getBreadth(java.awt.Component comp)
Component.
getBreadth in class Orientationcomp - The Component of which to
determine the breadth
Component.public int getPosition(java.awt.Point point)
Point.
getPosition in class Orientationpoint - The Point of which to determine
the position
Point.public int getPosition(java.awt.Component comp)
Component.
getPosition in class Orientationcomp - The Component of which to
determine the position
Component.public int getOffset(java.awt.Point point)
Component.
getOffset in class Orientationpoint - The Component of which to
determine the offset.
Component.public int getLastUsablePosition(java.awt.Container cont)
Container. This takes into account the
Insets of the Container.
getLastUsablePosition in class Orientationcont - the Container from which to
determine the last usable position.
Container.public int getFirstUsableOffset(java.awt.Container cont)
Container. This takes into account the
Insets of the Container.
getFirstUsableOffset in class Orientationcont - the Container from which to
determine the first usable position.
Container.
public java.awt.Point newPoint(int position,
int offset)
Point object from position and offset values.
newPoint in class Orientationposition - the required position of the new Point.offset - the required offset of the new Point.
Point object.public int getPosition(java.awt.event.MouseEvent me)
MouseEvent.
getPosition in class Orientationme - The MouseEvent of which to determine
the position
MouseEvent.
public java.awt.Dimension addLength(java.awt.Dimension original,
int add)
Dimension from an existing
Dimension with its length increased by a given
value.
addLength in class Orientationoriginal - The Dimension to be added to.add - The amount to add to the Dimension.
Dimension.
public java.awt.Dimension addLength(java.awt.Dimension original,
java.awt.Dimension add)
Dimension from an existing
Dimension with its length increased by the length
of another Dimension.
addLength in class Orientationoriginal - The Dimension to be added to.add - The Dimension whose length is to be
taken as the added value.
Dimension.
public java.awt.Dimension addLength(java.awt.Dimension original,
java.awt.Component add)
Dimension from an existing
Dimension with its length increased by the length
of a Component.
addLength in class Orientationoriginal - The Dimension to be added to.add - The Component whose length is to be
taken as the added value.
Dimension.
public java.awt.Dimension subtractLength(java.awt.Dimension original,
int subtract)
Dimension from an existing
Dimension with its length decreased by a given
value.
subtractLength in class Orientationoriginal - The Dimension to be subtracted from.subtract - The amount to subtract from the
Dimension.
Dimension.
public java.awt.Dimension subtractLength(java.awt.Dimension original,
java.awt.Dimension subtract)
Dimension from an existing
Dimension with its length decreased by the length
of another Dimension.
subtractLength in class Orientationoriginal - The Dimension to be subtracted from.subtract - The Dimension whose length is
to be taken as the subtracted value.
Dimension.
public java.awt.Dimension subtractLength(java.awt.Dimension original,
java.awt.Component subtract)
Dimension from an existing
Dimension with its length decreased by the length
of a Component.
subtractLength in class Orientationoriginal - The Dimension to be subtracted from.subtract - The Component whose length is
to be taken as the subtracted value.
Dimension.
public java.awt.Point addToPosition(java.awt.Point original,
int add)
Point from an existing
Point with its position increased by a given
value.
addToPosition in class Orientationoriginal - The Point to be added to.add - The amount to add to the Point.
Point.
public java.awt.Point addToPosition(java.awt.Point original,
java.awt.Dimension add)
Point from an existing
Point with its length increased by the length of a
Dimension.
addToPosition in class Orientationoriginal - The Point to be added to.add - The Dimension whose length is to be
taken as the added value.
Point.
public java.awt.Point addToPosition(java.awt.Point original,
java.awt.Component add)
Point from an existing
Point with its length increased by the length of a
Component.
addToPosition in class Orientationoriginal - The Point to be added to.add - The Dimension whose length is to be
taken as the added value.
Point.
public java.awt.Point subtractFromPosition(java.awt.Point original,
int subtract)
Point from an existing
Point with its position decreased by a given
value.
subtractFromPosition in class Orientationoriginal - The Point to be added to.subtract - The amount to subtract to the Point.
Point.
public java.awt.Point subtractFromPosition(java.awt.Point original,
java.awt.Dimension subtract)
Point from an existing
Point with its length decreased by the length of a
Dimension.
subtractFromPosition in class Orientationoriginal - The Point to be added to.subtract - The Dimension whose length is
to be taken as the subtracted value.
Point.
public java.awt.Point subtractFromPosition(java.awt.Point original,
java.awt.Component subtract)
Point from an existing
Point with its length decreased by the length of a
Component.
subtractFromPosition in class Orientationoriginal - The Point to be added to.subtract - The Component whose length is
to be taken as the subtracted value.
Point.
public java.awt.Dimension setLength(java.awt.Dimension original,
int length)
Dimension from an existing
Dimension with its length changed to a given
value.
setLength in class Orientationoriginal - The Dimension to be added to.length - The length to assign to the new
Dimension.
Dimension.
public java.awt.Dimension setLength(java.awt.Dimension original,
java.awt.Dimension length)
Dimension from an existing
Dimension with its length changed to the length of
another given Dimension.
setLength in class Orientationoriginal - The Dimension to be added to.length - The Dimension whose length is to
be assigned to the new Dimension.
Dimension.
public java.awt.Dimension setBreadth(java.awt.Dimension original,
int breadth)
Dimension from an existing
Dimension with its breadth changed to a given
value.
setBreadth in class Orientationoriginal - The Dimension to be added to.breadth - The breadth to assign to the new
Dimension.
Dimension.
public java.awt.Dimension setBreadth(java.awt.Dimension original,
java.awt.Dimension breadth)
Dimension from an existing
Dimension with its breadth changed to the breadth
of another given Dimension.
setBreadth in class Orientationoriginal - The Dimension to be added to.breadth - The Dimension whose breadth is
to be assigned to the new Dimension.
Dimension.
public java.awt.Point setPosition(java.awt.Point original,
int position)
Point from an existing
Point with its position changed to a given value.
setPosition in class Orientationoriginal - The Point whose position is to
be modified.position - The value to assign as the new position.
Point.public java.awt.Cursor getCursor()
getCursor in class OrientationCursor.public ArrowButton getStartArrowButton()
getStartArrowButton in class OrientationArrowButton.public ArrowButton getEndArrowButton()
getEndArrowButton in class OrientationArrowButton.
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
| ArgoUML © 1996-2004 (20040306) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |