|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.levigo.jadice.document.DocumentLayer
public class DocumentLayer
Class representing a layer of a Document
. The layers represent the z-axis of a document.
Each Page
in the document consists of a stack of AbstractPageSegment
s which
correspond to DocumentLayer
s. In other words, a DocumentLayer
represents a virtual slot in the stack of layers that make up the document whereas the
PageSegment
s fill these slots.
Please note: the layers pertain to the whole document, therefore not all layers of a page need to be occupied with page segments.
Field Summary | |
---|---|
static DocumentLayer |
ANNOTATIONS
A layer typically used for annotations. |
static DocumentLayer |
BACKGROUND
A layer typically used for a document backdrop, e.g. |
static DocumentLayer |
DEFAULT
A layer typically used for the document itself. HINT: This layer is installed by default in the default layer cache. |
static DocumentLayer |
EMBEDDED_ANNOTATIONS
A layer typically used for format specific inline annotations. |
static DocumentLayer |
FORM
A layer typically used for form elements. HINT: This layer is installed by default in the default layer cache. |
static List<DocumentLayer> |
STANDARD_LAYERS
A list of the standard layers defined as constants in this class. |
Method Summary | |
---|---|
int |
compareTo(DocumentLayer o)
Compare two DocumentLayers. |
boolean |
equals(Object obj)
|
static DocumentLayer |
get(String name)
Return the document layer with the given name. |
static DocumentLayer |
get(String name,
int priority)
Return the document layer with the given name and priority. |
String |
getName()
Gets the name. |
int |
getPriority()
Return this layer's default ordering priority. |
int |
hashCode()
|
static void |
setDocumentLayerCache(DocumentLayerCache documentLayerCache)
This method replaces the currently used layer cache. |
String |
toString()
Return text representation of the layer. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final DocumentLayer ANNOTATIONS
public static final DocumentLayer FORM
public static final DocumentLayer EMBEDDED_ANNOTATIONS
public static final DocumentLayer DEFAULT
public static final DocumentLayer BACKGROUND
public static final List<DocumentLayer> STANDARD_LAYERS
Method Detail |
---|
public static DocumentLayer get(String name)
DocumentLayerCache
is not replaced. If the layer
does not already exist, a new layer will be created with its default priority being the same as
DEFAULT
.
name
-
IllegalArgumentException
- if name
is null
setDocumentLayerCache(DocumentLayerCache)
public static DocumentLayer get(String name, int priority)
DocumentLayerCache
is not replaced. If
the layer does not already exist, a new layer will be created the given priority. If the layer
does already exist, but the requested priority differs from the one of the existing
layer, an IllegalArgumentException
is thrown.
name
- the layer namepriority
- the priority.
IllegalArgumentException
- if name is null
or there is already a document
layer with the given name, but the requested priority differs from the existing
one's.setDocumentLayerCache(DocumentLayerCache)
public static void setDocumentLayerCache(DocumentLayerCache documentLayerCache)
documentLayerCache
- the new layer cache to be used, this parameter must not be
null
public String getName()
public int compareTo(DocumentLayer o)
compareTo
in interface Comparable<DocumentLayer>
Comparable.compareTo(Object)
public String toString()
toString
in class Object
Object.toString()
public int getPriority()
Ordering priorities indicate the layer position within the layer stack. Higher priorities indicating a position closer to the top of the layer stack, lower priorities positions closer to the bottom.
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |