T
- the type of inherit of Toc
.public abstract class Toc<T extends Toc<?>> extends BsComponent
Modifier | Constructor and Description |
---|---|
protected |
Toc(String type,
String component) |
Modifier and Type | Method and Description |
---|---|
static Toc<?> |
createSidebar(ISkinConfig config) |
static Toc<?> |
createToc(ISkinConfig config,
String preferredType) |
static Toc<?> |
createTopBar(ISkinConfig config) |
List<? extends HtmlTool.IdElement> |
getTocItems(ISkinConfig skinConfig) |
String |
getType() |
boolean |
isEnabled()
Gets the indicating whether is enable.
|
protected String |
onPreRender(ISkinConfig skinConfig,
String bodyContent)
generic pre-rendering method executed on all components of context.
|
protected T |
self() |
String |
toString() |
protected T |
withEnabled(boolean enabled)
Sets the indicating whether is enable.
|
getBackground, getCssClass, getTheme, setBackground, setTheme
addChildren, addCssOptions, getBodyContent, getCssOptions, getHtmlTool, setCssClass
public static final String COMPONENT
public static Toc<?> createToc(@Nonnull ISkinConfig config, @Nullable String preferredType)
config
- a config (can not be null
).preferredType
- the default type of Toc to use.Toc
to configuration.public static Toc<?> createSidebar(@Nonnull ISkinConfig config)
config
- a config (can not be null
).public static Toc<?> createTopBar(@Nonnull ISkinConfig config)
config
- a config (can not be null
).protected T self()
public boolean isEnabled()
true
if is enable, otherwise false
.public List<? extends HtmlTool.IdElement> getTocItems(ISkinConfig skinConfig)
skinConfig
- a config (can not be null
).HtmlTool.IdElement
representing the heading tree containing in current page.protected T withEnabled(boolean enabled)
enabled
- status to use.protected String onPreRender(@Nonnull ISkinConfig skinConfig, @Nonnull String bodyContent)
Component
onPreRender
in class Component
skinConfig
- the current skin config.bodyContent
- the current body content.String
representing the transformed body content on pre-rendering.Copyright © 2012–2023 Friederich Christophe. All rights reserved.