本文整理匯總了Java中javafx.scene.control.Accordion.getPanes方法的典型用法代碼示例。如果您正苦於以下問題:Java Accordion.getPanes方法的具體用法?Java Accordion.getPanes怎麽用?Java Accordion.getPanes使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javafx.scene.control.Accordion
的用法示例。
在下文中一共展示了Accordion.getPanes方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: bind
import javafx.scene.control.Accordion; //導入方法依賴的package包/類
public void bind(final Accordion accordion, final String propertyName) {
Object selectedPane = props.getProperty(propertyName);
for (TitledPane tp : accordion.getPanes()) {
if (tp.getText() != null && tp.getText().equals(selectedPane)) {
accordion.setExpandedPane(tp);
break;
}
}
accordion.expandedPaneProperty().addListener(new ChangeListener<TitledPane>() {
@Override
public void changed(ObservableValue<? extends TitledPane> ov, TitledPane t, TitledPane expandedPane) {
if (expandedPane != null) {
props.setProperty(propertyName, expandedPane.getText());
}
}
});
}
示例2: bind
import javafx.scene.control.Accordion; //導入方法依賴的package包/類
public void bind(final Accordion accordion, final String propertyName) {
Object selectedPane = props.getProperty(propertyName);
for (TitledPane tp : accordion.getPanes()) {
if (tp.getText() != null && tp.getText().equals(selectedPane)) {
accordion.setExpandedPane(tp);
break;
}
}
accordion.expandedPaneProperty().addListener((ov, t, expandedPane) -> {
if (expandedPane != null) {
props.setProperty(propertyName, expandedPane.getText());
}
});
}
示例3: newOptionsTab
import javafx.scene.control.Accordion; //導入方法依賴的package包/類
public Tab newOptionsTab() {
Tab t = new Tab(/*"Options"*/);
AwesomeDude.setIcon(t, AwesomeIcon.COGS);
Accordion a =new Accordion();
a.getPanes().addAll(new TitledPane("Identity", newIdentityPanel()), new TitledPane("Network", newNetworkPanel()), /*new TitledPane("Logic", newLogicPanel()),*/ new TitledPane("Database", newDatabasePanel()));
for (TitledPane tp : a.getPanes())
tp.setAnimated(false);
t.setContent(a);
return t;
}