本文整理汇总了Java中javafx.scene.control.TitledPane.getText方法的典型用法代码示例。如果您正苦于以下问题:Java TitledPane.getText方法的具体用法?Java TitledPane.getText怎么用?Java TitledPane.getText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javafx.scene.control.TitledPane
的用法示例。
在下文中一共展示了TitledPane.getText方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: bind
import javafx.scene.control.TitledPane; //导入方法依赖的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: drawNode
import javafx.scene.control.TitledPane; //导入方法依赖的package包/类
@Override
public Node drawNode() {
String title = "TitledPane";
Label content = new Label("Content");
TitledPane titledPane = new TitledPane(title, content);
if (titledPane.getText() != title) {
reportGetterFailure("getTitle()");
}
if (titledPane.getContent() != content) {
reportGetterFailure("getTitle()");
}
titledPane.setMinSize(SLOT_WIDTH, SLOT_HEIGHT);
titledPane.setMaxSize(SLOT_WIDTH, SLOT_HEIGHT);
titledPane.setPrefSize(SLOT_WIDTH, SLOT_HEIGHT);
titledPane.setStyle("-fx-border-color: darkgray;");
return titledPane;
}
示例3: onActionIncreaseProjectCounter
import javafx.scene.control.TitledPane; //导入方法依赖的package包/类
private void onActionIncreaseProjectCounter(TitledPane titledPane, String projectName) {
LoggerFacade.INSTANCE.debug(this.getClass(), "On action increase Project counter"); // NOI18N
final String title = titledPane.getText();
final String counted = title.substring(1, title.indexOf(')')); // NOI18N
final int counter = Integer.parseInt(counted) + 1;
titledPane.setText("(" + counter + ") " + projectName); // NOI18N
LoggerFacade.INSTANCE.trace(this.getClass(), "TODO update database with the new counter"); // NOI18N
this.onActionEnsureTitledPaneIsVisible(titledPane);
}
示例4: bind
import javafx.scene.control.TitledPane; //导入方法依赖的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());
}
});
}
示例5: getTitledPaneText
import javafx.scene.control.TitledPane; //导入方法依赖的package包/类
protected String getTitledPaneText(TitledPane titledPane) {
return titledPane.getText();
}