public class TabPaneSkin extends BehaviorSkinBase<TabPane,TabPaneBehavior>
Modifier and Type | Class and Description |
---|---|
private static class |
TabPaneSkin.StyleableProperties
Super-lazy instantiation pattern from Bill Pugh.
|
private static class |
TabPaneSkin.TabAnimation |
private static class |
TabPaneSkin.TabAnimationState |
(package private) class |
TabPaneSkin.TabContentRegion
TabContentRegion: each tab has one to contain the tab's content node
|
(package private) class |
TabPaneSkin.TabControlButtons
TabControlButtons: controls to manipulate tab interaction
|
(package private) class |
TabPaneSkin.TabHeaderArea
TabHeaderArea: Area responsible for painting all tabs
|
(package private) class |
TabPaneSkin.TabHeaderSkin
TabHeaderSkin: skin for each tab
|
(package private) class |
TabPaneSkin.TabMenuItem |
Modifier and Type | Field and Description |
---|---|
private static double |
ANIMATION_SPEED |
private static PseudoClass |
BOTTOM_PSEUDOCLASS_STATE |
private Rectangle |
clipRect |
(package private) static int |
CLOSE_BTN_SIZE |
private ObjectProperty<TabPaneSkin.TabAnimation> |
closeTabAnimation |
private static PseudoClass |
DISABLED_PSEUDOCLASS_STATE |
private boolean |
isSelectingTab |
private static PseudoClass |
LEFT_PSEUDOCLASS_STATE |
private double |
maxh |
private double |
maxw |
private ObjectProperty<TabPaneSkin.TabAnimation> |
openTabAnimation |
private static PseudoClass |
RIGHT_PSEUDOCLASS_STATE |
private static PseudoClass |
SELECTED_PSEUDOCLASS_STATE |
private Tab |
selectedTab |
private static int |
SPACER |
private ObservableList<TabPaneSkin.TabContentRegion> |
tabContentRegions |
private TabPaneSkin.TabHeaderArea |
tabHeaderArea |
private Rectangle |
tabHeaderAreaClipRect |
private static PseudoClass |
TOP_PSEUDOCLASS_STATE |
IS_TOUCH_SUPPORTED
Constructor and Description |
---|
TabPaneSkin(TabPane tabPane) |
Modifier and Type | Method and Description |
---|---|
private void |
addTabContent(Tab tab) |
private void |
addTabs(java.util.List<? extends Tab> addedList,
int from) |
private static Node |
clone(Node n)
VERY HACKY - this lets us 'duplicate' Label and ImageView nodes to be used in a
Tab and the tabs menu at the same time.
|
double |
computeBaselineOffset(double topInset,
double rightInset,
double bottomInset,
double leftInset)
Calculates the baseline offset based on the first managed child.
|
protected double |
computePrefHeight(double width,
double topInset,
double rightInset,
double bottomInset,
double leftInset)
Calculates the preferred height of this
SkinBase . |
protected double |
computePrefWidth(double height,
double topInset,
double rightInset,
double bottomInset,
double leftInset)
Calculates the preferred width of this
SkinBase . |
private Timeline |
createTimeline(TabPaneSkin.TabHeaderSkin tabRegion,
Duration duration,
double endValue,
EventHandler<ActionEvent> func) |
static java.util.List<CssMetaData<? extends Styleable,?>> |
getClassCssMetaData() |
java.util.List<CssMetaData<? extends Styleable,?>> |
getCssMetaData()
This method should delegate to
Node.getClassCssMetaData() so that
a Node's CssMetaData can be accessed without the need for reflection. |
private static int |
getRotation(Side pos) |
StackPane |
getSelectedTabContentRegion() |
protected void |
handleControlPropertyChanged(java.lang.String property)
Skin subclasses will override this method to handle changes in corresponding
control's properties.
|
private void |
initializeSwipeHandlers() |
private void |
initializeTabListener() |
private boolean |
isFloatingStyleClass() |
private boolean |
isHorizontal() |
protected void |
layoutChildren(double x,
double y,
double w,
double h)
Called during the layout pass of the scenegraph.
|
java.lang.Object |
queryAccessibleAttribute(AccessibleAttribute attribute,
java.lang.Object... parameters) |
private void |
removeTabContent(Tab tab) |
private void |
removeTabs(java.util.List<? extends Tab> removedList) |
private void |
stopCurrentAnimation(Tab tab) |
private void |
updateTabPosition() |
dispose, getBehavior, registerChangeListener, unregisterChangeListener
computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, consumeMouseEvents, executeAccessibleAction, getChildren, getNode, getSkinnable, layoutInArea, layoutInArea, layoutInArea, positionInArea, positionInArea, pseudoClassStateChanged, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapSize, snapSpace
private ObjectProperty<TabPaneSkin.TabAnimation> openTabAnimation
private ObjectProperty<TabPaneSkin.TabAnimation> closeTabAnimation
private static final double ANIMATION_SPEED
private static final int SPACER
private TabPaneSkin.TabHeaderArea tabHeaderArea
private ObservableList<TabPaneSkin.TabContentRegion> tabContentRegions
private Rectangle clipRect
private Rectangle tabHeaderAreaClipRect
private Tab selectedTab
private boolean isSelectingTab
private double maxw
private double maxh
static int CLOSE_BTN_SIZE
private static final PseudoClass SELECTED_PSEUDOCLASS_STATE
private static final PseudoClass TOP_PSEUDOCLASS_STATE
private static final PseudoClass BOTTOM_PSEUDOCLASS_STATE
private static final PseudoClass LEFT_PSEUDOCLASS_STATE
private static final PseudoClass RIGHT_PSEUDOCLASS_STATE
private static final PseudoClass DISABLED_PSEUDOCLASS_STATE
public TabPaneSkin(TabPane tabPane)
private static int getRotation(Side pos)
private static Node clone(Node n)
public StackPane getSelectedTabContentRegion()
protected void handleControlPropertyChanged(java.lang.String property)
BehaviorSkinBase
handleControlPropertyChanged
in class BehaviorSkinBase<TabPane,TabPaneBehavior>
private void removeTabs(java.util.List<? extends Tab> removedList)
private void stopCurrentAnimation(Tab tab)
private void addTabs(java.util.List<? extends Tab> addedList, int from)
private void initializeTabListener()
private void addTabContent(Tab tab)
private void removeTabContent(Tab tab)
private void updateTabPosition()
private Timeline createTimeline(TabPaneSkin.TabHeaderSkin tabRegion, Duration duration, double endValue, EventHandler<ActionEvent> func)
private boolean isHorizontal()
private void initializeSwipeHandlers()
private boolean isFloatingStyleClass()
protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
SkinBase
SkinBase
. The default
implementation calculates this width as the width of the area occupied
by its managed children when they are positioned at their
current positions at their preferred widths.computePrefWidth
in class SkinBase<TabPane>
height
- the height that should be used if preferred width depends on ittopInset
- the pixel snapped top insetrightInset
- the pixel snapped right insetbottomInset
- the pixel snapped bottom insetleftInset
- the pixel snapped left insetprotected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)
SkinBase
SkinBase
. The default
implementation calculates this height as the height of the area occupied
by its managed children when they are positioned at their current
positions at their preferred heights.computePrefHeight
in class SkinBase<TabPane>
width
- the width that should be used if preferred height depends on ittopInset
- the pixel snapped top insetrightInset
- the pixel snapped right insetbottomInset
- the pixel snapped bottom insetleftInset
- the pixel snapped left insetpublic double computeBaselineOffset(double topInset, double rightInset, double bottomInset, double leftInset)
SkinBase
Node.getBaselineOffset()
.computeBaselineOffset
in class SkinBase<TabPane>
topInset
- the pixel snapped top insetrightInset
- the pixel snapped right insetbottomInset
- the pixel snapped bottom insetleftInset
- the pixel snapped left insetprotected void layoutChildren(double x, double y, double w, double h)
SkinBase
layoutChildren
in class SkinBase<TabPane>
public static java.util.List<CssMetaData<? extends Styleable,?>> getClassCssMetaData()
public java.util.List<CssMetaData<? extends Styleable,?>> getCssMetaData()
Node.getClassCssMetaData()
so that
a Node's CssMetaData can be accessed without the need for reflection.getCssMetaData
in class SkinBase<TabPane>
public java.lang.Object queryAccessibleAttribute(AccessibleAttribute attribute, java.lang.Object... parameters)
queryAccessibleAttribute
in class SkinBase<TabPane>
Node.queryAccessibleAttribute(javafx.scene.AccessibleAttribute, java.lang.Object...)