Class HtmlSidebarWidget
java.lang.Object
io.goobi.viewer.model.cms.widgets.CustomSidebarWidget
io.goobi.viewer.model.cms.widgets.HtmlSidebarWidget
- All Implemented Interfaces:
IPolyglott
,Serializable
A subtype of
CustomSidebarWidget
to display a html text in different languages- Author:
- florian
- See Also:
-
Field Summary
Fields inherited from class io.goobi.viewer.model.cms.widgets.CustomSidebarWidget
id
-
Constructor Summary
ConstructorDescriptionEmpty default constructorCloning constructor -
Method Summary
Modifier and TypeMethodDescriptiongetType()
Return the type of this custom sidebar widget.boolean
isComplete
(Locale locale) If this returns true, an associated language tab should have the 'already-translated' class, otherwise the '-partly-translated' class unlessIPolyglott.isEmpty(Locale)
also returns trueboolean
If this returns true, an associated language tab should have neither the 'already-translated' nor the '-partly-translated' classvoid
setSelectedLocale
(Locale locale) Set the locale to use for display and editingMethods inherited from class io.goobi.viewer.model.cms.widgets.CustomSidebarWidget
clone, getDescription, getId, getSelectedLocale, getStyleClass, getTitle, isCollapsed, isValid, setCollapsed, setId, setStyleClass, setTitle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.goobi.viewer.model.translations.IPolyglott
getLocales, isDefaultLocaleSelected, isSelected, setSelectedLocale
-
Constructor Details
-
HtmlSidebarWidget
public HtmlSidebarWidget()Empty default constructor -
HtmlSidebarWidget
Cloning constructor- Parameters:
o
-
-
-
Method Details
-
getHtmlText
- Returns:
- the html text
-
isComplete
Description copied from interface:IPolyglott
If this returns true, an associated language tab should have the 'already-translated' class, otherwise the '-partly-translated' class unlessIPolyglott.isEmpty(Locale)
also returns true- Specified by:
isComplete
in interfaceIPolyglott
- Overrides:
isComplete
in classCustomSidebarWidget
- Returns:
- true if
IPolyglott.isValid(Locale)
returns true for the given locale and all fields contain a value which have a value in the default locale. For the default locale,IPolyglott.isComplete(Locale)
andIPolyglott.isValid(Locale)
are identical. For implementations with only one field, both methods are also always identical
-
isEmpty
Description copied from interface:IPolyglott
If this returns true, an associated language tab should have neither the 'already-translated' nor the '-partly-translated' class- Specified by:
isEmpty
in interfaceIPolyglott
- Overrides:
isEmpty
in classCustomSidebarWidget
- Returns:
- true if no fields are filled for the given locale
-
setSelectedLocale
Description copied from interface:IPolyglott
Set the locale to use for display and editing- Specified by:
setSelectedLocale
in interfaceIPolyglott
- Overrides:
setSelectedLocale
in classCustomSidebarWidget
-
getType
Description copied from class:CustomSidebarWidget
Return the type of this custom sidebar widget. Must be implemented by subclasses ofCustomSidebarWidget
- Overrides:
getType
in classCustomSidebarWidget
- Returns:
CustomWidgetType
-