com.badlogic.gdx.scenes.scene2d.utils.Selection Java Examples
The following examples show how to use
com.badlogic.gdx.scenes.scene2d.utils.Selection.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FilteredTree.java From talos with Apache License 2.0 | 6 votes |
public FilteredTree (TreeStyle style) { selection = new Selection<Node<T>>() { protected void changed () { switch (size()) { case 0: rangeStart = null; break; case 1: rangeStart = first(); break; } } }; selection.setActor(this); selection.setMultiple(false); selection.setToggle(true); setStyle(style); initialize(); }
Example #2
Source File: EditTree.java From bladecoder-adventure-engine with Apache License 2.0 | 5 votes |
public Array<Node> getSiblings() { Selection<Node> selection = tree.getSelection(); Node nodeSel = selection.first(); int level = nodeSel.getLevel(); Array<Node> siblings = (level == 1) ? tree.getRootNodes(): nodeSel.getParent().getChildren(); return siblings; }
Example #3
Source File: FilteredTree.java From talos with Apache License 2.0 | 4 votes |
public Selection<Node<T>> getSelection () { return selection; }