Package io.jmix.ui.presentation
Interface TablePresentations
- All Known Implementing Classes:
TablePresentationsImpl
public interface TablePresentations
Provide the workflow with presentations (visual settings of a component).
A component must implement
A component must implement
HasTablePresentations
interface.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a new presentationvoid
addListener
(PresentationsChangeListener listener) Adds listenervoid
commit()
Commits all changes into the databasecreate()
getCaption
(Object id) Returns presentation caption by its idReturns the current active presentation ornull
if a current presentation didn't setReturns a default presentation ornull
if it didn't setReturns presentation by its id ornull
if a presentation doesn't existgetPresentationByName
(String name) Returns a presentation by its name with ignored case.Returns a collection of the component presentationsboolean
Returnstrue
if the selected presentation has anautoSave
settings else returnsfalse
boolean
Returnstrue
if the selected presentation is marked as global else returnsfalse
void
Modifies the selected presentationvoid
Removes a presentation from the list of available presentationsvoid
removeListener
(PresentationsChangeListener listener) Removes listenervoid
Sets current active presentation for a componentvoid
Sets a default presentationvoid
setSettings
(TablePresentation p, String settings) Sets user settings for the selected presentation
-
Method Details
-
getCurrent
Returns the current active presentation ornull
if a current presentation didn't set -
setCurrent
Sets current active presentation for a component -
getSettingsString
- Parameters:
p
- presentation- Returns:
- user settings for the selected presentation or
null
if the presentation doesn't exist or if the presentation doesn't contain any settings
-
setSettings
Sets user settings for the selected presentation- Parameters:
p
- presentationsettings
- user settings
-
getPresentation
Returns presentation by its id ornull
if a presentation doesn't exist -
getCaption
Returns presentation caption by its id -
getPresentationIds
Collection<Object> getPresentationIds()Returns a collection of the component presentations -
getDefault
Returns a default presentation ornull
if it didn't set -
setDefault
Sets a default presentation -
add
Adds a new presentation -
remove
Removes a presentation from the list of available presentations -
modify
Modifies the selected presentation -
isAutoSave
Returnstrue
if the selected presentation has anautoSave
settings else returnsfalse
-
isGlobal
Returnstrue
if the selected presentation is marked as global else returnsfalse
-
commit
void commit()Commits all changes into the database -
getPresentationByName
Returns a presentation by its name with ignored case. It returnsnull
if a presentation with such name doesn't exist -
addListener
Adds listener -
removeListener
Removes listener -
create
TablePresentation create()- Returns:
- presentation instance or stub if corresponding add-on is not added to the project
-