|
Diamond Control Suite 3.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DsCellProperties
Properties used to render cells in grids and tables.
Field Summary | |
---|---|
static int |
ALIGN_DEFAULT
|
static int |
ROTATE_0
|
static int |
ROTATE_270
|
static int |
ROTATE_90
|
static int |
ROTATE_DEFAULT
|
Fields inherited from interface diamondedge.swing.DsConstants |
---|
ACCOUNTING, ALL, ASCENDING, ASCENDING_CASE, BORDER_BOTTOM, BORDER_LEFT, BORDER_NONE, BORDER_OUTLINE, BORDER_RIGHT, BORDER_TOP, CROSS_LINES, DASH, DASH_DOT, DASH_DOT_DOT, DEFAULT, DESCENDING, DESCENDING_CASE, DIAGONAL_CROSS_LINES, DOT, DOUBLE, DOUBLE_LINE, DOWNWARD_DIAGONAL_LINES, ETCHED, ETCHED_RAISED, FALSE, FIND_ALL, FIND_EQUALS, FIND_GT, FIND_GTE, FIND_LT, FIND_LTE, FIND_NE, FIND_PREFIX, FIND_REGEX, FIND_STRING, FIRST, FLAT, GRID_DASH, GRID_DASH_DOT, GRID_DASH_DOT_DOT, GRID_DOT, GRID_LINE, HIGHLIGHT_SELECTION_ALWAYS, HIGHLIGHT_SELECTION_NEVER, HIGHLIGHT_SELECTION_WITH_FOCUS, HORIZONTAL_LINES, LOWERED, LOWERED_LIGHT, NONE, RAISED, RAISED_LIGHT, SELECT_CELL, SELECT_NONE, SELECT_ROW, SINGLE, SINGLE_LINE, SOLID, STRETCH, TILE, TRANSPARENT, TRUE, UPWARD_DIAGONAL_LINES, VERTICAL_LINES |
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 |
Method Summary | |
---|---|
Paint |
getBackground()
Returns a value which determines the background color behind the text. |
Border |
getBorder()
Returns the border that will be painted on the outside. |
Paint |
getBorderLineColor()
Returns a value which determines the color that line borders are drawn in. |
int |
getBorderLines()
Returns a value that determines which border lines that are drawn around the cell. |
int |
getBorderLineWidth()
Returns a value that determines the width of the lines that are drawn around the cell. |
int |
getBorderStyle()
Returns a value that determines how the border for the cell is drawn. |
Font |
getFont()
Returns the Font used to display the text of the cell. |
String |
getFontName()
Returns the name of the font used to display the text for the cell. |
int |
getFontSize()
Returns the size of the font used to display the text for the cell. |
int |
getFontUnderline()
Returns a value that determines how the text for the cell is underlined. |
Paint |
getForeground()
Returns a value which determines the color of the text. |
Object |
getFormat()
Returns a Format/Formatter object that determines how the text for the cell is formatted. |
int |
getHorizontalAlignment()
Returns a value that determines how the text for the cell is aligned horizontally. |
int |
getHorizontalTextPosition()
Returns the horizontal position of the text in relation to the icon |
Icon |
getIcon()
Returns the graphic image (glyph, icon) that the label displays. |
int |
getRotation()
Returns a value that determines the rotation of the text and icon. |
int |
getTextStyle()
Returns a value that determines how the text for the cell is drawn. |
int |
getVerticalAlignment()
Returns a value that determines how the text for the cell is aligned horizontally. |
int |
getVerticalTextPosition()
Returns the vertical position of the text in relation to the icon |
boolean |
isEditable()
Returns a value that determines whether the value for the cell can be edited by the user at run-time. |
boolean |
isFontBold()
Returns a value that determines whether the text for the cell is displayed with a bold font. |
boolean |
isFontItalic()
Returns a value that determines whether the text for the cell is displayed with an italic style. |
boolean |
isFontStrikeThrough()
Returns a value that determines whether the text for the cell is displayed with a line through the text. |
boolean |
isNegativeNumberRed()
Returns a value that determines whether negative numbers are displayed in a red color. |
boolean |
isOpaque()
Returns a value that determines whether the background for the cell is painted. |
boolean |
isWordWrap()
Returns a value that determines whether the text for the cell is wrapped onto the line below if it doesn't fit. |
void |
reset()
Resets all style information back to the default values. |
void |
setBackground(Paint c)
Sets a value which determines the background color behind the text. |
void |
setBorder(Border b)
Sets a border that will be painted around the cell. |
void |
setBorder(int borderLineWidth,
int borderStyle,
Paint borderLineColor)
Creates a border around the cell. |
void |
setBorder(int borderLineWidth,
int borderStyle,
Paint borderLineColor,
int borderLines)
Creates a border around the cell. |
void |
setBorderLineColor(Paint c)
Sets a value which determines the color that line borders are drawn in. |
void |
setBorderLines(int val)
Sets a value that determines which border lines that are drawn around the cell. |
void |
setBorderLineWidth(int val)
Sets a value that determines the width of the lines that are drawn around the cell. |
void |
setBorderStyle(int val)
Sets a value that determines how the border for the cell is drawn. |
void |
setEditable(boolean val)
Determines whether the value for the cell can be edited by the user at run-time. |
void |
setFont(Font f)
Sets the Font used to display the text of the cell. |
void |
setFontBold(boolean val)
Sets a value that determines whether the text for the cell is displayed with a bold font. |
void |
setFontItalic(boolean italic)
Sets a value that determines whether the text for the cell is displayed with an italic style. |
void |
setFontName(String name)
Sets the name of the font used to display the text for the cell. |
void |
setFontSize(int size)
Sets the size of the font used to display the text for the cell. |
void |
setFontStrikeThrough(boolean val)
Sets a value that determines whether the text for the cell is displayed with a line through the text. |
void |
setFontUnderline(int val)
Sets a value that determines how the text for the cell is underlined. |
void |
setForeground(Paint c)
Sets a value which determines the color of the text. |
void |
setFormat(Object val)
Sets a value that determines how the text for the cell is formatted. |
void |
setHorizontalAlignment(int val)
Sets the horizontal alignment of the text. |
void |
setHorizontalTextPosition(int textPosition)
Sets the horizontal position of the text in relation to the icon. |
void |
setIcon(Icon icon)
Defines the icon this component will display. |
void |
setIcon(Image image)
|
void |
setNegativeNumberRed(boolean val)
Sets a value that determines whether negative numbers are displayed in a red color. |
void |
setOpaque(boolean val)
Sets a value that determines whether the background for the cell is painted. |
void |
setRotation(int val)
Sets a value that determines the rotation of the text and icon. |
void |
setTextStyle(int val)
Sets a value that determines how the text for the cell is drawn. |
void |
setVerticalAlignment(int val)
Sets the vertical alignment of the text. |
void |
setVerticalTextPosition(int textPosition)
Sets the vertical position of the text in relation to the icon. |
void |
setWordWrap(boolean val)
Sets a value that determines whether the text for the cell is wrapped onto the line below if it doesn't fit. |
Field Detail |
---|
static final int ALIGN_DEFAULT
static final int ROTATE_DEFAULT
static final int ROTATE_0
static final int ROTATE_90
static final int ROTATE_270
Method Detail |
---|
void reset()
Paint getForeground()
void setForeground(Paint c)
Paint getBackground()
void setBackground(Paint c)
Font getFont()
void setFont(Font f)
String getFontName()
void setFontName(String name)
int getFontSize()
void setFontSize(int size)
boolean isFontBold()
void setFontBold(boolean val)
boolean isFontItalic()
void setFontItalic(boolean italic)
boolean isFontStrikeThrough()
void setFontStrikeThrough(boolean val)
int getFontUnderline()
void setFontUnderline(int val)
DEFAULT
- use the value set for the column default value
SINGLE
- single line drawn at the baseline
DOUBLE
- double line drawn at the baseline
ACCOUNTING
- single line drawn below the descent
boolean isNegativeNumberRed()
void setNegativeNumberRed(boolean val)
boolean isOpaque()
void setOpaque(boolean val)
boolean isWordWrap()
void setWordWrap(boolean val)
boolean isEditable()
void setEditable(boolean val)
int getHorizontalAlignment()
void setHorizontalAlignment(int val)
ALIGN_DEFAULT
- use the alignment set for the column
LEFT
CENTER
RIGHT
int getVerticalAlignment()
void setVerticalAlignment(int val)
ALIGN_DEFAULT
- use the alignment set for the column
TOP
CENTER
BOTTOM
int getTextStyle()
void setTextStyle(int val)
DEFAULT
- use the value set for the column default value
FLAT
- draw text normally
RAISED
- make text look like it raised off the screen with a bevel
LOWERED
- make text look like it inset into the screen
RAISED_LIGHT
- make text look like it raised off the screen but without the shadow
LOWERED_LIGHT
- make text look like it inset into the screen but without the shadow
RAISED and LOWERED
look good with larger or bold fonts. For smaller fonts use
RAISED_LIGHT and LOWERED_LIGHT
int getRotation()
void setRotation(int val)
ROTATE_0
- draw text normally
ROTATE_90
- draw text and icon at a 90 degree angle
ROTATE_270
- draw text and icon at a 270 degree angle
void setBorder(int borderLineWidth, int borderStyle, Paint borderLineColor)
setBorderLineWidth(int)
,
setBorderStyle(int)
,
setBorderLineColor(java.awt.Paint)
,
setBorderLines(int)
void setBorder(int borderLineWidth, int borderStyle, Paint borderLineColor, int borderLines)
setBorderLineWidth(int)
,
setBorderStyle(int)
,
setBorderLineColor(java.awt.Paint)
,
setBorderLines(int)
int getBorderStyle()
void setBorderStyle(int val)
DEFAULT
- use the value set for the column default value
SOLID
DOUBLE_LINE
DASH
DOT
DASH_DOT
DASH_DOT_DOT
RAISED
- make cell look like it is raised off the screen with a bevel
LOWERED
- make cell look like it is inset into the screen
ETCHED
- make border around cell look like it is etched into the surface. Background should be gray to look good.
GRID_LINE
- solid single-pixel line drawn where the grid lines are drawn
GRID_DASH
- dashed single-pixel line drawn where the grid lines are drawn
GRID_DOT
- dotted single-pixel line drawn where the grid lines are drawn
GRID_DASH_DOT
- alternating dashes and dotted single-pixel lines drawn where the grid lines are drawn
GRID_DASH_DOT_DOT
- alternating dashes and two dotted single-pixel lines drawn where the grid lines are drawn
For best results in using GRID_XXX styles you should turn off painting of grid lines by calling grid.setShowGrid( false ). If the BorderLineColor is not specified then the grid.getGridColor() will be used for GRID_XXX styles and black for the the other line styles.
int getBorderLines()
void setBorderLines(int val)
BORDER_NONE
- no border is drawn (default)
BORDER_OUTLINE
- a border line is drawn are all four sides
BORDER_LEFT
BORDER_TOP
BORDER_RIGHT
BORDER_BOTTOM
int getBorderLineWidth()
void setBorderLineWidth(int val)
Paint getBorderLineColor()
void setBorderLineColor(Paint c)
Border getBorder()
void setBorder(Border b)
Icon getIcon()
void setIcon(Icon icon)
setVerticalTextPosition(int)
,
setHorizontalTextPosition(int)
void setIcon(Image image)
int getHorizontalTextPosition()
void setHorizontalTextPosition(int textPosition)
LEFT - text is on the left side of the icon. CENTER - text and icon are centered horizontally. RIGHT - text is on the right side of the icon. (Default)
int getVerticalTextPosition()
void setVerticalTextPosition(int textPosition)
TOP - text is on the top of the icon. CENTER - text and icon are centered vertically. (Default) BOTTOM - text is on the bottom of the icon.
Object getFormat()
void setFormat(Object val)
|
Diamond Control Suite 3.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |