public class ExistingStyle
extends java.lang.Object
Implementation note: This is the "buffer" between implementation-specifics (such as Word styles) and the style enumeration convenient for fluent use in the code.
Modifier and Type | Class and Description |
---|---|
static class |
ExistingStyle.Kind |
Modifier and Type | Field and Description |
---|---|
java.lang.String |
id
String representation of ID describing type.
|
boolean |
isBuiltIn
If true, this is a built-in style.
|
java.lang.String |
name
Style name.
|
int |
outline
Number between 1 and 9, for TOC and Heading styles.
|
Constructor and Description |
---|
ExistingStyle(java.lang.String name,
java.lang.String id,
boolean isBuiltIn,
int outline,
ExistingStyle.Kind kind)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
ExistingStyle.Kind |
getKind() |
boolean |
isUsableFor(Style s)
Returns true for exact style (e.g.
|
void |
setCustomKindFrom(Style s) |
void |
setKind(ExistingStyle.Kind kind) |
java.lang.String |
toString() |
public final java.lang.String name
public final java.lang.String id
public final boolean isBuiltIn
public final int outline
public ExistingStyle(java.lang.String name, java.lang.String id, boolean isBuiltIn, int outline, ExistingStyle.Kind kind)
name
- id
- although String, could be also number (like in e.g. .docx document);
implementation has to cast to appropriate type used for IDisBuiltIn
- outline
- outline of the numbered style; relevant for TOC and heading styles, ignored for
otherskind
- potentially null; you may want to set this later on, when you can determine the
kind (such as for custom, i.e., non-built-in styles)public void setCustomKindFrom(Style s)
public boolean isUsableFor(Style s)
public ExistingStyle.Kind getKind()
public void setKind(ExistingStyle.Kind kind)
public java.lang.String toString()
toString
in class java.lang.Object
Copyright 2009-2016 Tatjana (Tanja) Kostic