|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jopendocument.dom.ODNode org.jopendocument.dom.Style
public class Style
A style, see section 16 of v1.2-part1. Maintains a map of family to classes.
Constructor Summary | |
---|---|
Style(ODPackage pkg,
org.jdom.Element styleElem)
|
Method Summary | ||
---|---|---|
protected void |
checkElemName()
|
|
Style |
dup()
Make a copy of this style and add it to its document. |
|
boolean |
equals(Object obj)
|
|
protected StyleDesc<?> |
getDesc()
|
|
org.jdom.Element |
getFormattingProperties()
|
|
org.jdom.Element |
getFormattingProperties(String family)
Create if necessary and return the wanted properties. |
|
org.jdom.Element |
getFormattingProperties(String family,
boolean create)
|
|
String |
getName()
|
|
protected static
|
getNonNullStyleDesc(Class<S> clazz,
XMLVersion version,
org.jdom.Element styleElem,
String styleName)
|
|
XMLVersion |
getNS()
|
|
protected ODPackage |
getPackage()
|
|
static Style |
getReferencedStyle(ODPackage pkg,
org.jdom.Attribute styleAttr)
|
|
static org.jdom.Element |
getReferencedStyleElement(ODPackage pkg,
org.jdom.Attribute styleAttr)
Return the style element referenced by the passed attribute. |
|
List<org.jdom.Element> |
getReferences()
Return the elements referring to this style. |
|
protected org.jdom.Namespace |
getSTYLE()
|
|
static
|
getStyle(ODPackage pkg,
Class<S> clazz,
String name)
|
|
static
|
getStyleDesc(Class<S> clazz,
XMLVersion version)
|
|
static
|
getStyleStyleDesc(Class<S> clazz,
XMLVersion version)
|
|
int |
hashCode()
|
|
boolean |
isReferencedAtMostOnce()
|
|
static boolean |
isStandardStyleResolution()
|
|
static void |
register(StyleDesc<?> desc)
|
|
static void |
registerAllVersions(StyleDesc<? extends Style> desc)
|
|
static void |
setStandardStyleResolution(boolean std)
Whether to search styles according to the standard or to LibreOffice. |
|
static Style |
warp(ODPackage pkg,
org.jdom.Element styleElem)
Create the most specific instance for the passed element. |
Methods inherited from class org.jopendocument.dom.ODNode |
---|
getElement, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Style(ODPackage pkg, org.jdom.Element styleElem)
Method Detail |
---|
public static void setStandardStyleResolution(boolean std)
std
- true
to search like the standard, false
to search like
LibreOffice.public static boolean isStandardStyleResolution()
public static void registerAllVersions(StyleDesc<? extends Style> desc)
public static void register(StyleDesc<?> desc)
public static Style warp(ODPackage pkg, org.jdom.Element styleElem)
pkg
- the package where the style is defined.styleElem
- a style:style XML element.
public static <S extends Style> S getStyle(ODPackage pkg, Class<S> clazz, String name)
public static org.jdom.Element getReferencedStyleElement(ODPackage pkg, org.jdom.Attribute styleAttr)
pkg
- the package where styleAttr
is defined.styleAttr
- any attribute in pkg
, e.g.
style:page-layout-name="pm1"
of a style:master-page.
styleAttr
is an attribute pointing to a style
in the passed package, null
otherwise, e.g.
.public static Style getReferencedStyle(ODPackage pkg, org.jdom.Attribute styleAttr)
public static <S extends Style> StyleDesc<S> getStyleDesc(Class<S> clazz, XMLVersion version)
public static <S extends StyleStyle> StyleStyleDesc<S> getStyleStyleDesc(Class<S> clazz, XMLVersion version)
protected static <S extends Style> StyleDesc<S> getNonNullStyleDesc(Class<S> clazz, XMLVersion version, org.jdom.Element styleElem, String styleName)
protected void checkElemName()
protected final ODPackage getPackage()
protected final org.jdom.Namespace getSTYLE()
public final XMLVersion getNS()
public final String getName()
protected StyleDesc<?> getDesc()
public org.jdom.Element getFormattingProperties()
public final org.jdom.Element getFormattingProperties(String family)
family
- type of properties, eg "text".
public final org.jdom.Element getFormattingProperties(String family, boolean create)
public final List<org.jdom.Element> getReferences()
public final boolean isReferencedAtMostOnce()
public final Style dup()
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |