public interface WidgetService
| Modifier and Type | Field and Description |
|---|---|
static String |
COMPOSED_ROOT_SLOT_ID |
| Modifier and Type | Method and Description |
|---|---|
Widget |
createComposedWidget(Widget parent,
String id,
String slotId,
String definitionId,
Widget rootNode)
Creates a widget that is composed of one or more widgets.
|
Widget |
createWidget(Widget parent,
String id,
String slotId,
String definitionId)
Creates widget's instance
|
WidgetConnection |
createWidgetConnection(Widget sourceWidget,
Widget targetWidget,
String inputId,
String outputId)
Creates a connection between widgets
|
Set<Widget> |
getAllDescendants(Widget composedWidgetRoot)
Returns set of descendants for given composed widget
|
List<WidgetConnection> |
getWidgetConnectionsForOutputWidgetAndSocketID(Widget widget,
String outputId)
Gets all connections of widget's socket
|
void |
loadComposedChildren(Widget composedWidget,
Widget templateNode)
Clones all the settings and properties from a template widget and creates
composed root widget which is assigned to composed widget
|
void |
moveWidget(Widget widget,
Widget newParent)
Moves widget to another one
|
void |
removeWidget(Widget widget)
Removes widget
|
static final String COMPOSED_ROOT_SLOT_ID
Widget createWidget(Widget parent, String id, String slotId, String definitionId)
parent - of given widgetid - of newly created widgetslotId - in parent widget where newly created widget will be putdefinitionId - of widgetWidget createComposedWidget(Widget parent, String id, String slotId, String definitionId, Widget rootNode)
parent - of given widgetid - of newly created widgetslotId - in parent widget where newly created widget will be putdefinitionId - of widgetrootNode - a template widget from which all the settings and properties are clonedvoid removeWidget(Widget widget)
widget - to removevoid moveWidget(Widget widget, Widget newParent)
widget - which should be movednewParent - new parent for the widgetList<WidgetConnection> getWidgetConnectionsForOutputWidgetAndSocketID(Widget widget, String outputId)
widget - a widget's instanceoutputId - id of socketWidgetConnection createWidgetConnection(Widget sourceWidget, Widget targetWidget, String inputId, String outputId)
sourceWidget - Widget from which the connection will be madetargetWidget - Widget to which the connection will be madeinputId - socket name of target widgetoutputId - socket name of source widgetvoid loadComposedChildren(Widget composedWidget, Widget templateNode)
composedWidget - a composed widgettemplateNode - a template widget from which all the settings and properties are clonedCopyright © 2018. All rights reserved.