org.jopendocument.dom
Class StyledNode<S extends Style,D extends ODDocument>
java.lang.Object
org.jopendocument.dom.ODNode
org.jopendocument.dom.StyledNode<S,D>
- Type Parameters:
S - type of style.D - type of document.
- Direct Known Subclasses:
- ImmutableDocStyledNode, TextNode
public abstract class StyledNode<S extends Style,D extends ODDocument>
- extends ODNode
A node with a style.
- Author:
- Sylvain CUAZ
|
Constructor Summary |
StyledNode(org.jdom.Element local,
java.lang.Class<S> styleClass)
Create a new instance. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
StyledNode
public StyledNode(org.jdom.Element local,
java.lang.Class<S> styleClass)
- Create a new instance. We used to find the
Style class with reflection but this was
slow.
- Parameters:
local - our XML model.styleClass - our class of style, cannot be null.
setStyleName
public static final void setStyleName(org.jdom.Element elem,
java.lang.String name)
getODDocument
public abstract D getODDocument()
getStyleDesc
public final StyleDesc<S> getStyleDesc()
getStyleDesc
public final <S2 extends Style> StyleDesc<S2> getStyleDesc(java.lang.Class<S2> clazz)
getStyleStyleDesc
public final <S2 extends StyleStyle> StyleStyleDesc<S2> getStyleStyleDesc(java.lang.Class<S2> clazz)
getStyle
public final S getStyle()
getPrivateStyle
public final S getPrivateStyle()
- Assure that this node's style is only referenced by this. I.e. after this method returns the
style of this node can be safely modified without affecting other nodes.
- Returns:
- this node's style, never
null.
setStyleName
public final void setStyleName(java.lang.String name)