public class TabPaneBehavior extends BehaviorBase<TabPane>
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
CTRL_PAGE_DOWN |
private static java.lang.String |
CTRL_PAGE_UP |
private static java.lang.String |
CTRL_SHIFT_TAB |
private static java.lang.String |
CTRL_TAB |
private static java.lang.String |
END |
private static java.lang.String |
HOME
Setup KeyBindings *
|
protected static java.util.List<KeyBinding> |
TAB_PANE_BINDINGS |
IS_TOUCH_SUPPORTED, TRAVERSAL_BINDINGS, TRAVERSE_DOWN, TRAVERSE_LEFT, TRAVERSE_NEXT, TRAVERSE_PREVIOUS, TRAVERSE_RIGHT, TRAVERSE_UP
Constructor and Description |
---|
TabPaneBehavior(TabPane tabPane)
State and Functions *
|
Modifier and Type | Method and Description |
---|---|
protected void |
callAction(java.lang.String name)
Called to invoke the action associated with the given name.
|
boolean |
canCloseTab(Tab tab) |
void |
closeTab(Tab tab) |
private int |
findValidTab(int startIndex,
int delta) |
void |
mousePressed(MouseEvent e)
*
Mouse event handling *
*
|
private void |
moveSelection(int delta) |
private void |
moveSelection(int startIndex,
int delta) |
private int |
nextIndex(int value,
int max) |
void |
selectNextTab() |
void |
selectPreviousTab() |
void |
selectTab(Tab tab) |
callActionForEvent, contextMenuRequested, dispose, focusChanged, getControl, matchActionForEvent, mouseDragged, mouseEntered, mouseExited, mouseReleased, traverse, traverseDown, traverseLeft, traverseNext, traversePrevious, traverseRight, traverseUp
private static final java.lang.String HOME
private static final java.lang.String END
private static final java.lang.String CTRL_PAGE_UP
private static final java.lang.String CTRL_PAGE_DOWN
private static final java.lang.String CTRL_TAB
private static final java.lang.String CTRL_SHIFT_TAB
protected static final java.util.List<KeyBinding> TAB_PANE_BINDINGS
public TabPaneBehavior(TabPane tabPane)
protected void callAction(java.lang.String name)
BehaviorBase
When a KeyEvent is handled, it is first passed through callActionForEvent which resolves which "action" should be executed based on the key event. This action is indicated by name. This name is then passed to this function which is responsible for invoking the right function based on the name.
callAction
in class BehaviorBase<TabPane>
public void mousePressed(MouseEvent e)
mousePressed
in class BehaviorBase<TabPane>
e
- the mouse eventpublic void selectTab(Tab tab)
public boolean canCloseTab(Tab tab)
public void closeTab(Tab tab)
public void selectNextTab()
public void selectPreviousTab()
private void moveSelection(int delta)
private void moveSelection(int startIndex, int delta)
private int findValidTab(int startIndex, int delta)
private int nextIndex(int value, int max)