|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.xoetrope.swt.XStyle
public class XStyle
A style for storing information about the look of a component. Information such as font (face, size, bold, italic), color (fore, back).
Copyright (c) Xoetrope Ltd., 1998-2003
License: see license.txt $Revision: 2.5 $
Field Summary | |
---|---|
static int |
COLOR_BACK
The component back color style |
static int |
COLOR_FORE
The component fore color style |
static int |
FONT_FACE
The font face/family style |
static int |
FONT_ITALIC
The font italic style |
static int |
FONT_SIZE
The font size style |
static int |
FONT_WEIGHT
The font weight (bold) style |
Constructor Summary | |
---|---|
XStyle()
Create a new style object |
Method Summary | |
---|---|
java.lang.Object |
clone()
Create a copy of this component |
int |
getNumStyles()
Get the number of styles managed by this style object |
org.eclipse.swt.graphics.Color |
getStyleAsColor(int key)
Retrieve a style element as a Color. |
int |
getStyleAsInt(int key)
Retrieve a style element as an int. |
java.lang.String |
getStyleAsString(int key)
Retrieve a style element as a String. |
void |
mergeStyle(XStyle newStyle)
For applying a hierarchy of styles to a new XStyle. |
void |
setNumStyles(int num)
Set the number of styles. |
void |
setStyle(int key,
int value)
Set a style element. |
void |
setStyle(int key,
java.lang.Object value)
Set a style element. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int FONT_FACE
public static final int FONT_SIZE
public static final int FONT_WEIGHT
public static final int FONT_ITALIC
public static final int COLOR_BACK
public static final int COLOR_FORE
Constructor Detail |
---|
public XStyle()
Method Detail |
---|
public void setNumStyles(int num)
num
- the number of new parameterspublic int getNumStyles()
public java.lang.Object clone()
clone
in class java.lang.Object
public void setStyle(int key, java.lang.Object value)
key
- The index of the elementvalue
- The Object value of the elementpublic void setStyle(int key, int value)
key
- The index of the elementvalue
- The int value of the elementpublic int getStyleAsInt(int key)
key
- The index of the style required
public java.lang.String getStyleAsString(int key)
key
- The index of the style required
public org.eclipse.swt.graphics.Color getStyleAsColor(int key)
key
- The index of the style required
public void mergeStyle(XStyle newStyle)
newStyle
- the style to merge with the current object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |