|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sourceforge.spedit.core.Styleable.StyleSheet
The StyleSheet
provides a flexible way to store
structured, hierarchized style information. These stylesheet support
inheritance of whole, or part of the style tree structure, plus
resolution into a parent Styleable
element.
Field Summary | |
float |
align
|
Color |
background
|
Color |
borderColor
|
short |
borderPaddingBottom
|
short |
borderPaddingLeft
|
short |
borderPaddingRight
|
short |
borderPaddingTop
|
int |
borderSize
|
static float |
CENTER
|
Font |
font
|
Color |
foreground
|
boolean |
hasExpander
|
protected Hashtable |
inherited
|
static float |
LEFT
|
int |
lineHeight
|
protected Vector |
listeners
|
protected String |
name
This hash stores the different root properties and property groups. |
short |
paddingBottom
|
short |
paddingLeft
|
short |
paddingRight
|
short |
paddingTop
|
protected Styleable |
parent
|
protected Hashtable |
properties
|
protected Hashtable |
propertiesClasses
|
static float |
RIGHT
|
String |
title
|
Font |
titleFont
|
short |
titlePaddingBottom
|
short |
titlePaddingLeft
|
short |
titlePaddingRight
|
short |
titlePaddingTop
|
float |
width
|
Constructor Summary | |
Styleable.StyleSheet()
|
|
Styleable.StyleSheet(String name)
|
|
Styleable.StyleSheet(String name,
Styleable parent)
|
Method Summary | |
void |
addPropertyChangeListener(PropertyChangeListener l)
Adds a listener that will be called each time a property of the stylable object changes. |
protected void |
firePropertyChange(PropertyChangeEvent evt)
|
String |
getName()
|
Styleable |
getParent()
|
Object |
getStyle(String property)
Gets the given style propery. |
Class |
getStyleClass(String property)
Returns the class of the object bound to the given style property. |
protected Styleable.StyleSheet |
getStyleOwner(String property)
Retrieves the parent of the given property. |
void |
inheritStyle(String property,
Styleable.StyleSheet stylesheet)
Inherits only a given property or group of properties from the given stylable object. |
void |
inheritStyle(Styleable.StyleSheet stylesheet)
Inherits all the properties of the given stylable object. |
protected void |
init()
|
Enumeration |
listProperties(String group)
|
void |
propertyChange(PropertyChangeEvent evt)
|
void |
removePropertyChangeListener(PropertyChangeListener l)
|
void |
setName(String name)
|
void |
setParent(Styleable parent)
|
void |
setStyle(String property,
Object value)
Sets the style property designated by the property
parameter to the given value . |
void |
setStyleClass(String property,
Class pclass)
Specifies that the given property has to be of the given class. |
String |
toString()
|
void |
update()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final float LEFT
public static final float CENTER
public static final float RIGHT
protected String name
font.name
and font.size
will
be accessed by getting the font
entry of the has,
which will be a hash itself and which will contain the
name
and size
properties.protected Hashtable properties
protected Hashtable propertiesClasses
protected Hashtable inherited
protected Vector listeners
protected Styleable parent
public short paddingLeft
public short paddingRight
public short paddingTop
public short paddingBottom
public int lineHeight
public float align
public float width
public Font font
public Color foreground
public Color background
public String title
public Font titleFont
public short titlePaddingLeft
public short titlePaddingRight
public short titlePaddingTop
public short titlePaddingBottom
public int borderSize
public Color borderColor
public short borderPaddingLeft
public short borderPaddingRight
public short borderPaddingTop
public short borderPaddingBottom
public boolean hasExpander
Constructor Detail |
public Styleable.StyleSheet()
public Styleable.StyleSheet(String name)
public Styleable.StyleSheet(String name, Styleable parent)
Method Detail |
protected void init()
public void setStyleClass(String property, Class pclass)
public void setStyle(String property, Object value)
property
parameter to the given value
.protected Styleable.StyleSheet getStyleOwner(String property)
this
object in case the property is defined locally,
otherwise the parent from which the property is inherited is given.
In case the property is not defined nor inherited,
null
is returned.public Object getStyle(String property)
public Class getStyleClass(String property)
public void inheritStyle(Styleable.StyleSheet stylesheet)
public void inheritStyle(String property, Styleable.StyleSheet stylesheet)
public Enumeration listProperties(String group)
public void addPropertyChangeListener(PropertyChangeListener l)
public void removePropertyChangeListener(PropertyChangeListener l)
public void propertyChange(PropertyChangeEvent evt)
propertyChange
in interface PropertyChangeListener
protected void firePropertyChange(PropertyChangeEvent evt)
public String getName()
public void setName(String name)
public Styleable getParent()
public void setParent(Styleable parent)
public void update()
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |