本文整理匯總了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();
}