org.tinyjee.maven.dim.extensions
Class TabbedPanelParameterTransformer
java.lang.Object
org.tinyjee.maven.dim.extensions.AbstractParameterTransformer
org.tinyjee.maven.dim.extensions.TabbedPanelParameterTransformer
- All Implemented Interfaces:
- RequestParameterTransformer
public class TabbedPanelParameterTransformer
- extends AbstractParameterTransformer
This extension renders a tabbed panel from document sections (hierarchical headlines in Doxia).
Tabbed panels are useful in improving the screen appearance of large content by creating multiple pages using tabs.
When printing a document, the content renders in the same way as before (the panel is hidden and all tabs are visible).
- Author:
- Juergen_Kellerer, 2011-11-06
Field Summary |
static String |
PARAM_HIDE_TITLES
Toggles whether section titles are hidden once they were transformed into a tab (defaults to 'true'). |
static String |
PARAM_MIN_HEIGHT
Optional Parameter: Specifies a minimum tab height to improve scrolling behaviour when switching tabs. |
static String |
PARAM_TABBED_PANEL
Enables this extension and sets a regular expression matching the section titles that should be transformed into a tabs. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PARAM_TABBED_PANEL
public static final String PARAM_TABBED_PANEL
- Enables this extension and sets a regular expression matching the section titles that should be transformed into a tabs.
Note: Setting this property has no effect in case of "
source
" or "source-class
" were
specified with the macro call. This behaviour ensures that the parameter "tabbed-panel
" can still be used
with ordinary macro calls where a source or source-class was set.
This parameter expects a regular expression that is used to select what sections turn into tabs and what not by matching
the given titles (headlines).
By default the javascript looks for the first section that follows the include position and continues with all
siblings (sections of the same level). Neither parent nor child sections are processed, therefore it's mostly safe
to use the match all expression .*
if all sub-sequent sections of the same nesting level should
turn into tabs.
Examples:
- "
%{include|tabbed-panel=.*}
" - Transforms all following sections (of the same level) to tabs.
- "
%{include|tabbed-panel=.*(Example).*}
" - Transforms all following sections to tabs that contain
the word "Example".
- See Also:
- Constant Field Values
PARAM_HIDE_TITLES
public static final String PARAM_HIDE_TITLES
- Toggles whether section titles are hidden once they were transformed into a tab (defaults to 'true').
- See Also:
- Constant Field Values
PARAM_MIN_HEIGHT
public static final String PARAM_MIN_HEIGHT
- Optional Parameter: Specifies a minimum tab height to improve scrolling behaviour when switching tabs.
- See Also:
- Constant Field Values
TabbedPanelParameterTransformer
public TabbedPanelParameterTransformer()
doTransformParameters
protected boolean doTransformParameters(Map<String,Object> requestParams)
- Specified by:
doTransformParameters
in class AbstractParameterTransformer