类javafx.scene.control.TitledPane源码实例Demo

下面列出了怎么用javafx.scene.control.TitledPane的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: constellation   文件: AttributeEditorPanel.java
public void updateEditorPanel(final AttributeState state) {
    if (state != null) {
        Platform.runLater(() -> {
            clearHeaderTitledPanes();
            for (GraphElementType type : state.getGraphElements()) {
                double longestTitleWidth = calcLongestTitle(state.getAttributeNames().get(type));
                populateContentContainer(state, type, longestTitleWidth);
            }

            for (int i = 0; i < titledPaneHeadingsContainer.getChildren().size(); i++) {
                TitledPane tp = (TitledPane) titledPaneHeadingsContainer.getChildren().get(i);
                int count = ((VBox) tp.getContent()).getChildren().size();
                final int totalAttrs = state.getAttributeCounts().get(ELEMENT_TYPES[i]);
                final String attrCountDisplay = totalAttrs == count ? String.format(HEADING_TITLES[i], totalAttrs, "") : String.format(HEADING_TITLES[i], totalAttrs, String.format(HIDDEN_ATTRIBUTES_INFORMATION, totalAttrs - count));
                headingTitleProperties[i].setValue(attrCountDisplay);
                if (!state.getActiveGraphElements().isEmpty()) {
                    tp.setExpanded(state.getActiveGraphElements().contains(ELEMENT_TYPES[i]));
                }
            }
        });
    }
}
 
源代码2 项目: Open-Lowcode   文件: CCollapsibleBand.java
@Override
public Node getNode(
		PageActionManager actionmanager,
		CPageData inputdata,
		Window parentwindow,
		TabPane[] parenttabpanes,
		CollapsibleNode nodetocollapsewhenactiontriggered) {
	Node payloadnode = payload.getNode(actionmanager, inputdata, parentwindow, parenttabpanes,
			(closewheninlineactioninside ? this : null));
	collapsiblepane = new TitledPane(this.title, payloadnode);
	collapsiblepane.setCollapsible(true);
	collapsiblepane.setExpanded(this.openbydefault);
	collapsiblepane.setBorder(Border.EMPTY);
	collapsiblepane.setAnimated(false);

	return collapsiblepane;
}
 
源代码3 项目: marathonv5   文件: RFXTitledPaneTest.java
@Test
public void getText() {
    TitledPane titledPane = (TitledPane) getPrimaryStage().getScene().getRoot().lookup(".titled-pane");
    LoggingRecorder lr = new LoggingRecorder();
    List<String> text = new ArrayList<>();
    Platform.runLater(() -> {
        RFXTitledPane rfxTitledPane = new RFXTitledPane(titledPane, null, null, lr);
        titledPane.setExpanded(true);
        rfxTitledPane.mouseButton1Pressed(null);
        text.add(rfxTitledPane.getAttribute("text"));
    });
    new Wait("Waiting for titled pane text.") {
        @Override
        public boolean until() {
            return text.size() > 0;
        }
    };
    AssertJUnit.assertEquals("Node 1", text.get(0));
}
 
源代码4 项目: mokka7   文件: SessionManager.java
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());
            }
        }
    });
}
 
源代码5 项目: mars-sim   文件: MarsNode.java
public void createGreenhouses(TitledPane tp, Settlement settlement) {
 	VBox v = new VBox();
    v.setSpacing(10);
    v.setPadding(new Insets(0, 20, 10, 20));

 	List<Building> buildings = settlement.getBuildingManager().getACopyOfBuildings();

	Iterator<Building> iter1 = buildings.iterator();
	while (iter1.hasNext()) {
		Building building = iter1.next();
    	if (building.hasFunction(FunctionType.FARMING)) {
//        	try {
        		Farming farm = (Farming) building.getFunction(FunctionType.FARMING);
            	Button b = createGreenhouseDialog(farm);
            	v.getChildren().add(b);
//        	}
//        	catch (BuildingException e) {}
        }
	}


    tp.setContent(v);//"1 2 3 4 5..."));
    tp.setExpanded(true);

 }
 
源代码6 项目: ShootOFF   文件: ArenaCoursesSlide.java
private Pane buildCoursePanes() {
	final File coursesDirectory = new File(System.getProperty("shootoff.courses"));

	final ItemSelectionPane<File> uncategorizedPane = buildCategoryPane(coursesDirectory);
	coursePanes.getChildren().add(new TitledPane("Uncategorized Courses", uncategorizedPane));
	categoryMap.put(coursesDirectory.getPath(), uncategorizedPane);

	final File[] courseFolders = coursesDirectory.listFiles(FOLDER_FILTER);

	if (courseFolders != null) {
		for (final File courseFolder : courseFolders) {
			coursePanes.getChildren().add(new TitledPane(courseFolder.getName().replaceAll("_", "") + " Courses",
					buildCategoryPane(courseFolder)));
		}
	} else {
		logger.error("{} does not appear to be a valid course directory", coursesDirectory.getPath());
	}

	return coursePanes;
}
 
源代码7 项目: jfxvnc   文件: DetailViewPresenter.java
@Override
public void initialize(URL location, ResourceBundle resources) {

  ConnectView connectView = new ConnectView();
  InfoView infoView = new InfoView();
  AboutView aboutView = new AboutView();
  detailPane.setMinWidth(0.0);
  detailPane.getPanes().addAll((TitledPane) connectView.getView(), (TitledPane) infoView.getView(), (TitledPane) aboutView.getView());
  detailPane.setExpandedPane((TitledPane) connectView.getView());

  detailPane.expandedPaneProperty().addListener((observable, oldValue, newValue) -> Platform.runLater(() -> {
    if (detailPane.getExpandedPane() == null) {
      // keep first view open
      detailPane.setExpandedPane(detailPane.getPanes().get(0));
    }
  }));
}
 
源代码8 项目: pdfsam   文件: SplitBySizeModule.java
private VBox settingPanel() {
    VBox pane = new VBox();
    pane.setAlignment(Pos.TOP_CENTER);

    TitledPane prefixTitled = Views.titledPane(DefaultI18nContext.getInstance().i18n("File names settings"),
            prefix);
    prefix.addMenuItemFor(Prefix.CURRENTPAGE);
    prefix.addMenuItemFor(Prefix.FILENUMBER);
    prefix.addMenuItemFor("[TOTAL_FILESNUMBER]");

    pane.getChildren().addAll(selectionPane,
            Views.titledPane(DefaultI18nContext.getInstance().i18n("Split settings"), splitOptions),
            Views.titledPane(DefaultI18nContext.getInstance().i18n("Output settings"), destinationPane),
            prefixTitled);
    return pane;
}
 
源代码9 项目: pdfsam   文件: SplitByBookmarksModule.java
private VBox settingPanel() {
    VBox pane = new VBox();
    pane.setAlignment(Pos.TOP_CENTER);

    TitledPane prefixTitled = Views.titledPane(DefaultI18nContext.getInstance().i18n("File names settings"),
            prefix);
    prefix.addMenuItemFor(Prefix.CURRENTPAGE);
    prefix.addMenuItemFor(Prefix.FILENUMBER);
    prefix.addMenuItemFor(Prefix.BOOKMARK);
    prefix.addMenuItemFor(Prefix.BOOKMARK_STRICT);
    prefix.addMenuItemFor("[TOTAL_FILESNUMBER]");

    pane.getChildren().addAll(selectionPane,
            Views.titledPane(DefaultI18nContext.getInstance().i18n("Split settings"), splitOptions),
            Views.titledPane(DefaultI18nContext.getInstance().i18n("Output settings"), destinationPane),
            prefixTitled);
    return pane;
}
 
源代码10 项目: pdfsam   文件: SplitModule.java
private VBox settingPanel() {
    VBox pane = new VBox();
    pane.setAlignment(Pos.TOP_CENTER);

    TitledPane prefixTitled = Views.titledPane(DefaultI18nContext.getInstance().i18n("File names settings"),
            prefix);
    prefix.addMenuItemFor(Prefix.CURRENTPAGE);
    prefix.addMenuItemFor(Prefix.FILENUMBER);
    prefix.addMenuItemFor("[TOTAL_FILESNUMBER]");

    pane.getChildren().addAll(selectionPane,
            Views.titledPane(DefaultI18nContext.getInstance().i18n("Split settings"), splitOptions),
            Views.titledPane(DefaultI18nContext.getInstance().i18n("Output settings"), destinationPane),
            prefixTitled);
    return pane;
}
 
源代码11 项目: pdfsam   文件: RotateModule.java
private VBox settingPanel() {
    VBox pane = new VBox();
    pane.setAlignment(Pos.TOP_CENTER);
    VBox.setVgrow(selectionPane, Priority.ALWAYS);

    TitledPane prefixTitled = Views.titledPane(DefaultI18nContext.getInstance().i18n("File names settings"),
            prefix);
    prefix.addMenuItemFor(Prefix.FILENUMBER);
    prefix.addMenuItemFor("[TOTAL_FILESNUMBER]");

    TitledPane options = Views.titledPane(DefaultI18nContext.getInstance().i18n("Rotate settings"), rotateOptions);

    pane.getChildren().addAll(selectionPane, options,
            Views.titledPane(DefaultI18nContext.getInstance().i18n("Output settings"), destinationPane),
            prefixTitled);
    return pane;
}
 
源代码12 项目: TerasologyLauncher   文件: AboutViewController.java
private Optional<TitledPane> createPaneFor(URL url) {
    return createViewFor(url)
            .map(view -> {
                view.getStylesheets().add(BundleUtils.getFXMLUrl("css_webview").toExternalForm());
                view.setContextMenuEnabled(false);
                return view;
            })
            .map(view -> {
                final AnchorPane pane = new AnchorPane();
                AnchorPane.setBottomAnchor(view, 0.0);
                AnchorPane.setTopAnchor(view, 0.0);
                pane.getChildren().add(view);
                return pane;
            })
            .map(contentPane -> {
                String fname = Files.getNameWithoutExtension(url.getFile());
                final TitledPane titledPane = new TitledPane(fname, contentPane);
                titledPane.setAnimated(false);
                return titledPane;
            });
}
 
源代码13 项目: constellation   文件: QualityControlViewPane.java
/**
 * Display a dialog containing all Rule objects registered with the Quality
 * Control View and which matched for a given identifier.
 *
 * @param owner The owner Node
 * @param identifier The identifier of the graph node being displayed.
 * @param rules The list of rules measured against this graph node.
 */
private static void showRuleDialog(final Node owner, final String identifier, final List<Pair<Integer, String>> rules) {
    final ScrollPane sp = new ScrollPane();
    sp.setPrefHeight(512);
    sp.setPrefWidth(512);
    sp.setFitToWidth(true);
    sp.setVbarPolicy(ScrollPane.ScrollBarPolicy.ALWAYS);
    sp.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);

    final VBox vbox = new VBox();
    vbox.prefWidthProperty().bind(sp.widthProperty());
    vbox.setPadding(Insets.EMPTY);
    for (final Pair<Integer, String> rule : rules) {
        final String[] t = rule.getValue().split("§");

        final String quality = rule.getKey() == 0 ? Bundle.MSG_NotApplicable() : "" + rule.getKey();
        final String title = String.format("%s - %s", quality, t[0]);

        final Text content = new Text(t[1]);
        content.wrappingWidthProperty().bind(sp.widthProperty().subtract(16)); // Subtract a random number to avoid the vertical scrollbar.

        final TitledPane tp = new TitledPane(title, content);
        tp.prefWidthProperty().bind(vbox.widthProperty());
        tp.setExpanded(false);
        tp.setWrapText(true);

        vbox.getChildren().add(tp);
    }
    sp.setContent(vbox);

    final Alert alert = new Alert(Alert.AlertType.INFORMATION);
    alert.setHeaderText(String.format(Bundle.MSG_QualtyControlRules(), identifier));
    alert.getDialogPane().setContent(sp);
    alert.setResizable(true);
    alert.show();
}
 
源代码14 项目: constellation   文件: AttributeEditorPanel.java
/**
 * multi value pane showing multiple values for an attribute
 *
 * @param attribute
 * @param attributePane
 * @param values
 */
private void createMultiValuePane(final AttributeData attribute, final TitledPane attributePane, final Object[] values) {
    final VBox dataAndMoreButtonBox = new VBox(5); // 5 = spacing

    final ScrollPane multiValuePane = new ScrollPane();

    multiValuePane.setFitToWidth(true);

    final ObservableList<Object> listData = FXCollections.observableArrayList();

    if (values.length > VISIBLE_ROWS) {
        for (int i = 0; i < VISIBLE_ROWS; i++) {
            listData.add(values[i]);
        }
    } else {
        listData.addAll(values);
    }
    final ListView<Object> listView = createListView(attribute, listData);
    final boolean moreToLoad = values.length > VISIBLE_ROWS;
    int visibleRow = moreToLoad ? VISIBLE_ROWS : listData.size();
    listView.setPrefHeight((CELL_HEIGHT * visibleRow) + 2); // +2 because if it is == then there is still a scrollbar.
    multiValuePane.setPrefHeight((CELL_HEIGHT * visibleRow) + 1);
    multiValuePane.setContent(listView);
    multiValuePane.setVbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
    dataAndMoreButtonBox.setAlignment(Pos.CENTER);
    dataAndMoreButtonBox.setPadding(new Insets(0, 0, 5, 0));
    dataAndMoreButtonBox.getChildren().add(multiValuePane);
    if (moreToLoad) {
        Button loadMoreButton = createLoadMoreButton(dataAndMoreButtonBox, attribute);
        dataAndMoreButtonBox.getChildren().add(loadMoreButton);
    }
    dataAndMoreButtonBox.addEventFilter(KeyEvent.KEY_PRESSED, (KeyEvent event) -> {
        if (event.isShortcutDown() && (event.getCode() == KeyCode.A)) {
            listView.getSelectionModel().selectAll();
            event.consume();
        }
    });
    attributePane.setContent(dataAndMoreButtonBox);
}
 
源代码15 项目: constellation   文件: AttributeEditorPanel.java
public void resetPanel() {
    Platform.runLater(() -> {
        clearHeaderTitledPanes();
        for (Node n : titledPaneHeadingsContainer.getChildren()) {
            TitledPane tp = (TitledPane) n;
            tp.setExpanded(false);
        }
    });
}
 
源代码16 项目: pmd-designer   文件: ExportXPathWizardController.java
@Override
public void initialize(URL location, ResourceBundle resources) {
    initialiseLanguageChoiceBox();

    Platform.runLater(() -> { // Fixes blurry text in the description text area
        descriptionArea.setCache(false);
        ScrollPane sp = (ScrollPane) descriptionArea.getChildrenUnmodifiable().get(0);
        sp.setCache(false);
        for (Node n : sp.getChildrenUnmodifiable()) {
            n.setCache(false);
        }
    });

    // Expands required info pane
    Platform.runLater(() -> infoAccordion.setExpandedPane((TitledPane) infoAccordion.getChildrenUnmodifiable().get(0)));
    Platform.runLater(this::registerValidators);

    exportResultArea.setSyntaxHighlighter(new XmlSyntaxHighlighter());
    exportResultArea.setEditable(false);

    ControlUtil.copyToClipboardButton(copyResultButton, exportResultArea::getText);

    resetMetadataButton.setOnAction(e -> {
        Alert alert = new Alert(AlertType.CONFIRMATION, "Wipe out the rule's metadata?",
                                ButtonType.YES, ButtonType.CANCEL);
        alert.showAndWait();

        exportResultArea.setSyntaxHighlighter(new XmlSyntaxHighlighter());
        if (alert.getResult() == ButtonType.YES) {
            nameProperty().setValue("");
            descriptionProperty().setValue("");
            messageProperty().setValue("");
            priorityProperty().setValue(RulePriority.MEDIUM);
        }
    });

    languageVersionRangeSlider.currentLanguageProperty().bind(this.languageProperty());
    Platform.runLater(() -> exportResultArea.moveTo(0));
}
 
源代码17 项目: scenic-view   文件: SVRealNodeAdapter.java
public SVRealNodeAdapter(final Node node, final boolean collapseControls, final boolean collapseContentControls) {
    super(ConnectorUtils.nodeClass(node), node.getClass().getName());
    this.node = node;
    this.collapseControls = collapseControls;
    this.collapseContentControls = collapseContentControls;
    boolean mustBeExpanded = !(node instanceof Control) || !collapseControls;
    if (!mustBeExpanded && !collapseContentControls) {
        mustBeExpanded = node instanceof TabPane || node instanceof SplitPane || node instanceof ScrollPane || node instanceof Accordion || node instanceof TitledPane;
    }
    setExpanded(mustBeExpanded);
}
 
源代码18 项目: scenic-view   文件: SVRemoteNodeAdapter.java
public SVRemoteNodeAdapter(final Node node, final boolean collapseControls, final boolean collapseContentControls, final boolean fillChildren, final SVRemoteNodeAdapter parent) {
    super(ConnectorUtils.nodeClass(node), node.getClass().getName());
    boolean mustBeExpanded = !(node instanceof Control) || !collapseControls;
    if (!mustBeExpanded && !collapseContentControls) {
        mustBeExpanded = node instanceof TabPane || node instanceof SplitPane || node instanceof ScrollPane || node instanceof Accordion || node instanceof TitledPane;
    }
    setExpanded(mustBeExpanded);
    this.id = node.getId();
    this.nodeId = ConnectorUtils.getNodeUniqueID(node);
    this.focused = node.isFocused();
    if (node.getParent() != null && parent == null) {
        this.parent = new SVRemoteNodeAdapter(node.getParent(), collapseControls, collapseContentControls, false, null);
    } else if (parent != null) {
        this.parent = parent;
    }
    /**
     * Check visibility and mouse transparency after calculating the parent
     */
    this.mouseTransparent = node.isMouseTransparent() || (this.parent != null && this.parent.isMouseTransparent());
    this.visible = node.isVisible() && (this.parent == null || this.parent.isVisible());

    /**
     * TODO This should be improved
     */
    if (fillChildren) {
        nodes = ChildrenGetter.getChildren(node)
                  .stream()
                  .map(childNode -> new SVRemoteNodeAdapter(childNode, collapseControls, collapseContentControls, true, this))
                  .collect(Collectors.toList());
    }
}
 
源代码19 项目: WorkbenchFX   文件: DialogErrorContent.java
/**
 * Creates a control which shows the details of an exception or error to be used as the content of
 * a {@link WorkbenchDialog}.
 *
 * @param message the {@link Node} containing the standard dialog message
 * @param details about the error or exception
 */
public DialogErrorContent(Node message, String details) {
  this.message = message;
  this.details = details;

  getStyleClass().add("container");

  // add message to the dialog content
  getChildren().add(message);

  // if details were specified, add them wrapped in a TitledPane
  if (!Strings.isNullOrEmpty(details)) {
    TextArea textArea = new TextArea();
    textArea.setText(details);
    textArea.setWrapText(true);
    textArea.getStyleClass().add("error-details-text-area");

    TitledPane titledPane = new TitledPane();
    titledPane.getStyleClass().add("error-details-titled-pane");
    titledPane.setText("Details");
    titledPane.setContent(textArea);
    titledPane.setPrefHeight(300);

    getChildren().add(titledPane);
  }

}
 
源代码20 项目: paintera   文件: SourceState.java
static VBox defaultPreferencePaneNode(ObjectProperty<Composite<ARGBType, ARGBType>> composite) {
	final TitledPane titledPane = SourceStateCompositePane.createTitledPane(composite);
	final VBox vbox = new VBox(titledPane);
	vbox.setSpacing(0.0);
	vbox.setPadding(Insets.EMPTY);
	return vbox;
}
 
@Override
public void initControls() {
    try {
        super.initControls();
        accordionPane.expandedPaneProperty().addListener(new ChangeListener<TitledPane>() {
            @Override
            public void changed(ObservableValue<? extends TitledPane> v, TitledPane o, TitledPane n) {
                if (parent == null || n == null || (myPane != null && myPane.equals(n))) {
                    return;
                }
                expandPane(n);
            }
        });

        isPickingColor.addListener(new ChangeListener<Boolean>() {
            @Override
            public void changed(ObservableValue<? extends Boolean> ov, Boolean oldVal, Boolean newVal) {
                if (imageController == null || imageController.isPickingColor.isBound()) {
                    return;
                }
                imageController.isPickingColor.set(newVal);
            }
        });

    } catch (Exception e) {
        logger.error(e.toString());
    }

}
 
源代码22 项目: marathonv5   文件: AccordionSample.java
public AccordionSample() {
    super(150,150);
    TitledPane t1 = new TitledPane("Node 1", new Button("Button"));
    TitledPane t2 = new TitledPane("Node 2", new Text("String"));
    TitledPane t3 = new TitledPane("Node 3", new Rectangle(120,50, Color.RED));
    Accordion accordion = new Accordion();
    accordion.getPanes().add(t1);
    accordion.getPanes().add(t2);
    accordion.getPanes().add(t3);
    getChildren().add(accordion);
}
 
源代码23 项目: marathonv5   文件: MarathonFileChooser.java
@Override
public Parent getContentPane() {
    BorderPane root = new BorderPane();

    root.getStyleClass().add("MarathonFileChooser");
    root.setId("marathon-file-chooser");
    if (doesAllowChildren) {
        if (!fileChooserInfo.isFileCreation()) {
            propertiesView = new AddPropertiesView(new TestPropertiesInfo(fileChooserInfo.getFileToSave()));
            TitledPane titledPane = new TitledPane("Properties", propertiesView);
            centerPane.getChildren().addAll(splitPane, titledPane);
            root.setPrefWidth(540);
            root.setPrefHeight(580);
        } else {
            root.setPrefWidth(540);
            root.setPrefHeight(380);
            centerPane.getChildren().addAll(splitPane);
        }
    } else {
        root.setPrefWidth(540);
        root.setPrefHeight(380);
        centerPane.getChildren().add(childrenListView);
    }
    root.setCenter(centerPane);
    root.setBottom(buttonBar);
    return root;
}
 
源代码24 项目: marathonv5   文件: BrowserTab.java
public Node getRoot() {
    basicPane = new FormPane("browser-config-basic", 3);
    advancedPane = new FormPane("browser-config-advanced", 3);
    addBrowserName();
    addWebDriverExeBrowse();
    addBrowserExeBrowse();
    addArguments();
    addWdArguments();
    addUseCleanSession();
    addUseTechnologyPreview();

    addVerbose();
    addIELogLevel();
    addSilent();
    addLogFileBrowse();
    addEnvironment();
    addExtensions();
    addPageLoadStrategy();
    addUnexpectedAlertBehavior();
    addAssumeUntrustedCertificateIssuer();
    addAcceptUntrustedCertificates();
    addAlwaysLoadNoFocusLib();
    addBrowserPreferences();

    ScrollPane sp1 = new ScrollPane(basicPane);
    sp1.setFitToWidth(true);
    TitledPane basicTitledPane = new TitledPane("Basic Settings", sp1);
    ScrollPane sp2 = new ScrollPane(advancedPane);
    sp2.setFitToWidth(true);
    TitledPane advancedTitledPane = new TitledPane("Advanced Settings", sp2);
    Accordion accordion = new Accordion(basicTitledPane, advancedTitledPane);
    accordion.setExpandedPane(basicTitledPane);
    return accordion;
}
 
源代码25 项目: marathonv5   文件: AccordionSample.java
public AccordionSample() {
    super(150,150);
    TitledPane t1 = new TitledPane("Node 1", new Button("Button"));
    TitledPane t2 = new TitledPane("Node 2", new Text("String"));
    TitledPane t3 = new TitledPane("Node 3", new Rectangle(120,50, Color.RED));
    Accordion accordion = new Accordion();
    accordion.getPanes().add(t1);
    accordion.getPanes().add(t2);
    accordion.getPanes().add(t3);
    getChildren().add(accordion);
}
 
源代码26 项目: marathonv5   文件: RFXTitledPaneTest.java
@Test
public void click() {
    TitledPane titledPane = (TitledPane) getPrimaryStage().getScene().getRoot().lookup(".titled-pane");
    LoggingRecorder lr = new LoggingRecorder();
    Platform.runLater(() -> {
        RFXTitledPane rfxTitledPane = new RFXTitledPane(titledPane, null, null, lr);
        titledPane.setExpanded(true);
        rfxTitledPane.mouseButton1Pressed(null);
    });
    List<Recording> recordings = lr.waitAndGetRecordings(1);
    Recording recording = recordings.get(0);
    AssertJUnit.assertEquals("click", recording.getCall());
}
 
源代码27 项目: phoebus   文件: Palette.java
/** Create a TilePane for each WidgetCategory
 *  @param parent Parent Pane
 *  @return Map of panes for each category
 */
private Map<WidgetCategory, Pane> createWidgetCategoryPanes(final Pane parent)
{
    final Map<WidgetCategory, Pane> palette_groups = new HashMap<>();
    final Set<String> deprecated = Preferences.hidden_widget_types;
    for (final WidgetCategory category : WidgetCategory.values())
    {
        if (!WidgetFactory.getInstance()
        .getWidgetDescriptions()
        .stream()
        .filter(desc -> !deprecated.contains(desc.getType()))
        .filter(desc -> desc.getCategory() == category)
        .findFirst().isPresent())
            continue;
        final TilePane palette_group = new TilePane();
        palette_group.getStyleClass().add("palette_group");
        palette_group.setPrefColumns(1);
        palette_group.setMaxWidth(Double.MAX_VALUE);
        palette_groups.put(category, palette_group);
        palette_group.setHgap(2);
        palette_group.setVgap(2);
        final TitledPane pane = new TitledPane(category.getDescription(), palette_group);
        pane.getStyleClass().add("palette_category");
        parent.getChildren().add(pane);
    }
    return palette_groups;
}
 
源代码28 项目: BowlerStudio   文件: PluginManagerWidget.java
public PluginManagerWidget(PluginManager m, Node graphic){
	HBox content = new HBox(20);

	content.setPadding(new Insets(0, 20, 10, 20)); 
	this.manager = m;
	ArrayList<TitledPane> plugins = manager.getPlugins();
	accordion.getPanes().addAll(plugins);
	disconnectTHis = new Button("Disconnect "+manager.getName(), AssetFactory.loadIcon("Disconnect-Device.png"));

	disconnectTHis.setOnMousePressed(	event -> {
		new Thread(){
			public void run(){
				Thread.currentThread().setUncaughtExceptionHandler(new IssueReportingExceptionHandler());

				setName("disconnect plugins");
			    	Log.warning("Disconnect button for "+manager.getName()+" pressed");
			    	getManager().getDevice().disconnect();
		    	
			}
		}.start();

	});
	setGraphic(AssetFactory.loadIcon("Bowler-Device-In-Manager.png"));
	deviceName.setOnAction(event -> {
		getManager().setName(deviceName.getText());
		setText(manager.getName());
		disconnectTHis.setText("Disconnect "+manager.getName());
	});
	Platform.runLater(()->deviceName.setText(manager.getName()));
	content.setHgrow(accordion, Priority.ALWAYS);
	content.getChildren().addAll(graphic,disconnectTHis,deviceName,accordion);
	setContent(content);
	setText(manager.getName());
}
 
源代码29 项目: tuxguitar   文件: JFXLegendPanel.java
public JFXLegendPanel(JFXContainer<? extends Region> parent) {
	super(new TitledPane(), parent);
	
	this.getControl().setContent(new Pane());
	this.getControl().setCollapsible(false);
	this.getControl().setAnimated(false);
	this.getContentPane().setFocusTraversable(false);
}
 
源代码30 项目: jfxvnc   文件: SessionContext.java
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());
    }
  });
}
 
 类所在包
 类方法
 同包方法