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 TypeMethodDescriptionvoidAdds a new presentationvoidaddListener(PresentationsChangeListener listener) Adds listenervoidcommit()Commits all changes into the databasecreate()getCaption(Object id) Returns presentation caption by its idReturns the current active presentation ornullif a current presentation didn't setReturns a default presentation ornullif it didn't setReturns presentation by its id ornullif a presentation doesn't existgetPresentationByName(String name) Returns a presentation by its name with ignored case.Returns a collection of the component presentationsbooleanReturnstrueif the selected presentation has anautoSavesettings else returnsfalsebooleanReturnstrueif the selected presentation is marked as global else returnsfalsevoidModifies the selected presentationvoidRemoves a presentation from the list of available presentationsvoidremoveListener(PresentationsChangeListener listener) Removes listenervoidSets current active presentation for a componentvoidSets a default presentationvoidsetSettings(TablePresentation p, String settings) Sets user settings for the selected presentation
-
Method Details
-
getCurrent
Returns the current active presentation ornullif 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
nullif 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 ornullif 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 ornullif 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
Returnstrueif the selected presentation has anautoSavesettings else returnsfalse -
isGlobal
Returnstrueif 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 returnsnullif 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
-