Interface LayoutDragComponent
-
- All Known Implementing Classes:
DisabledExperimentalLayoutComponent,InternalDragComponent
public interface LayoutDragComponentThis interface defines the main contract between the Layout Editor's module and components implementations.
-
-
Field Summary
Fields Modifier and Type Field Description static DndDataJSONConverterconverterstatic StringFORMAT
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Optional<com.google.gwt.user.client.ui.IsWidget>getContentPart(String partId, RenderingContext componentContext)Get a specific part of this widget.default StringgetDragComponentIconClass()The CSS classes used to display the component's icon on the drag palette.StringgetDragComponentTitle()The title displayed in the component drag palette.com.google.gwt.user.client.ui.IsWidgetgetPreviewWidget(RenderingContext ctx)Widget shown during the layout edition.default List<org.uberfire.ext.properties.editor.model.PropertyEditorCategory>getPropertyCategories(org.uberfire.ext.layout.editor.api.editor.LayoutComponent layoutComponent)Get the list of properties (grouped into categories) supported by this drag component.com.google.gwt.user.client.ui.IsWidgetgetShowWidget(RenderingContext ctx)The widget that display and provides all the component features.default voidremoveCurrentWidget(RenderingContext ctx)A command called before the widget was removed from layout.
-
-
-
Field Detail
-
FORMAT
static final String FORMAT
- See Also:
- Constant Field Values
-
converter
static final DndDataJSONConverter converter
-
-
Method Detail
-
getDragComponentIconClass
default String getDragComponentIconClass()
The CSS classes used to display the component's icon on the drag palette.- Returns:
- A CSS class reference
-
getPropertyCategories
default List<org.uberfire.ext.properties.editor.model.PropertyEditorCategory> getPropertyCategories(org.uberfire.ext.layout.editor.api.editor.LayoutComponent layoutComponent)
Get the list of properties (grouped into categories) supported by this drag component. These properties will be edited into the layout editor's properties panel and their values will be stored in theLayoutComponentinstance passed as a parameter.This drag component can use this property edition/storage features to customize its display and/or behaviour.
- Returns:
- A list of supported properties classified into several categories.
-
getDragComponentTitle
String getDragComponentTitle()
The title displayed in the component drag palette.
-
getPreviewWidget
com.google.gwt.user.client.ui.IsWidget getPreviewWidget(RenderingContext ctx)
Widget shown during the layout edition.Notice this is just a widget preview, so not all the component features need to be available at preview time. Just a widget that gives the user an idea of how the final component might look like.
- Parameters:
ctx- The context for the component being rendered
-
getShowWidget
com.google.gwt.user.client.ui.IsWidget getShowWidget(RenderingContext ctx)
The widget that display and provides all the component features. This is the widget during the layout rendering process.- Parameters:
ctx- The context for the component being rendered
-
removeCurrentWidget
default void removeCurrentWidget(RenderingContext ctx)
A command called before the widget was removed from layout. This is usually used for cleanup tasks.- Parameters:
ctx- The context for the component being rendered
-
getContentPart
default Optional<com.google.gwt.user.client.ui.IsWidget> getContentPart(String partId, RenderingContext componentContext)
Get a specific part of this widget.- Parameters:
partId-componentContext-- Returns:
-
-