當前位置: 首頁>>代碼示例>>Java>>正文


Java Accordion.setExpandedPane方法代碼示例

本文整理匯總了Java中javafx.scene.control.Accordion.setExpandedPane方法的典型用法代碼示例。如果您正苦於以下問題:Java Accordion.setExpandedPane方法的具體用法?Java Accordion.setExpandedPane怎麽用?Java Accordion.setExpandedPane使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javafx.scene.control.Accordion的用法示例。


在下文中一共展示了Accordion.setExpandedPane方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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());
            }
        }
    });
}
 
開發者ID:comtel2000,項目名稱:mokka7,代碼行數:19,代碼來源:SessionManager.java

示例2: createConferences

import javafx.scene.control.Accordion; //導入方法依賴的package包/類
private Accordion createConferences() {
    Accordion accordion = new Accordion();
    final TitledPane india = createConference("JavaOne India", 17.385371, 78.484268, "http://steveonjava.com/wp-content/uploads/2011/03/javaone-india.png");
    accordion.getPanes().add(india);
    accordion.getPanes().add(createConference("OSCON", 45.515008, -122.693253, "http://steveonjava.com/wp-content/uploads/2011/05/oscon.png"));
    accordion.getPanes().add(createConference("Devoxx", 51.206883, 4.44, "http://steveonjava.com/wp-content/uploads/2010/07/LogoDevoxxNeg150.png"));
    accordion.getPanes().add(createConference("J-Fall", 52.219913, 5.474253, "http://steveonjava.com/wp-content/uploads/2011/11/jfall3.png"));
    accordion.getPanes().add(createConference("JavaOne SF", 37.775057, -122.416534, "http://steveonjava.com/wp-content/uploads/2010/07/JavaOne-2010-Speaker.png"));
    accordion.getPanes().add(createConference("Jazoon", 47.382079, 8.528137, "http://steveonjava.com/wp-content/uploads/2010/04/jazoon.png"));
    accordion.getPanes().add(createConference("GeeCON", 50.064633, 19.949799, "http://steveonjava.com/wp-content/uploads/2011/03/geecon.png"));
    india.setExpanded(true);
    accordion.setExpandedPane(india);
    accordion.expandedPaneProperty().addListener((ObservableValue<? extends TitledPane> ov, TitledPane t, TitledPane t1) -> {
        if (t1 != null) {
            ((ConferencePane) t1).navigateTo();
        }
    });
    return accordion;
}
 
開發者ID:ewidgetfx,項目名稱:ewidgetfx,代碼行數:20,代碼來源:ConferenceTour.java

示例3: drawNode

import javafx.scene.control.Accordion; //導入方法依賴的package包/類
@Override
public Node drawNode() {
    Accordion node = (Accordion) createObject();
    TitledPane pane = node.getPanes().get(index);
    node.setExpandedPane(pane);
    if (node.getExpandedPane() != pane) {
        reportGetterFailure("getExpandedPane()");
    }
    return node;
}
 
開發者ID:teamfx,項目名稱:openjfx-8u-dev-tests,代碼行數:11,代碼來源:AccordionApp.java

示例4: 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());
    }
  });
}
 
開發者ID:comtel2000,項目名稱:jfxvnc,代碼行數:15,代碼來源:SessionContext.java

示例5: WorkflowPanel

import javafx.scene.control.Accordion; //導入方法依賴的package包/類
public WorkflowPanel(final QuPathGUI qupath) {
//		this.qupath = qupath;
		this.commandLogView = new WorkflowCommandLogView(qupath);
		
		BorderPane topPane = new BorderPane();
		ComboBox<Wizard> comboWizard = new ComboBox<>();
		comboWizard.getItems().add(
				makeEmptyWizard(qupath));
		
		try {
			Wizard wizardBiomarker = makeBiomarkerScoringWizard(qupath);
			comboWizard.getItems().add(wizardBiomarker);
		} catch (ClassNotFoundException e) {
			logger.error("Could not find required class: {}", e);
		}
		
		comboWizard.getSelectionModel().select(0);
		topPane.setTop(comboWizard);
		comboWizard.prefWidthProperty().bind(topPane.widthProperty());
		topPane.setCenter(wizardPane);
		wizardPane.setPadding(new Insets(10, 0, 0, 0));
		
		TitledPane titledWizard = new TitledPane("Workflow assistant", topPane);
		topPane.setMaxHeight(Double.MAX_VALUE);
//		titledWizard.setCollapsible(false);
		
		comboWizard.getSelectionModel().selectedItemProperty().addListener((v, o, n) -> updateWizardPane(n));
		
		
		TitledPane titledLog = new TitledPane("Command history", commandLogView.getPane());
		
		
//		SplitPane split = new SplitPane();
//		split.setOrientation(Orientation.VERTICAL);
//		split.getItems().addAll(titledWizard, titledLog);
//		split.setDividerPosition(0, 0.5);
//		pane.setCenter(split);
		
		Accordion accordion = new Accordion();
		accordion.getPanes().addAll(
				titledLog, titledWizard
				);
		accordion.setExpandedPane(titledLog);
		pane.setCenter(accordion);
	}
 
開發者ID:qupath,項目名稱:qupath,代碼行數:46,代碼來源:WorkflowPanel.java


注:本文中的javafx.scene.control.Accordion.setExpandedPane方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。