net.rim.device.api.ui.component.table
Class RegionStyles

java.lang.Object
  extended by net.rim.device.api.ui.component.table.RegionStyles

public class RegionStyles
extends Object

Container class for the region styles to be applied to a region.

Since:
BlackBerry API 6.0.0

Field Summary
static int ALIGN_BOTTOM
          A style indicating that the field in the region should be aligned to the bottom.
static int ALIGN_CENTER
          A style indicating that the field in the region should be aligned to the horizontal center.
static int ALIGN_LEFT
          A style indicating that the field in the region should be aligned to the left.
static int ALIGN_MIDDLE
          A style indicating that the field in the region should be aligned to the vertical middle.
static int ALIGN_RIGHT
          A style indicating that the field in the region should be aligned to the right.
static int ALIGN_TOP
          A style indicating that the field in the region should be aligned to the top.
 
Constructor Summary
RegionStyles(Border border, Font font, XYEdges margin, XYEdges padding, int horizontalAlignment, int verticalAlignment)
          Creates an instance of a RegionStyles object that will later correspond to a Data Template region.
 
Method Summary
 Border getBorder()
          Get the border that has been applied to this region.
 Font getFont()
          Get the font that has been applied to this region.
 int getHorizontalAlignment()
          Get the horizontal alignment that has been applied to this region.
 XYEdges getMargin()
          Get the margin that has been applied to this region.
 XYEdges getPadding()
          Get the padding that has been applied to this region.
 int getVerticalAlignment()
          Get the vertical alignment that has been applied to this region.
 void setBorder(Border border)
          Set the border for this region.
 void setFont(Font font)
          Set the font for this region.
 void setHorizontalAlignment(int horizontalAlignment)
          Set the horizontal alignment for this region.
 void setMargin(XYEdges margin)
          Set the margin for this region.
 void setPadding(XYEdges padding)
          Set the padding for this region.
 void setVerticalAlignment(int verticalAlignment)
          Set the vertical alignment for this region.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Field Detail

ALIGN_LEFT

public static final int ALIGN_LEFT
A style indicating that the field in the region should be aligned to the left.

See Also:
Constant Field Values
Since:
BlackBerry API 6.0.0

ALIGN_RIGHT

public static final int ALIGN_RIGHT
A style indicating that the field in the region should be aligned to the right.

See Also:
Constant Field Values
Since:
BlackBerry API 6.0.0

ALIGN_CENTER

public static final int ALIGN_CENTER
A style indicating that the field in the region should be aligned to the horizontal center.

See Also:
Constant Field Values
Since:
BlackBerry API 6.0.0

ALIGN_TOP

public static final int ALIGN_TOP
A style indicating that the field in the region should be aligned to the top.

See Also:
Constant Field Values
Since:
BlackBerry API 6.0.0

ALIGN_BOTTOM

public static final int ALIGN_BOTTOM
A style indicating that the field in the region should be aligned to the bottom.

See Also:
Constant Field Values
Since:
BlackBerry API 6.0.0

ALIGN_MIDDLE

public static final int ALIGN_MIDDLE
A style indicating that the field in the region should be aligned to the vertical middle.

See Also:
Constant Field Values
Since:
BlackBerry API 6.0.0


Constructor Detail

RegionStyles

public RegionStyles(Border border,
                    Font font,
                    XYEdges margin,
                    XYEdges padding,
                    int horizontalAlignment,
                    int verticalAlignment)
Creates an instance of a RegionStyles object that will later correspond to a Data Template region.

Parameters:
border - A Border object that will describe a border around the region. Setting this to null will trigger the application of the cell border settings from the currently active theme.
font - The font that will be active in the region. Setting this to null will the trigger the application of the cell font settings from the currently active theme.
margin - The margin assignments for the region.
padding - The padding assignments for the region. Setting this to null will trigger the application of the cell padding settings from the currently active theme.
horizontalAlignment - The horizontal alignment for the region. Should be one of: RegionStyles.ALIGN_LEFT, RegionStyles.ALIGN_RIGHT, RegionStyles.ALIGN_CENTER The default horizontalAlignment is RegionStyles.ALIGN_LEFT
verticalAlignment - The vertical alignment for the region. Should be one of: RegionStyles.ALIGN_TOP, RegionStyles.ALIGN_BOTTOM, RegionStyles.ALIGN_MIDDLE The default verticalAlignment is RegionStyles.ALIGN_TOP
Since:
BlackBerry API 6.0.0


Method Detail

getBorder

public Border getBorder()
Get the border that has been applied to this region.

Returns:
the current border for the region
Since:
BlackBerry API 6.0.0

setBorder

public void setBorder(Border border)
Set the border for this region.

Parameters:
border - the new border for this region
Since:
BlackBerry API 6.0.0

getFont

public Font getFont()
Get the font that has been applied to this region.

Returns:
the current font for the region
Since:
BlackBerry API 6.0.0

setFont

public void setFont(Font font)
Set the font for this region.

Parameters:
font - the new font for this region
Since:
BlackBerry API 6.0.0

getHorizontalAlignment

public int getHorizontalAlignment()
Get the horizontal alignment that has been applied to this region.

Returns:
the current horizontal alignment for the region
Since:
BlackBerry API 6.0.0

setHorizontalAlignment

public void setHorizontalAlignment(int horizontalAlignment)
Set the horizontal alignment for this region.

Parameters:
horizontalAlignment - the new horizontal alignment for this region
Throws:
IllegalArgumentException - if Horizontal Alignment is not one of the following: RegionStyles.ALIGN_LEFT, RegionStyles.ALIGN_RIGHT, RegionStyles.ALIGN_CENTER
Since:
BlackBerry API 6.0.0

getVerticalAlignment

public int getVerticalAlignment()
Get the vertical alignment that has been applied to this region.

Returns:
the current vertical alignment for the region
Since:
BlackBerry API 6.0.0

setVerticalAlignment

public void setVerticalAlignment(int verticalAlignment)
Set the vertical alignment for this region.

Parameters:
verticalAlignment - the new vertical alignment for this region
Throws:
IllegalArgumentException - if Horizontal Alignment is not one of the following: RegionStyles.ALIGN_TOP, RegionStyles.ALIGN_BOTTOM, RegionStyles.ALIGN_MIDDLE
Since:
BlackBerry API 6.0.0

getPadding

public XYEdges getPadding()
Get the padding that has been applied to this region.

Returns:
the current padding for the region
Since:
BlackBerry API 6.0.0

setPadding

public void setPadding(XYEdges padding)
Set the padding for this region.

Parameters:
padding - the new padding for this region
Since:
BlackBerry API 6.0.0

getMargin

public XYEdges getMargin()
Get the margin that has been applied to this region.

Returns:
the current margin for the region
Since:
BlackBerry API 6.0.0

setMargin

public void setMargin(XYEdges margin)
Set the margin for this region.

Parameters:
margin - the new margin for this region
Since:
BlackBerry API 6.0.0





Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.