本文整理了Java中javafx.scene.control.Tab.getStyleClass()
方法的一些代码示例,展示了Tab.getStyleClass()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tab.getStyleClass()
方法的具体详情如下:
包路径:javafx.scene.control.Tab
类名称:Tab
方法名:getStyleClass
暂无
代码示例来源:origin: jfoenixadmin/JFoenix
public TabHeaderContainer(final Tab tab) {
this.tab = tab;
getStyleClass().setAll(tab.getStyleClass());
setId(tab.getId());
setStyle(tab.getStyle());
listener.registerChangeListener(getSkinnable().sideProperty(), "SIDE");
listener.registerChangeListener(widthProperty(), "WIDTH");
tab.getStyleClass().addListener(weakStyleClassListener);
代码示例来源:origin: org.drombler.commons/drombler-commons-docking-fx
private void updateStyleClass(Tab tab, boolean modified) {
if (modified) {
if (!tab.getStyleClass().contains(DOCKABLE_MODIFIED_STYLE_CLASS)) {
tab.getStyleClass().add(DOCKABLE_MODIFIED_STYLE_CLASS);
}
} else {
if (tab.getStyleClass().contains(DOCKABLE_MODIFIED_STYLE_CLASS)) {
tab.getStyleClass().remove(DOCKABLE_MODIFIED_STYLE_CLASS);
}
}
}
}
代码示例来源:origin: com.aquafx-project/aquafx
private void adjustBorders() {
boolean foundSelected = false;
List<Tab> tabs = getSkinnable().getTabs();
Tab selectedTab = getSkinnable().getSelectionModel().getSelectedItem();
for (Tab tab : tabs) {
tab.getStyleClass().remove("neighbor");
if (foundSelected) {
tab.getStyleClass().add("neighbor");
foundSelected = false;
}
if (tab.equals(selectedTab)) {
foundSelected = true;
}
}
}
代码示例来源:origin: com.aquafx-project/aquafx
private void definePillPosition() {
ObservableList<Tab> list = getSkinnable().getTabs();
for (Tab tab : list) {
tab.getStyleClass().removeAll("first-tab", "last-tab", "single-tab");
}
if (list.size() > 1) {
if (getSkinnable().getSide() == Side.TOP || getSkinnable().getSide() == Side.RIGHT) {
list.get(0).getStyleClass().add("first-tab");
list.get(list.size() - 1).getStyleClass().add("last-tab");
} else if (getSkinnable().getSide() == Side.BOTTOM || getSkinnable().getSide() == Side.LEFT) {
list.get(0).getStyleClass().add("last-tab");
list.get(list.size() - 1).getStyleClass().add("first-tab");
}
} else if(list.size() == 1){
list.get(0).getStyleClass().add("single-tab");
}
}
代码示例来源:origin: com.jfoenix/jfoenix
public TabHeaderContainer(final Tab tab) {
this.tab = tab;
getStyleClass().setAll(tab.getStyleClass());
setId(tab.getId());
setStyle(tab.getStyle());
listener.registerChangeListener(getSkinnable().tabClosingPolicyProperty(), obs->updateInnerUI());
tab.getStyleClass().addListener(weakStyleClassListener);
内容来源于网络,如有侵权,请联系作者删除!