Interface ObjectTreePageBuilder.FinalBuilder<V,N extends AbstractTreeNode<V,N>>
- All Superinterfaces:
ISendMessagesOnDoubleClickBuilder<ObjectTreePageBuilder.FinalBuilder<V,N>>
- Enclosing class:
ObjectTreePageBuilder
public static interface ObjectTreePageBuilder.FinalBuilder<V,N extends AbstractTreeNode<V,N>>
extends ISendMessagesOnDoubleClickBuilder<ObjectTreePageBuilder.FinalBuilder<V,N>>
The last step: optional settings and register.
-
Method Summary
Modifier and TypeMethodDescriptionThe part also shows this page for the given scenario tree element.checkBox()Adds a check box to each row.<X extends V>
ObjectTreePageBuilder.FinalBuilder<V, N> Sets the child objects for the objects of the given type.dragAndDrop(Consumer<TreeDrop<V, N>> action) Turns on drag and drop of rows.Sets the key of an object.<T extends AbstractTreeElementType>
ObjectTreePage<T, V, N> register(AbstractPagesPart<T, ? super ObjectTreePage<T, V, N>> part) Creates the page and registers it in the part.Shows the column with the row headers.style(int style) Sets the SWT style of the tree.After a change, the tree updates at once instead of in the next UI cycle.Methods inherited from interface com.amalgamasimulation.desktop.ui.editor.builders.interfaces.ISendMessagesOnDoubleClickBuilder
highlightOnDoubleClick, navigateOnDoubleClick
-
Method Details
-
children
<X extends V> ObjectTreePageBuilder.FinalBuilder<V,N> children(Class<X> type, BiFunction<X, N, List<? extends V>> children) Sets the child objects for the objects of the given type. If several rules match a class, the first added rule applies. An object without a rule has no child objects. -
indexBy
Sets the key of an object. The tree finds the row of an object by its key, for example when another part selects this object. By default, the key is the object itself. -
style
Sets the SWT style of the tree. The default is SWT.MULTI. -
checkBox
ObjectTreePageBuilder.FinalBuilder<V,N> checkBox()Adds a check box to each row. -
rowHeader
ObjectTreePageBuilder.FinalBuilder<V,N> rowHeader()Shows the column with the row headers. -
syncUpdate
ObjectTreePageBuilder.FinalBuilder<V,N> syncUpdate()After a change, the tree updates at once instead of in the next UI cycle. -
alsoShownFor
The part also shows this page for the given scenario tree element. -
dragAndDrop
TreeDragAndDrop<V,N, dragAndDropObjectTreePageBuilder.FinalBuilder<V, N>> (Consumer<TreeDrop<V, N>> action) Turns on drag and drop of rows. After a drop, the action gets its result. The method returns the drag and drop settings, and their end() returns to this builder. -
register
<T extends AbstractTreeElementType> ObjectTreePage<T,V, registerN> (AbstractPagesPart<T, ? super ObjectTreePage<T, V, N>> part) Creates the page and registers it in the part. If you call this method a second time, it throws IllegalStateException.
-