Package com.storedobject.ui
Class ObjectsViewer
java.lang.Object
com.storedobject.vaadin.View
com.storedobject.ui.ObjectsViewer
- All Implemented Interfaces:
ClickHandler,CloseableView,ExecutableView,ValueChangeHandler,com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<? extends com.vaadin.flow.component.Component>>,com.vaadin.flow.component.HasValue.ValueChangeListener,Serializable,Runnable,EventListener
ObjectsViewer is a specialized UI component that serves as a container for displaying
various stored objects within a tabbed interface. It extends the
View class and
implements the CloseableView interface.
ObjectsViewer allows dynamically adding objects to be displayed in separate tabs,
with options to customize the tab captions.- Author:
- Syam
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.storedobject.vaadin.ClickHandler
ClickHandler.ModifiedClickEvent<C extends com.vaadin.flow.component.Component> -
Constructor Summary
ConstructorsConstructorDescriptionObjectsViewer(String caption, com.vaadin.flow.component.Component... components) Constructs anObjectsViewerinstance with a specified caption and an optional array of additional UI components to be displayed in the header. -
Method Summary
Modifier and TypeMethodDescription<T extends StoredObject>
voidadd(T object) Adds a stored object to the system with the option to specify additional parameters.<T extends StoredObject>
voidAdds an object to the editor with the specified caption or generates one if not provided.Methods inherited from class com.storedobject.vaadin.View
abort, aborted, addClosedListener, addOpenedListener, clean, close, createCloseableView, createWindow, decorateComponent, execute, execute, execute, executing, focus, focus, focusAny, getApplication, getCaption, getComponent, getContent, getCreatedBy, getEmbeddedView, getMenuItem, getMenuItem, getView, initUI, invoke, isFullScreen, isScrollable, isWindowMode, select, setCaption, setComponent, setCreatedBy, setDefaultPadding, setEmbeddedView, setFirstFocus, setFullScreen, setScrollable, setWindowMode, skipFirstFocusMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.storedobject.vaadin.ClickHandler
clicked, doubleClicked, onComponentEvent, rightClickedMethods inherited from interface com.storedobject.vaadin.ExecutableView
clearAlerts, clicked, createMenuItem, error, getMenuIconName, getView, isCloseable, isHomeView, log, log, message, returnedFrom, run, setClickable, speak, trackValueChange, tray, valueChanged, warningMethods inherited from interface com.storedobject.vaadin.ValueChangeHandler
valueChanged
-
Constructor Details
-
ObjectsViewer
Constructs anObjectsViewerinstance with a specified caption and an optional array of additional UI components to be displayed in the header.- Parameters:
caption- The caption text to be displayed as the title of this view.components- Optional additionalComponents to be included in the header; if no components are provided, a default label with the caption will be displayed in the header.
-
-
Method Details
-
add
Adds a stored object to the system with the option to specify additional parameters.- Type Parameters:
T- The type of the object to be added, restricted to subclasses of StoredObject.- Parameters:
object- The stored object to be added. Must be a subclass of StoredObject.
-
add
Adds an object to the editor with the specified caption or generates one if not provided.- Type Parameters:
T- The type of the object to be added, restricted to subclasses of StoredObject.- Parameters:
object- The object to be added. If this is null, the method will exit without performing any action.caption- The caption to be used for the object tab. If this is null, empty, or "_", a caption will be generated based on the object's reference (if it implements HasReference) or the class name.
-