Class Outlines
- java.lang.Object
-
- com.levigo.jadice.document.outline.Outlines
-
-
Field Summary
Fields Modifier and Type Field Description static String
TYPE_CUSTOM_OUTLINE
This outline type is used for custom, application-specific outlines.static String
TYPE_EMBEDDED_OUTLINE
This outline type is used for outlines embedded with the document.static String
TYPE_INDEX_OUTLINE
This outline type is used for outlines dynamically generated from a tag index.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
attach(Outline<?> outline, PropertiesProvider propertiesProvider)
Set or replace the Outline of the given type for the givenPropertiesProvider
with this outline.static Outline<?>
get(PropertiesProvider propertiesProvider, String type)
Get the Outline of the given type for the givenPropertiesProvider
.static String
getPropertyKey(Outline<?> outline)
Return the property key used to attach the given outline to aPropertiesProvider
.static String
getPropertyKey(String type)
Return the property key used to attach outlines of the given type to aPropertiesProvider
.
-
-
-
Field Detail
-
TYPE_EMBEDDED_OUTLINE
public static final String TYPE_EMBEDDED_OUTLINE
This outline type is used for outlines embedded with the document. Typical examples are a PDF Outline or a MO:DCA document index.- See Also:
- Constant Field Values
-
TYPE_INDEX_OUTLINE
public static final String TYPE_INDEX_OUTLINE
This outline type is used for outlines dynamically generated from a tag index. Thy could, for example, be created from the logical structure found in a PDF document.- See Also:
- Constant Field Values
-
TYPE_CUSTOM_OUTLINE
public static final String TYPE_CUSTOM_OUTLINE
This outline type is used for custom, application-specific outlines. Outlines may be registered under arbitrary type identifiers. However, some components may also rely on well-known type identifiers. Use of this identifier signals a generic custom outline.- See Also:
- Constant Field Values
-
-
Method Detail
-
getPropertyKey
public static String getPropertyKey(String type)
Return the property key used to attach outlines of the given type to aPropertiesProvider
. This is the key that will be used byattach(Outline,PropertiesProvider)
.- Returns:
- the property key
-
getPropertyKey
public static String getPropertyKey(Outline<?> outline)
Return the property key used to attach the given outline to aPropertiesProvider
. This is the key that will be used byattach(Outline,PropertiesProvider)
.- Returns:
- the property key
-
get
public static Outline<?> get(PropertiesProvider propertiesProvider, String type)
Get the Outline of the given type for the givenPropertiesProvider
. Returnnull
if the requested Outline does not exist. The type of outline may be any custom type identifier or one of the predefined ones.- Parameters:
propertiesProvider
- the contextPropertiesProvider
for which to retrieve the Outlinetype
- the type of outline to retrieve- Returns:
- the Outline or
null
-
attach
public static void attach(Outline<?> outline, PropertiesProvider propertiesProvider)
Set or replace the Outline of the given type for the givenPropertiesProvider
with this outline. The type of outline may be any custom type identifier or one of the predefined ones.- Parameters:
propertiesProvider
- the properties provider into which to put the Outline
-
-