|
OBEROn SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.oberon.client.CSSStyle
public class CSSStyle
CSS Style for SWT widgets
Constructor Summary | |
---|---|
CSSStyle(java.lang.String name)
Defines new CSS style with a specific class name |
Method Summary | |
---|---|
org.eclipse.swt.graphics.Color |
getBackGroundColor()
Returns the widget background color (null if not set) |
org.eclipse.swt.graphics.Image |
getBackGroundImage()
Returns the widget background image |
org.eclipse.swt.graphics.Color |
getColor()
Returns the widget text foreground color (null if not set) |
org.eclipse.swt.graphics.Font |
getFont()
Returns the widget text font style (null if not set) |
org.eclipse.swt.graphics.Image |
getImage()
Returns the widget image |
int[] |
getMargin()
Returns the margins outside the widget (null if not set) |
java.lang.String |
getName()
Returns the CSS style (class) name |
int[] |
getPadding()
Returns the margins inside the control or composite (null if not set) |
int |
getSettingCount()
Returns the number of settings for this style |
java.util.Enumeration<java.lang.String> |
getSettings()
Returns an Enumeration containing the names settings for this style |
int[] |
getSpacing()
Returns the grid spacing (null if not set) |
java.lang.String |
getTextAlignment()
Returns the widget horizontal alignment inside the grid span (null if not set) |
java.lang.String |
getVerticalAlignment()
Returns the widget vertical alignment inside the grid span (null if not set) |
void |
setBackGroundColor(int red,
int green,
int blue)
Sets the widget background color |
void |
setBackGroundColor(java.lang.String color)
Sets the widget background color |
void |
setBackGroundImage(java.lang.String url)
Sets the widget background image |
void |
setColor(int red,
int green,
int blue)
Sets the widget text foreground color |
void |
setColor(java.lang.String color)
Sets the widget text foreground color |
void |
setFont(java.lang.String family,
int size,
int modifier)
Sets the widget text font style |
void |
setImage(java.lang.String url)
Sets the widget image |
void |
setMargin(int top,
int right,
int bottom,
int left)
Sets the margins outside the widget (inside the grid span) |
void |
setMargin(java.lang.String margin)
Sets the margins outside the widget (inside the grid span) |
void |
setPadding(int top,
int right,
int bottom,
int left)
Sets the margins inside the control or composite |
void |
setPadding(java.lang.String padding)
Sets the margins inside the control or composite |
void |
setSpacing(int horizontal,
int vertical)
Sets the grid spacing |
void |
setTextAlignment(java.lang.String align)
Sets the widget horizontal alignment inside the grid span |
void |
setVerticalAlignment(java.lang.String align)
Sets the widget vertical alignment inside the grid span |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CSSStyle(java.lang.String name)
Method Detail |
---|
public void setFont(java.lang.String family, int size, int modifier)
family
- the name of the font (must not be null)size
- the font height in pointsmodifier
- a bit or combination of NORMAL, BOLD, ITALICpublic void setColor(java.lang.String color)
color
- CSS color [ Color RGB: rgb(r,g,b) / Color HexValue: #RRGGBB / ColorName: red,yellow... ]public void setColor(int red, int green, int blue)
red
- the amount of red in the colorgreen
- the amount of green in the colorblue
- the amount of blue in the colorpublic void setBackGroundColor(java.lang.String color)
color
- CSS color [ Color RGB: rgb(r,g,b) / Color HexValue: #RRGGBB / ColorName: red,yellow... ]public void setBackGroundColor(int red, int green, int blue)
red
- the amount of red in the colorgreen
- the amount of green in the colorblue
- the amount of blue in the colorpublic void setBackGroundImage(java.lang.String url)
url
- the background image urlpublic void setImage(java.lang.String url)
url
- the image urlpublic void setTextAlignment(java.lang.String align)
align
- the CSS alignment value ("left" , "center" , "right")public void setVerticalAlignment(java.lang.String align)
align
- the CSS alignment value ("top" , "middle" , "bottom")public void setSpacing(int horizontal, int vertical)
horizontal
- the horizontal spacingvertical
- the vertical spacingpublic void setPadding(int top, int right, int bottom, int left)
top
- the top marginright
- the right marginbottom
- the bottom marginleft
- the left marginpublic void setPadding(java.lang.String padding)
padding
- the CSS padding values ( "top[px/pt] right[px/pt] bottom[px/pt] left[px/pt]" )public void setMargin(int top, int right, int bottom, int left)
top
- the top marginright
- the right marginbottom
- the bottom marginleft
- the left marginpublic void setMargin(java.lang.String margin)
margin
- the CSS margin values ( "top[px/pt] right[px/pt] bottom[px/pt] left[px/pt]" )public java.lang.String getName()
public int getSettingCount()
public java.util.Enumeration<java.lang.String> getSettings()
public org.eclipse.swt.graphics.Font getFont()
public org.eclipse.swt.graphics.Color getColor()
public org.eclipse.swt.graphics.Color getBackGroundColor()
public org.eclipse.swt.graphics.Image getBackGroundImage()
public org.eclipse.swt.graphics.Image getImage()
public java.lang.String getTextAlignment()
public java.lang.String getVerticalAlignment()
public int[] getPadding()
public int[] getMargin()
public int[] getSpacing()
|
OBEROn SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |