JComponentPack 1.5.0

com.zfqjava.swing.cell
Class CellStyle

java.lang.Object
  extended by com.zfqjava.swing.cell.CellStyle
All Implemented Interfaces:
Serializable

public class CellStyle
extends Object
implements Serializable

CellStyle provides a cell style object.

Since:
JDataGrid 1.7.0
See Also:
Serialized Form

Nested Class Summary
static class CellStyle.Border
          The Border.
static class CellStyle.Comment
          The comment
static class CellStyle.Hyperlink
          The hyperlink.
static class CellStyle.UnderlineStyle
          The underline style.
 
Field Summary
static int ALIGN_BOTTOM
          Identified the bottom value of vertical alignment.
static int ALIGN_CENTER
          Identified the center value of vertical alignment.
static int ALIGN_JUSTIFIED
          Identified the justified value of vertical alignment.
static int ALIGN_TOP
          Identified the top value of vertical alignment.
static Object BOTTOM_BORDER
          Identifies the bottom border.
static Object COMMENT
          Identifies the comment.
static Object DOWN_BORDER
          Identifies the right border.
static Object FORMAT
          Identifies the format.
static Object FORMAT_PATTERN
          Identifies the format pattern.
static Object FORMAT_STYLE
          Identifies the format style.
static Object HYPERLINK
          Identifies the hyperlink.
static Object LEFT_BORDER
          Identifies the left border.
static Object RIGHT_BORDER
          Identifies the right border.
static Object TEXT_ROTATE
          Identifies the text rotate angle.
static Object TOP_BORDER
          Identifies the top border.
static Object UNDERLINE_STYLE
          Identifies the underline style.
static Object UP_BORDER
          Identifies the right border.
static Object VALUE_LIST
          Identifies the value list.
static Object VERTICAL_ALIGNMENT
          The vertical alignment cell style.
 
Method Summary
static CellStyle.Border getBottomBorder(AttributeSet a)
          Returns the bottom border.
static CellStyle.Comment getComment(AttributeSet a)
          Returns the comment.
static CellStyle.Border getDownBorder(AttributeSet a)
          Returns the down border.
static Format getFormat(AttributeSet a)
          Returns the format.
static FormatStyle getFormatStyle(AttributeSet a)
          Returns format style..
static CellStyle.Hyperlink getHyperlink(AttributeSet a)
          Returns the hyperlink.
static CellStyle.Border getLeftBorder(AttributeSet a)
          Returns the left border.
static CellStyle.Border getRightBorder(AttributeSet a)
          Returns the right border.
static int getTextRotate(AttributeSet a)
          Returns the text rotate angle in degree.
static CellStyle.Border getTopBorder(AttributeSet a)
          Returns the top border.
static CellStyle.UnderlineStyle getUnderlineStyle(AttributeSet a)
          Returns the underlineStyle.
static CellStyle.Border getUpBorder(AttributeSet a)
          Returns the up border.
static List getValueList(AttributeSet a)
          Returns format style..
static int getVerticalAlignment(AttributeSet a)
          Returns the vertical alignment, the default value is CellStyle.ALIGN_CENTER.
static void setBottomBorder(MutableAttributeSet a, CellStyle.Border border)
          Sets the bottom border.
static void setComment(MutableAttributeSet a, CellStyle.Comment comment)
          Sets the comment.
static void setDownBorder(MutableAttributeSet a, CellStyle.Border border)
          Sets the down border.
static void setFormat(MutableAttributeSet a, Format format)
          Sets the format.
static void setFormatStyle(MutableAttributeSet a, FormatStyle formatStyle)
          Sets the format style.
static void setHyperlink(MutableAttributeSet a, CellStyle.Hyperlink link)
          Sets the hyperlink.
static void setLeftBorder(MutableAttributeSet a, CellStyle.Border border)
          Sets the left border.
static void setRightBorder(MutableAttributeSet a, CellStyle.Border border)
          Sets the right border.
static void setTextRotate(MutableAttributeSet a, int angle)
          Sets the text rotate angle in degree.
static void setTopBorder(MutableAttributeSet a, CellStyle.Border border)
          Sets the top border.
static void setUnderlineStyle(MutableAttributeSet a, CellStyle.UnderlineStyle underlineStyle)
          Sets the underlineStyle.
static void setUpBorder(MutableAttributeSet a, CellStyle.Border border)
          Sets the up border.
static void setValueList(MutableAttributeSet a, List valueList)
          Sets the value list.
static void setVerticalAlignment(MutableAttributeSet a, int alignment)
          Sets the vertical alignment.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ALIGN_TOP

public static final int ALIGN_TOP
Identified the top value of vertical alignment.

See Also:
Constant Field Values

ALIGN_CENTER

public static final int ALIGN_CENTER
Identified the center value of vertical alignment.

See Also:
Constant Field Values

ALIGN_BOTTOM

public static final int ALIGN_BOTTOM
Identified the bottom value of vertical alignment.

See Also:
Constant Field Values

ALIGN_JUSTIFIED

public static final int ALIGN_JUSTIFIED
Identified the justified value of vertical alignment.

See Also:
Constant Field Values

TOP_BORDER

public static final Object TOP_BORDER
Identifies the top border.


LEFT_BORDER

public static final Object LEFT_BORDER
Identifies the left border.


BOTTOM_BORDER

public static final Object BOTTOM_BORDER
Identifies the bottom border.


RIGHT_BORDER

public static final Object RIGHT_BORDER
Identifies the right border.


UP_BORDER

public static final Object UP_BORDER
Identifies the right border.


DOWN_BORDER

public static final Object DOWN_BORDER
Identifies the right border.


VERTICAL_ALIGNMENT

public static final Object VERTICAL_ALIGNMENT
The vertical alignment cell style.


HYPERLINK

public static final Object HYPERLINK
Identifies the hyperlink.


COMMENT

public static final Object COMMENT
Identifies the comment.


FORMAT

public static final Object FORMAT
Identifies the format.


UNDERLINE_STYLE

public static final Object UNDERLINE_STYLE
Identifies the underline style.


TEXT_ROTATE

public static final Object TEXT_ROTATE
Identifies the text rotate angle.


FORMAT_STYLE

public static final Object FORMAT_STYLE
Identifies the format style.


VALUE_LIST

public static final Object VALUE_LIST
Identifies the value list.


FORMAT_PATTERN

public static final Object FORMAT_PATTERN
Identifies the format pattern.

Method Detail

setVerticalAlignment

public static void setVerticalAlignment(MutableAttributeSet a,
                                        int alignment)
Sets the vertical alignment.

Parameters:
alignment - the vertical alignment
Since:
JDataGrid 1.8
See Also:
getVerticalAlignment(javax.swing.text.AttributeSet)

getVerticalAlignment

public static int getVerticalAlignment(AttributeSet a)
Returns the vertical alignment, the default value is CellStyle.ALIGN_CENTER.

Returns:
the vertical alignment
Since:
JDataGrid 1.8
See Also:
setVerticalAlignment(javax.swing.text.MutableAttributeSet, int)

setTopBorder

public static void setTopBorder(MutableAttributeSet a,
                                CellStyle.Border border)
Sets the top border.

Parameters:
a - the attribute set
border - the border
Since:
JDataGrid 1.7
See Also:
getTopBorder(javax.swing.text.AttributeSet)

getTopBorder

public static CellStyle.Border getTopBorder(AttributeSet a)
Returns the top border.

Parameters:
a - the attribute set
Returns:
the top border
Since:
JDataGrid 1.7
See Also:
setTopBorder(javax.swing.text.MutableAttributeSet, com.zfqjava.swing.cell.CellStyle.Border)

setLeftBorder

public static void setLeftBorder(MutableAttributeSet a,
                                 CellStyle.Border border)
Sets the left border.

Parameters:
a - the attribute set
border - the border
Since:
JDataGrid 1.7
See Also:
getLeftBorder(javax.swing.text.AttributeSet)

getLeftBorder

public static CellStyle.Border getLeftBorder(AttributeSet a)
Returns the left border.

Parameters:
a - the attribute set
Returns:
the left border
Since:
JDataGrid 1.7
See Also:
setLeftBorder(javax.swing.text.MutableAttributeSet, com.zfqjava.swing.cell.CellStyle.Border)

setBottomBorder

public static void setBottomBorder(MutableAttributeSet a,
                                   CellStyle.Border border)
Sets the bottom border.

Parameters:
a - the attribute set
border - the border
Since:
JDataGrid 1.7
See Also:
getBottomBorder(javax.swing.text.AttributeSet)

getBottomBorder

public static CellStyle.Border getBottomBorder(AttributeSet a)
Returns the bottom border.

Parameters:
a - the attribute set
Returns:
the bottom border
Since:
JDataGrid 1.7
See Also:
setBottomBorder(javax.swing.text.MutableAttributeSet, com.zfqjava.swing.cell.CellStyle.Border)

setRightBorder

public static void setRightBorder(MutableAttributeSet a,
                                  CellStyle.Border border)
Sets the right border.

Parameters:
a - the attribute set
border - the border
Since:
JDataGrid 1.7
See Also:
getRightBorder(javax.swing.text.AttributeSet)

getRightBorder

public static CellStyle.Border getRightBorder(AttributeSet a)
Returns the right border.

Parameters:
a - the attribute set
Returns:
the right border
Since:
JDataGrid 1.7
See Also:
setRightBorder(javax.swing.text.MutableAttributeSet, com.zfqjava.swing.cell.CellStyle.Border)

setUpBorder

public static void setUpBorder(MutableAttributeSet a,
                               CellStyle.Border border)
Sets the up border.

Parameters:
a - the attribute set
border - the border
Since:
JDataGrid 2.0
See Also:
getUpBorder(javax.swing.text.AttributeSet)

getUpBorder

public static CellStyle.Border getUpBorder(AttributeSet a)
Returns the up border.

Parameters:
a - the attribute set
Returns:
the up border
Since:
JDataGrid 2.0
See Also:
setUpBorder(javax.swing.text.MutableAttributeSet, com.zfqjava.swing.cell.CellStyle.Border)

setDownBorder

public static void setDownBorder(MutableAttributeSet a,
                                 CellStyle.Border border)
Sets the down border.

Parameters:
a - the attribute set
border - the border
Since:
JDataGrid 2.0
See Also:
getDownBorder(javax.swing.text.AttributeSet)

getDownBorder

public static CellStyle.Border getDownBorder(AttributeSet a)
Returns the down border.

Parameters:
a - the attribute set
Returns:
the down border
Since:
JDataGrid 2.0
See Also:
setDownBorder(javax.swing.text.MutableAttributeSet, com.zfqjava.swing.cell.CellStyle.Border)

setHyperlink

public static void setHyperlink(MutableAttributeSet a,
                                CellStyle.Hyperlink link)
Sets the hyperlink.

Parameters:
a - the attribute set
link - the hyperlink
Since:
JDataGrid 1.8
See Also:
getHyperlink(javax.swing.text.AttributeSet)

getHyperlink

public static CellStyle.Hyperlink getHyperlink(AttributeSet a)
Returns the hyperlink.

Parameters:
a - the attribute set
Returns:
the hyperlink
Since:
JDataGrid 1.8
See Also:
setHyperlink(javax.swing.text.MutableAttributeSet, com.zfqjava.swing.cell.CellStyle.Hyperlink)

setComment

public static void setComment(MutableAttributeSet a,
                              CellStyle.Comment comment)
Sets the comment.

Parameters:
a - the attribute set
comment - the comment
Since:
JDataGrid 1.8
See Also:
getComment(javax.swing.text.AttributeSet)

getComment

public static CellStyle.Comment getComment(AttributeSet a)
Returns the comment.

Parameters:
a - the attribute set
Returns:
the comment
Since:
JDataGrid 1.8
See Also:
setComment(javax.swing.text.MutableAttributeSet, com.zfqjava.swing.cell.CellStyle.Comment)

setFormat

public static void setFormat(MutableAttributeSet a,
                             Format format)
Sets the format.

Parameters:
a - the attribute set
format - the format
Since:
JDataGrid 2.0
See Also:
getFormat(javax.swing.text.AttributeSet)

getFormat

public static Format getFormat(AttributeSet a)
Returns the format.

Parameters:
a - the attribute set
Returns:
the format
Since:
JDataGrid 2.0
See Also:
setFormat(javax.swing.text.MutableAttributeSet, java.text.Format)

setUnderlineStyle

public static void setUnderlineStyle(MutableAttributeSet a,
                                     CellStyle.UnderlineStyle underlineStyle)
Sets the underlineStyle.

Parameters:
a - the attribute set
underlineStyle - the underlineStyle
Since:
JDataGrid 2.0
See Also:
getUnderlineStyle(javax.swing.text.AttributeSet)

getUnderlineStyle

public static CellStyle.UnderlineStyle getUnderlineStyle(AttributeSet a)
Returns the underlineStyle.

Parameters:
a - the attribute set
Returns:
the underlineStyle
Since:
JDataGrid 2.0
See Also:
setUnderlineStyle(javax.swing.text.MutableAttributeSet, com.zfqjava.swing.cell.CellStyle.UnderlineStyle)

setTextRotate

public static void setTextRotate(MutableAttributeSet a,
                                 int angle)
Sets the text rotate angle in degree.

Parameters:
a - the attribute set
angle - the text rotate angle
Since:
JDataGrid 2.0
See Also:
getTextRotate(javax.swing.text.AttributeSet)

getTextRotate

public static int getTextRotate(AttributeSet a)
Returns the text rotate angle in degree.

Parameters:
a - the attribute set
Returns:
the the text rotate angle
Since:
JDataGrid 2.0
See Also:
setTextRotate(javax.swing.text.MutableAttributeSet, int)

setFormatStyle

public static void setFormatStyle(MutableAttributeSet a,
                                  FormatStyle formatStyle)
Sets the format style.

Parameters:
a - the attribute set
formatStyle - the format style
Since:
JDataGrid 2.0
See Also:
getFormatStyle(javax.swing.text.AttributeSet)

getFormatStyle

public static FormatStyle getFormatStyle(AttributeSet a)
Returns format style..

Parameters:
a - the attribute set
Returns:
the format style
Since:
JDataGrid 2.0
See Also:
setFormatStyle(javax.swing.text.MutableAttributeSet, com.zfqjava.swing.cell.FormatStyle)

setValueList

public static void setValueList(MutableAttributeSet a,
                                List valueList)
Sets the value list.

Parameters:
a - the attribute set
valueList - the value list
Since:
JDataGrid 2.1.6
See Also:
getValueList(javax.swing.text.AttributeSet)

getValueList

public static List getValueList(AttributeSet a)
Returns format style..

Parameters:
a - the attribute set
Returns:
the format style
Since:
JDataGrid 2.1.6
See Also:
setValueList(javax.swing.text.MutableAttributeSet, java.util.List)

toString

public String toString()
Overrides:
toString in class Object

JComponentPack 1.5.0

Send your Feedback
JComponentPack 1.5.0
Copyright © 2001-2007 Extreme Component, Inc. All rights reserved.