当前位置: 首页>>代码示例>>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;未经允许,请勿转载。