|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.iisc.jwc.jsheet.CellStyle
CellStyle contains the formatting information for a cell.
Field Summary | |
static int |
BORDER_DASH_DOT
Dash dot border style. |
static int |
BORDER_DASH_DOT_DOT
Dash dot dot border style. |
static int |
BORDER_DASHED
Dashed border style. |
static int |
BORDER_DOTTED
Dotted border style. |
static int |
BORDER_DOUBLE
Double border style. |
static int |
BORDER_HAIR
Hair border style. |
static int |
BORDER_LINE
Line border style. |
static int |
BORDER_MED_DASH_DOT
Medium dash dot border style. |
static int |
BORDER_MED_DASH_DOT_DOT
Medium dash dot dot border style. |
static int |
BORDER_MED_DASHED
Medium dashed border style. |
static int |
BORDER_MEDIUM
Medium border style. |
static int |
BORDER_NONE
No border. |
static int |
BORDER_SLANT_DASH_DOT
Slash dash dot border style. |
static int |
BORDER_THICK
Thick border style. |
static int |
BOTTOM_BORDER
Bottom border edge. |
static int |
DIAGONAL_BORDER
Diagonal border edge. |
static int |
DIAGONAL_BORDER_BOTH
Diagonal border both (up and down). |
static int |
DIAGONAL_BORDER_DOWN
Diagonal border down. |
static int |
DIAGONAL_BORDER_UP
Diagonal border up. |
static int |
FONT_ACCOUNTING_DOUBLE
Accounting double underline font style. |
static int |
FONT_ACCOUNTING_SINGLE
Accounting single underline font style. |
static int |
FONT_BOLD
Bold font style. |
static int |
FONT_ITALIC
Italic font style. |
static int |
FONT_PLAIN
Plain font style. |
static int |
FONT_STRIKE_THROUGH
Strikethrough font style. |
static int |
FONT_SUBSCRIPT
Subscript font style. |
static int |
FONT_SUPERSCRIPT
Superscript font style. |
static int |
FONT_UNDERLINE_DOUBLE
Double underline font style. |
static int |
FONT_UNDERLINE_SINGLE
Single underline font style. |
static int |
FORMAT_CURRENCY
Currency format type. |
static int |
FORMAT_CUSTOM
Custom format type. |
static int |
FORMAT_DATE1
Date1 format type. |
static int |
FORMAT_DATE2
Date2 format type. |
static int |
FORMAT_DATE3
Date3 format type. |
static int |
FORMAT_DATE4
Date4 format type. |
static int |
FORMAT_DATE5
Date5 format type. |
static int |
FORMAT_FIXED
Fixed format type. |
static int |
FORMAT_GENERAL
General format type. |
static int |
FORMAT_PERCENT
Percent format type. |
static int |
FORMAT_SCIENTIFIC
Scientific format type. |
static int |
FORMAT_TIME1
Time1 format type. |
static int |
FORMAT_TIME2
Time2 format type. |
static int |
FORMAT_TIME3
Time3 format type. |
static int |
FORMAT_TIME4
Time4 format type. |
static int |
HALIGN_CENTER
Center horizontal alignment. |
static int |
HALIGN_FILL
Fill horizontal alignment. |
static int |
HALIGN_GENERAL
General horizontal alignment. |
static int |
HALIGN_JUSTIFY
Justify horizontal alignment. |
static int |
HALIGN_LEFT
Left horizontal alignment. |
static int |
HALIGN_MASK
Used by setAlignment to set horizontal alignment. |
static int |
HALIGN_RIGHT
Right horizontal alignment. |
static int |
LEFT_BORDER
Left border edge. |
static int |
RIGHT_BORDER
Right border edge. |
static int |
TOP_BORDER
Top border edge. |
static int |
VALIGN_BOTTOM
Bottom vertical alignment. |
static int |
VALIGN_CENTER
Center vertical alignment. |
static int |
VALIGN_JUSTIFY
Justify vertical alignment. |
static int |
VALIGN_MASK
Used by setAlignment to set vertical alignment. |
static int |
VALIGN_TOP
Top vertical alignment. |
Constructor Summary | |
CellStyle()
The empty constructor is for the JSClientProxy interactive applet, to allow the creation of a serializable version of this object to be used by JavaScript when communicating between browser client and server via HTTP. |
Method Summary | |
void |
addFontStyle(int style)
Adds this font style to the current settings. |
void |
clearInclude()
Clears the include flag. |
int |
getAlignment()
Returns the alignment for the cell. |
java.awt.Color |
getBGColor()
Returns the background color. |
java.awt.Color |
getBorderColor(int edge)
Gets the border color for the specifed edge. |
int |
getBorderLineStyle(int edge)
Gets the border line style for the specified edge. |
com.iisc.jwc.orb.CStyle |
getCStyle()
FOR INTERNAL USE ONLY! |
java.lang.String |
getCustomFormat()
Returns the custom format string, null if not used. |
java.awt.Color |
getFGColor()
Returns the foreground color, this is used for the font color. |
java.lang.String |
getFontName()
Returns the font name. |
int |
getFontSize()
Returns the font size. |
int |
getFontStyle()
Returns the font style. |
int |
getFormatType()
Returns the format type. |
int |
getIndent()
Returns the left indent for the cell. |
int |
getMergedFontStyle()
Returns the new font style. |
java.awt.Color |
getNegativeColor()
Returns the negative color for numeric values. |
int |
getOriginalFontStyle()
Returns the original font style. |
int |
getPrecision()
Returns the precision for a numeric value. |
boolean |
getShowZeros()
Returns the setting for showing zeroes in cells. |
boolean |
getUseCommas()
Returns the setting for showing commas. |
boolean |
getUseParens()
Returns the setting for displaying parenthesis for negative numeric values. |
boolean |
getWrapText()
Returns the setting for wrapped cell text. |
void |
removeFontStyle(int style)
Remove the font style from the current settings. |
void |
setAlignment(int alignment)
Sets the alignment. |
void |
setBGColor(java.awt.Color color)
Sets the background color. |
void |
setBold()
Adds the font style bold. |
void |
setBorders(int edge,
int diagtype,
java.awt.Color color,
int lineStyle)
Sets the borders for the cell. |
void |
setCustomFormat(java.lang.String format)
Sets the string for a custom format for the cell. |
void |
setFGColor(java.awt.Color color)
Sets the foreground color, this is used for the font color. |
void |
setFont(java.lang.String name,
int style,
int size)
Sets new font information. |
void |
setFontName(java.lang.String name)
Sets a new font name. |
void |
setFontSize(int size)
Sets the font size. |
void |
setFontStyle(int style)
Sets the style for the font. |
void |
setFormatType(int type)
Sets the format type. |
void |
setIndent(int indent)
Sets the left indent for a cell if HALIGN_LEFT is set for the alignment. |
void |
setItalic()
Adds the font style italic. |
void |
setNegativeColor(java.awt.Color color)
Sets the color for a negative numeric value. |
void |
setPrecision(int precision)
Sets the precision for a numeric value. |
void |
setShowZeros(boolean set)
Defines the setting for showing data in cells that contain zeros. |
void |
setUnderline()
Adds the font style single underline. |
void |
setUseCommas(boolean set)
Defines the setting for showing commas in numbers that have more than three digits. |
void |
setUseParens(boolean set)
Defines the setting for displaying parenthesis for negative numeric values. |
void |
setWrapText(boolean wrap)
Allows the text to wrap in a cell if it is too long to fit horizontally. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int BORDER_DASH_DOT
setBorders(int, int, java.awt.Color, int)
,
Constant Field Valuespublic static final int BORDER_DASH_DOT_DOT
setBorders(int, int, java.awt.Color, int)
,
Constant Field Valuespublic static final int BORDER_DASHED
setBorders(int, int, java.awt.Color, int)
,
Constant Field Valuespublic static final int BORDER_DOTTED
setBorders(int, int, java.awt.Color, int)
,
Constant Field Valuespublic static final int BORDER_DOUBLE
setBorders(int, int, java.awt.Color, int)
,
Constant Field Valuespublic static final int BORDER_HAIR
setBorders(int, int, java.awt.Color, int)
,
Constant Field Valuespublic static final int BORDER_LINE
setBorders(int, int, java.awt.Color, int)
,
Constant Field Valuespublic static final int BORDER_MED_DASH_DOT
setBorders(int, int, java.awt.Color, int)
,
Constant Field Valuespublic static final int BORDER_MED_DASH_DOT_DOT
setBorders(int, int, java.awt.Color, int)
,
Constant Field Valuespublic static final int BORDER_MED_DASHED
setBorders(int, int, java.awt.Color, int)
,
Constant Field Valuespublic static final int BORDER_MEDIUM
setBorders(int, int, java.awt.Color, int)
,
Constant Field Valuespublic static final int BORDER_NONE
setBorders(int, int, java.awt.Color, int)
,
Constant Field Valuespublic static final int BORDER_SLANT_DASH_DOT
setBorders(int, int, java.awt.Color, int)
,
Constant Field Valuespublic static final int BORDER_THICK
setBorders(int, int, java.awt.Color, int)
,
Constant Field Valuespublic static final int BOTTOM_BORDER
setBorders(int, int, java.awt.Color, int)
,
Constant Field Valuespublic static final int DIAGONAL_BORDER
setBorders(int, int, java.awt.Color, int)
,
Constant Field Valuespublic static final int DIAGONAL_BORDER_BOTH
setBorders(int, int, java.awt.Color, int)
,
Constant Field Valuespublic static final int DIAGONAL_BORDER_DOWN
setBorders(int, int, java.awt.Color, int)
,
Constant Field Valuespublic static final int DIAGONAL_BORDER_UP
setBorders(int, int, java.awt.Color, int)
,
Constant Field Valuespublic static final int FONT_ACCOUNTING_DOUBLE
setFontStyle(int)
,
Constant Field Valuespublic static final int FONT_ACCOUNTING_SINGLE
setFontStyle(int)
,
Constant Field Valuespublic static final int FONT_BOLD
setFontStyle(int)
,
Constant Field Valuespublic static final int FONT_ITALIC
setFontStyle(int)
,
Constant Field Valuespublic static final int FONT_PLAIN
setFontStyle(int)
,
Constant Field Valuespublic static final int FONT_STRIKE_THROUGH
setFontStyle(int)
,
Constant Field Valuespublic static final int FONT_SUBSCRIPT
setFontStyle(int)
,
Constant Field Valuespublic static final int FONT_SUPERSCRIPT
setFontStyle(int)
,
Constant Field Valuespublic static final int FONT_UNDERLINE_DOUBLE
setFontStyle(int)
,
Constant Field Valuespublic static final int FONT_UNDERLINE_SINGLE
setFontStyle(int)
,
Constant Field Valuespublic static final int FORMAT_CURRENCY
setFormatType(int)
,
Constant Field Valuespublic static final int FORMAT_CUSTOM
setFormatType(int)
,
Constant Field Valuespublic static final int FORMAT_DATE1
setFormatType(int)
,
Constant Field Valuespublic static final int FORMAT_DATE2
setFormatType(int)
,
Constant Field Valuespublic static final int FORMAT_DATE3
setFormatType(int)
,
Constant Field Valuespublic static final int FORMAT_DATE4
setFormatType(int)
,
Constant Field Valuespublic static final int FORMAT_DATE5
setFormatType(int)
,
Constant Field Valuespublic static final int FORMAT_FIXED
setFormatType(int)
,
Constant Field Valuespublic static final int FORMAT_GENERAL
setFormatType(int)
,
Constant Field Valuespublic static final int FORMAT_PERCENT
setFormatType(int)
,
Constant Field Valuespublic static final int FORMAT_SCIENTIFIC
setFormatType(int)
,
Constant Field Valuespublic static final int FORMAT_TIME1
setFormatType(int)
,
Constant Field Valuespublic static final int FORMAT_TIME2
setFormatType(int)
,
Constant Field Valuespublic static final int FORMAT_TIME3
setFormatType(int)
,
Constant Field Valuespublic static final int FORMAT_TIME4
setFormatType(int)
,
Constant Field Valuespublic static final int HALIGN_CENTER
setAlignment(int)
,
Constant Field Valuespublic static final int HALIGN_FILL
setAlignment(int)
,
Constant Field Valuespublic static final int HALIGN_GENERAL
setAlignment(int)
,
Constant Field Valuespublic static final int HALIGN_JUSTIFY
setAlignment(int)
,
Constant Field Valuespublic static final int HALIGN_LEFT
setAlignment(int)
,
Constant Field Valuespublic static final int HALIGN_MASK
setAlignment(int)
,
Constant Field Valuespublic static final int HALIGN_RIGHT
setAlignment(int)
,
Constant Field Valuespublic static final int LEFT_BORDER
setBorders(int, int, java.awt.Color, int)
,
Constant Field Valuespublic static final int RIGHT_BORDER
setBorders(int, int, java.awt.Color, int)
,
Constant Field Valuespublic static final int TOP_BORDER
setBorders(int, int, java.awt.Color, int)
,
Constant Field Valuespublic static final int VALIGN_BOTTOM
setAlignment(int)
,
Constant Field Valuespublic static final int VALIGN_CENTER
setAlignment(int)
,
Constant Field Valuespublic static final int VALIGN_JUSTIFY
setAlignment(int)
,
Constant Field Valuespublic static final int VALIGN_MASK
setAlignment(int)
,
Constant Field Valuespublic static final int VALIGN_TOP
setAlignment(int)
,
Constant Field ValuesConstructor Detail |
public CellStyle()
Method Detail |
public void addFontStyle(int style)
style
- style flags for the font.setFontStyle(int)
public void clearInclude()
public int getAlignment()
setAlignment(int)
public java.awt.Color getBGColor()
public java.awt.Color getBorderColor(int edge)
edge
- the edge to which the settings refer.
LEFT_BORDER | 0 | Left border edge. |
RIGHT_BORDER | 1 | Right border edge. |
TOP_BORDER | 2 | Top border edge. |
BOTTOM_BORDER | 3 | Bottom border edge. |
DIAGONAL_BORDER | 4 | Diagonal border edge. |
setBorders(int, int, java.awt.Color, int)
public int getBorderLineStyle(int edge)
edge
- the edge to which the settings refer.
LEFT_BORDER | 0 | Left border edge. |
RIGHT_BORDER | 1 | Right border edge. |
TOP_BORDER | 2 | Top border edge. |
BOTTOM_BORDER | 3 | Bottom border edge. |
DIAGONAL_BORDER | 4 | Diagonal border edge. |
setBorders(int, int, java.awt.Color, int)
public com.iisc.jwc.orb.CStyle getCStyle()
public java.lang.String getCustomFormat()
public java.awt.Color getFGColor()
public java.lang.String getFontName()
public int getFontSize()
public int getFontStyle()
setFontStyle(int)
public int getFormatType()
TYPE NAME | INTVALUE | FORMAT Example |
------------------------- | ------------- | -------------------- |
FORMAT_CURRENCY | 1 | $1,234.00 |
FORMAT_DATE1 | 2 | 4-Mar-98 |
FORMAT_DATE2 | 3 | 4-Mar |
FORMAT_DATE3 | 4 | Mar-98 |
FORMAT_DATE4 | 5 | 03-04-98 |
FORMAT_DATE5 | 6 | 03-98 |
FORMAT_FIXED | 7 | 123.45 |
FORMAT_GENERAL | 8 | 12345 |
FORMAT_PERCENT | 9 | 1234.00% |
FORMAT_SCIENTIFIC | 10 | 1.23E+04 |
FORMAT_TIME1 | 12 | 1:30:55 PM |
FORMAT_TIME2 | 13 | 1:30 PM |
FORMAT_TIME3 | 14 | 1:30:55 |
FORMAT_TIME4 | 15 | 13:30 |
FORMAT_CUSTOM | 16 | Custom format type. |
setFormatType(int)
public int getIndent()
public int getMergedFontStyle()
public java.awt.Color getNegativeColor()
public int getOriginalFontStyle()
public int getPrecision()
public boolean getShowZeros()
public boolean getUseCommas()
public boolean getUseParens()
public boolean getWrapText()
public void removeFontStyle(int style)
style
- style flags for the font.setFontStyle(int)
public void setAlignment(int alignment)
alignment
- the cell alignment bits.
HALIGN_GENERAL | 1 | General horizontal alignment. |
HALIGN_LEFT | 2 | Left horizontal alignment. |
HALIGN_CENTER | 3 | Center horizontal alignment. |
HALIGN_RIGHT | 4 | Right horizontal alignment. |
HALIGN_JUSTIFY | 5 | Justify horizontal alignment. |
HALIGN_FILL | 6 | Fill horizontal alignment. |
HALIGN_MASK | 15 | Required to set horizontal alignment. |
VALIGN_TOP | 16 | Top vertical alignment. |
VALIGN_BOTTOM | 32 | Bottom vertical alignment. |
VALIGN_CENTER | 48 | Center vertical alignment. |
VALIGN_JUSTIFY | 64 | Justify vertical alignment. |
VALIGN_MASK | 240 | Required to set vertical alignment. |
public void setBGColor(java.awt.Color color)
color
- the color to use.public void setBold()
public void setBorders(int edge, int diagtype, java.awt.Color color, int lineStyle)
edge
- the edge to which the settings refer.
LEFT_BORDER | 0 | Left border edge. |
RIGHT_BORDER | 1 | Right border edge. |
TOP_BORDER | 2 | Top border edge. |
BOTTOM_BORDER | 3 | Bottom border edge. |
DIAGONAL_BORDER | 4 | Diagonal border edge. |
diagtype
- the diagonal style.
color
- the color.lineStyle
- the line style.
public void setCustomFormat(java.lang.String format)
format
- the custom format string.public void setFGColor(java.awt.Color color)
color
- the color to use.public void setFont(java.lang.String name, int style, int size)
name
- font name.style
- style flags for the font.size
- point size of the font.setFontName(java.lang.String)
,
setFontStyle(int)
,
setFontSize(int)
public void setFontName(java.lang.String name)
name
- the name of the font.public void setFontSize(int size)
size
- the point size.public void setFontStyle(int style)
style
- the font style bits.
FONT_PLAIN | 0 | Plain font style. |
FONT_BOLD | 1 | Bold font style. |
FONT_ITALIC | 2 | Italic font style. |
FONT_STRIKE_THROUGH | 4 | Strike through font style. |
FONT_SUBSCRIPT | 8 | Subscript font style. |
FONT_SUPERSCRIPT | 16 | Superscript font style. |
FONT_UNDERLINE_SINGLE | 32 | Single underline font style. |
FONT_UNDERLINE_DOUBLE | 64 | Double underline font style. |
FONT_ACCOUNTING_SINGLE | 256 | Accounting single underline font style. |
FONT_ACCOUNTING_DOUBLE | 512 | Accounting double underline font style. |
public void setFormatType(int type)
type
- which numeric formatting type to use.
TYPE NAME | INTVALUE | FORMAT Example |
------------------------- | ------------- | -------------------- |
FORMAT_CURRENCY | 1 | $1,234.00 |
FORMAT_DATE1 | 2 | 4-Mar-98 |
FORMAT_DATE2 | 3 | 4-Mar |
FORMAT_DATE3 | 4 | Mar-98 |
FORMAT_DATE4 | 5 | 03-04-98 |
FORMAT_DATE5 | 6 | 03-98 |
FORMAT_FIXED | 7 | 123.45 |
FORMAT_GENERAL | 8 | 12345 |
FORMAT_PERCENT | 9 | 1234.00% |
FORMAT_SCIENTIFIC | 10 | 1.23E+04 |
FORMAT_TIME1 | 12 | 1:30:55 PM |
FORMAT_TIME2 | 13 | 1:30 PM |
FORMAT_TIME3 | 14 | 1:30:55 |
FORMAT_TIME4 | 15 | 13:30 |
FORMAT_CUSTOM | 16 | Custom format type. |
public void setIndent(int indent)
indent
- the indent size in pixels.public void setItalic()
public void setNegativeColor(java.awt.Color color)
color
- the color for the number.public void setPrecision(int precision)
precision
- the precision for a numeric value.public void setShowZeros(boolean set)
set
- if true
, show the zeroes.public void setUnderline()
public void setUseCommas(boolean set)
set
- if true
show the commas.public void setUseParens(boolean set)
set
- if true
, show parenthesis.public void setWrapText(boolean wrap)
wrap
- if true
, wrap the text.
|
Email JSheet Support | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |