Summ:  Fields Methods    Details:  Fields Methods      Class:  Constants Next
com.artfulbits.aiCharts.Enums
Class Alignment

java.lang.Object com.artfulbits.aiCharts.Enums.Alignment

Declaration: public final class Alignment extends Object

 

Represents alignment modes.

 

Since: 1.0

 

 

Fields Summary
static int CENTER
    
Element is aligned to the center disregarding orientation.
static java.lang.Integer CENTER_BOXED
    
Boxed CENTER value
static int FAR
    
Per vertical orientation, element is to be aligned to the bottom, per horizontal to the right.
static java.lang.Integer FAR_BOXED
    
Boxed FAR value
static int NEAR
    
Per vertical orientation, element is to be aligned to the top, per horizontal to the left.
static java.lang.Integer NEAR_BOXED
    
Boxed NEAR value.

 

 

Methods Summary
static int getGravity(int h, int v)
    
Combines vertical and horizontal alignments to single value.
static int getHorizontal(int gravity)
    
Gets horizontal alignment by specified combined value.
static int getVertical(int gravity)
    
Gets vertical alignment by specified combined value.
static void layoutArroundRect(XYRect centerRect, int width, int height, int hAlign, int vAlign, XYRect outRect)
    
Computes rectangle outside the specified area by specified alignments.
static void layoutInsideRect(XYRect boundsRect, int width, int height, int hAlign, int vAlign, XYRect outRect)
    
Computes rectangle inside specified area by specified alignments.

 

Methods inherited from class: java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

 

 

 

NEAR

 

public static final int NEAR

 

Per vertical orientation, element is to be aligned to the top, per horizontal to the left.

 

Since: 1.0
See also: Constants

 

 

 

CENTER

 

public static final int CENTER

 

Element is aligned to the center disregarding orientation.

 

Since: 1.0
See also: Constants

 

 

 

FAR

 

public static final int FAR

 

Per vertical orientation, element is to be aligned to the bottom, per horizontal to the right.

 

Since: 1.0
See also: Constants

 

 

 

NEAR_BOXED

 

public static final java.lang.Integer NEAR_BOXED

 

Boxed NEAR value.

 

Since: 1.0

 

 

 

CENTER_BOXED

 

public static final java.lang.Integer CENTER_BOXED

 

Boxed CENTER value

 

Since: 1.0

 

 

 

FAR_BOXED

 

public static final java.lang.Integer FAR_BOXED

 

Boxed FAR value

 

Since: 1.0

 

 

 

 

getGravity

 

public static int getGravity( int h,
int v)

 

Combines vertical and horizontal alignments to single value.

 

Parameters:
h-
horizontal alignment
v-
vertical alignment
Returns:
combined value

 

Since: 1.0

 

 

 

getHorizontal

 

public static int getHorizontal( int gravity)

 

Gets horizontal alignment by specified combined value.

 

Parameters:
gravity-
combined value
Returns:
horizontal alignment

 

Since: 1.0

 

 

 

getVertical

 

public static int getVertical( int gravity)

 

Gets vertical alignment by specified combined value.

 

Parameters:
gravity-
combined value
Returns:
vertical alignment

 

Since: 1.0

 

 

 

layoutArroundRect

 

public static void layoutArroundRect( XYRect centerRect,
int width,
int height,
int hAlign,
int vAlign,
XYRect outRect)

 

Computes rectangle outside the specified area by specified alignments.

 

Parameters:
centerRect-
area rectangle.
width-
width of required rectangle
height-
height of required rectangle
hAlign-
horizontal alignment
vAlign-
vertical alignment
outRect-
result.

 

Since: 1.0

 

 

 

layoutInsideRect

 

public static void layoutInsideRect( XYRect boundsRect,
int width,
int height,
int hAlign,
int vAlign,
XYRect outRect)

 

Computes rectangle inside specified area by specified alignments.

 

Parameters:
boundsRect-
area rectangle
width-
width of required rectangle
height-
height of required rectangle
hAlign-
horizontal alignment
vAlign-
vertical alignment
outRect-
result.

 

Since: 1.0

 

 

© 2005 - 2010 ArtfulBits. All rights reserved.