|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.lbs.maps.view.StyleSet
public class StyleSet
Represents a set of styles.
This class contains three levels of styles:
There are also default values for class-specific styles and a system-wide default style.
Class-specific styles can be hierarchical. In certain situations, the
style for class X can be applied when generating a style for a
Mappable object that is a subclass of X. See individual methods to
determine where this is applicable.
| Constructor Summary | ||
|---|---|---|
StyleSet()
Constructs a new StyleSet instance. |
||
| Method Summary | ||
|---|---|---|
void |
addClassBasedStyle(Class clazz,
Style style)
Adds a class-based style to this style set. |
|
void |
addIdBasedStyle(Object id,
Style style)
Adds an ID-based style to this style set. |
|
Style |
generateStyle(Mappable data)
Generates a style for the specified Mappable object. |
|
Style |
getBaseStyle()
Retrieves the base style for this style set. |
|
Style |
getClassBasedStyle(Class clazz)
Retrieves the style that is associated with the specified class. |
|
Style |
getIdBasedStyle(Object id)
Retrieves the style that is associated with the specified ID. |
|
void |
removeAllClassBasedStyles()
Removes all class-based styles from this style set. |
|
void |
removeAllIdBasedStyles()
Removes all ID-based styles from this style set. |
|
void |
removeClassBasedStyle(Class clazz)
Removes a class-based style from this style set. |
|
void |
removeIdBasedStyle(Object id)
Removes an ID-based style from this style set. |
|
void |
setBaseStyle(Style newBaseStyle)
Sets the base style for this style set. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StyleSet()
StyleSet instance.
| Method Detail |
|---|
public Style getBaseStyle()
public void setBaseStyle(Style newBaseStyle)
newBaseStyle - The base style to set.
public void addIdBasedStyle(Object id,
Style style)
id - The ID of the data to use the style with.style - The style to store.public void removeIdBasedStyle(Object id)
id - The ID that is associated with the style to remove.public void removeAllIdBasedStyles()
public Style getIdBasedStyle(Object id)
id - The ID that is associated with the desired style.
null if it doesn't exist.StyleSet.generateStyle(Mappable)
public void addClassBasedStyle(Class clazz,
Style style)
clazz - The class to store the style against.style - The style to store.public void removeClassBasedStyle(Class clazz)
clazz - The class that is associated with the style to remove.public void removeAllClassBasedStyles()
public Style getClassBasedStyle(Class clazz)
clazz - The class that is associated with the desired style.
null if it doesn't exist. This
method returns style information only for a specific class, and ignores
the class's hierarchy. Thus, if a superclass of the desired class has
been defined, the information of the superclass is not returned.StyleSet.generateStyle(Mappable)public Style generateStyle(Mappable data)
Mappable object.
The Style object that this method returns is
complete, which means that none of the style properties are defined as
inherited.
The Style object is based on an overlay pattern:
Mappable object.
If there are still any incomplete properties, then system default values are used to populate those properties, starting with class-based styles and then using the system default style.
data - The mappable entity that contains the ID and class to base
the style on.
null.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal