|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjdbreport.model.CellStyle
public class CellStyle
The cell attributes form the definition of a cell to be rendered.
Field Summary | |
---|---|
static int |
BOLD
The bold style constant. |
static float |
DEFAULT_LINE_SPACING
|
static Color |
defaultBackground
Default background color for Cell |
protected static CellStyle |
defaultStyle
|
static int |
ITALIC
The italicized style constant. |
static int |
JUSTIFY
Orientation constant used to specify the justify text in Cell. |
static int |
PLAIN
The plain style constant. |
static int |
SS_NONE
No type offsetting (not super or subscript) |
static int |
SS_SUB
Subscript |
static int |
SS_SUPER
Superscript |
static int |
STRIKETHROUGH
The strikethrough style constant. |
static int |
UNDERLINE
The underline style constant. |
Fields inherited from interface javax.swing.SwingConstants |
---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Constructor Summary | |
---|---|
protected |
CellStyle()
|
|
CellStyle(String name,
int style,
int size)
Creates a new CellStyle from the specified name, style and point size. |
|
CellStyle(String name,
int style,
int size,
Color color)
Creates a new CellStyle from the specified name, style, point size and foreground color. |
Method Summary | |
---|---|
static String |
alignToString(int align)
Converts the alignment to a string representation |
Object |
clone()
|
CellStyle |
deriveAngle(int angle)
Creates a new CellStyle object by replicating the current CellStyle object and applying a new angle of rotation to it. |
CellStyle |
deriveAutoHeight(boolean b)
Creates a new CellStyle object by replicating the current CellStyle object and applying a new autoHeight to it. |
CellStyle |
deriveBackground(Color value)
Creates a new CellStyle object by replicating the current CellStyle object and applying a new background color to it. |
CellStyle |
deriveBackground(Color bgColor,
int bgStyle)
Creates a new CellStyle object by replicating the current CellStyle object and applying a new background color and color style to it. |
CellStyle |
deriveBorder(byte position,
Border border)
|
CellStyle |
deriveCarryRows(int count)
|
CellStyle |
deriveFont(float size)
Creates a new CellStyle object by replicating the current CellStyle object and applying a new size to it. |
CellStyle |
deriveFont(int style)
Creates a new CellStyle object by replicating the current CellStyle object and applying a new font's style to it. |
CellStyle |
deriveFont(String fontName)
Creates a new CellStyle object by replicating the current CellStyle object and applying a new font's family name to it. |
CellStyle |
deriveFont(String fontName,
int style,
int size)
Creates a new CellStyle object by replicating this CellStyle object and applying a new font's name, style and size. |
CellStyle |
deriveForeground(Color value)
Creates a new CellStyle object by replicating the current CellStyle object and applying a new foreground color to it. |
CellStyle |
deriveFormat(int decimal)
Creates a new CellStyle object by replicating the current CellStyle object and applying a new decimal position of the numeric value to it. |
CellStyle |
deriveHAlign(int value)
Creates a new CellStyle object by replicating the current CellStyle object and applying a new horizontal alignment to it. |
CellStyle |
deriveLineSpacing(float ls)
Creates a new CellStyle object by replicating the current CellStyle object and applying a new line spacing to it. |
CellStyle |
deriveTypeOffset(int type)
Creates a new CellStyle object by replicating the current CellStyle object and applying a new typeOffset to it. |
CellStyle |
deriveVAlign(int value)
Creates a new CellStyle object by replicating the current CellStyle object and applying a new vertical alignment to it. |
CellStyle |
deriveWrapLine(boolean b)
|
boolean |
equals(Object obj)
|
static String |
fontStyleStr(int style)
|
int |
getAlignment()
Converts to StyleConstants alignment |
int |
getAngle()
|
Map<TextAttribute,Serializable> |
getAttributes()
|
AttributeSet |
getAttributeSet()
Converts CellStyle's attributes to javax.swing.text.AttributeSet |
Color |
getBackground()
Returns the background color of this CellStyle |
int |
getBgStyle()
|
Border |
getBorders(int pos)
Returns Border's object of this CellStyle |
float |
getBorderWidth(int pos)
|
int |
getCarryRows()
Carry rows |
int |
getDecimal()
|
static CellStyle |
getDefaultStyle()
Returns the default CellStyle |
String |
getFamily()
Returns the font's family name of this CellStyle. |
Color |
getForegroundColor()
Returns the foreground color of this CellStyle |
int |
getHorizontalAlignment()
Returns the horizontal alignment of this CellStyle The horizontal alignment is a constant that may be LEFT, RIGHT, CENTER or JUSTIFY |
Object |
getId()
Returns id for this CellStyle |
float |
getLineSpacing()
|
int |
getSize()
Returns the font's point size of this CellStyle, |
float |
getSpaceAbove()
|
int |
getStyle()
Returns the font's style of this CellStyle. |
int |
getTypeOffset()
Get normal,super or subscript. |
int |
getVerticalAlignment()
Returns the verical alignment of this CellStyle The vertical alignment is a constant that may be TOP, BOTTOM or CENTER |
boolean |
isAutoHeight()
Determines whether the row's height will be set automatically |
boolean |
isBold()
Indicates whether or not font's style is BOLD. |
boolean |
isItalic()
Indicates whether or not font's style is ITALIC. |
boolean |
isStrikethrough()
Indicates whether or not font's style is STRIKETHROUGH. |
boolean |
isUnderline()
Indicates whether or not font's style is UNDERLINE. |
boolean |
isWrapLine()
|
void |
setId(Object id)
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int PLAIN
public static final int BOLD
public static final int ITALIC
public static final int UNDERLINE
public static final int STRIKETHROUGH
public static final int JUSTIFY
public static final int SS_NONE
public static final int SS_SUPER
public static final int SS_SUB
public static final Color defaultBackground
public static final float DEFAULT_LINE_SPACING
protected static CellStyle defaultStyle
Constructor Detail |
---|
protected CellStyle()
public CellStyle(String name, int style, int size, Color color)
name
- the font namestyle
- the font's style constants for the CellStyle The style
argument is an integer bitmask that may be PLAIN, or a bitwise
union of BOLD, ITALIC, UNDERLINE, STRIKETHROUGHsize
- the font's point size of the CellStylecolor
- the foreground color of the CellStylepublic CellStyle(String name, int style, int size)
name
- the font namestyle
- the font's style constants for the CellStyle The style
argument is an integer bitmask that may be PLAIN, or a bitwise
union of BOLD, ITALIC, UNDERLINE, STRIKETHROUGHsize
- the font's point size of the CellStyleMethod Detail |
---|
public boolean isBold()
public boolean isItalic()
public boolean isUnderline()
public boolean isStrikethrough()
public int getVerticalAlignment()
public int getHorizontalAlignment()
public Color getForegroundColor()
public boolean equals(Object obj)
equals
in class Object
public int getStyle()
public String getFamily()
public int getSize()
public static String fontStyleStr(int style)
public CellStyle deriveBorder(byte position, Border border)
public CellStyle deriveVAlign(int value)
value
- the vertical alignment for the new CellStyle
public CellStyle deriveHAlign(int value)
value
- the horizontal alignment for the new CellStyle
public CellStyle deriveBackground(Color value)
value
- the background color for the new CellStyle
public CellStyle deriveBackground(Color bgColor, int bgStyle)
bgColor
- the background color for the new CellStylebgStyle
- the color's style for the new CellStyle
public int getBgStyle()
public CellStyle deriveForeground(Color value)
value
- the foreground color for the new CellStyle
public CellStyle deriveFont(String fontName, int style, int size)
fontName
- -
the font's name for the new CellStylestyle
- the font's style for the new CellStylesize
- the font's size for the new CellStyle.
public CellStyle deriveFont(float size)
size
- the font's size for the new CellStyle.
public CellStyle deriveFont(int style)
style
- the font's style for the new CellStyle
public CellStyle deriveFont(String fontName)
fontName
- the font's family name for the new CellStyle.
public Color getBackground()
public Border getBorders(int pos)
pos
- position of border (Border.LINE_LEFT, Border.LINE_RIGHT,
Border.LINE_TOP, Border.LINE_BOTTOM)
public float getBorderWidth(int pos)
public Object clone()
clone
in class Object
public CellStyle deriveAngle(int angle)
angle
- the angle of rotation for the new CellStyle.
public CellStyle deriveFormat(int decimal)
decimal
- the decimal position of the numeric value.
public int getAlignment()
public static String alignToString(int align)
align
- constant of the alignment
public int getAngle()
public int getDecimal()
public Object getId()
public void setId(Object id)
public AttributeSet getAttributeSet()
public Map<TextAttribute,Serializable> getAttributes()
public float getSpaceAbove()
public float getLineSpacing()
public static CellStyle getDefaultStyle()
public boolean isAutoHeight()
public CellStyle deriveAutoHeight(boolean b)
b
- the autoHeight attribute for the new CellStyle.
public boolean isWrapLine()
public CellStyle deriveWrapLine(boolean b)
public CellStyle deriveLineSpacing(float ls)
ls
- the line spacing for the new CellStyle
public int getCarryRows()
public CellStyle deriveCarryRows(int count)
public int getTypeOffset()
public CellStyle deriveTypeOffset(int type)
type
- normal,super or subscript
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |