Java 类javafx.scene.control.cell.CheckBoxTreeTableCell 实例源码

项目:marathonv5    文件:JavaFXCheckBoxTreeTableCell.java   
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override public String _getValue() {
    CheckBoxTreeTableCell cell = (CheckBoxTreeTableCell) node;
    Callback selectedStateCallback = cell.getSelectedStateCallback();
    String cbText;
    if (selectedStateCallback != null) {
        ObservableValue<Boolean> call = (ObservableValue<Boolean>) selectedStateCallback.call(cell.getItem());
        int selection = call.getValue() ? 2 : 0;
        cbText = JavaFXCheckBoxElement.states[selection];
    } else {
        Node cb = cell.getGraphic();
        JavaFXElement comp = (JavaFXElement) JavaFXElementFactory.createElement(cb, driver, window);
        cbText = comp._getValue();

    }
    String cellText = cell.getText();
    if (cellText == null) {
        cellText = "";
    }
    String text = cellText + ":" + cbText;
    return text;
}
项目:marathonv5    文件:RFXCheckBoxTreeTableCell.java   
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override public String _getValue() {
    CheckBoxTreeTableCell cell = (CheckBoxTreeTableCell) node;
    Callback selectedStateCallback = cell.getSelectedStateCallback();
    String cbText;
    if (selectedStateCallback != null) {
        ObservableValue<Boolean> call = (ObservableValue<Boolean>) selectedStateCallback.call(cell.getItem());
        int selection = call.getValue() ? 2 : 0;
        cbText = JavaFXCheckBoxElement.states[selection];
    } else {
        Node cb = cell.getGraphic();
        RFXComponent comp = getFinder().findRawRComponent(cb, null, null);
        cbText = comp._getValue();

    }
    return cbText;
}
项目:marathonv5    文件:JavaFXElementFactory.java   
public static void reset() {
    add(Node.class, JavaFXElement.class);
    add(TextInputControl.class, JavaFXTextInputControlElement.class);
    add(HTMLEditor.class, JavaFXHTMLEditor.class);
    add(CheckBox.class, JavaFXCheckBoxElement.class);
    add(ToggleButton.class, JavaFXToggleButtonElement.class);
    add(Slider.class, JavaFXSliderElement.class);
    add(Spinner.class, JavaFXSpinnerElement.class);
    add(SplitPane.class, JavaFXSplitPaneElement.class);
    add(ProgressBar.class, JavaFXProgressBarElement.class);
    add(ChoiceBox.class, JavaFXChoiceBoxElement.class);
    add(ColorPicker.class, JavaFXColorPickerElement.class);
    add(ComboBox.class, JavaFXComboBoxElement.class);
    add(DatePicker.class, JavaFXDatePickerElement.class);
    add(TabPane.class, JavaFXTabPaneElement.class);
    add(ListView.class, JavaFXListViewElement.class);
    add(TreeView.class, JavaFXTreeViewElement.class);
    add(TableView.class, JavaFXTableViewElement.class);
    add(TreeTableView.class, JavaFXTreeTableViewElement.class);
    add(CheckBoxListCell.class, JavaFXCheckBoxListCellElement.class);
    add(ChoiceBoxListCell.class, JavaFXChoiceBoxListCellElement.class);
    add(ComboBoxListCell.class, JavaFXComboBoxListCellElemnt.class);
    add(CheckBoxTreeCell.class, JavaFXCheckBoxTreeCellElement.class);
    add(ChoiceBoxTreeCell.class, JavaFXChoiceBoxTreeCellElement.class);
    add(ComboBoxTreeCell.class, JavaFXComboBoxTreeCellElement.class);
    add(TableCell.class, JavaFXTableViewCellElement.class);
    add(CheckBoxTableCell.class, JavaFXCheckBoxTableCellElement.class);
    add(ChoiceBoxTableCell.class, JavaFXChoiceBoxTableCellElement.class);
    add(ComboBoxTableCell.class, JavaFXComboBoxTableCellElemnt.class);
    add(TreeTableCell.class, JavaFXTreeTableCellElement.class);
    add(CheckBoxTreeTableCell.class, JavaFXCheckBoxTreeTableCell.class);
    add(ChoiceBoxTreeTableCell.class, JavaFXChoiceBoxTreeTableCell.class);
    add(ComboBoxTreeTableCell.class, JavaFXComboBoxTreeTableCell.class);
}
项目:certmgr    文件:CertImportController.java   
@Override
protected void setupStage(Stage stage) {
    stage.getIcons().addAll(PlatformHelper.stageIcons(Images.IMPORT32, Images.IMPORT16));
    stage.setTitle(CertImportI18N.formatSTR_STAGE_TITLE());
    this.ctlFileSourceInput.disableProperty().bind(Bindings.not(this.ctlFileSourceOption.selectedProperty()));
    this.cmdChooseFileSourceButton.disableProperty()
            .bind(Bindings.not(this.ctlFileSourceOption.selectedProperty()));
    this.ctlDirectorySourceInput.disableProperty()
            .bind(Bindings.not(this.ctlDirectorySourceOption.selectedProperty()));
    this.cmdChooseDirectorySourceButton.disableProperty()
            .bind(Bindings.not(this.ctlDirectorySourceOption.selectedProperty()));
    this.ctlURLSourceInput.disableProperty().bind(Bindings.not(this.ctlURLSourceOption.selectedProperty()));
    this.ctlServerSourceInput.disableProperty().bind(Bindings.not(this.ctlServerSourceOption.selectedProperty()));
    this.ctlServerSourceProtocolInput.disableProperty()
            .bind(Bindings.not(this.ctlServerSourceOption.selectedProperty()));
    this.ctlServerSourceProtocolInput.getItems().addAll(SSLPeer.Protocol.values());
    this.ctlPlatformSourceInput.disableProperty()
            .bind(Bindings.not(this.ctlPlatformSourceOption.selectedProperty()));
    setupPlatformSourceInput();
    this.ctlImportEntryViewSelected
            .setCellFactory(CheckBoxTreeTableCell.forTreeTableColumn(this.ctlImportEntryViewSelected));
    this.ctlImportEntryViewSelected.setCellValueFactory(new TreeItemPropertyValueFactory<>("selected"));
    this.ctlImportEntryViewDN.setCellValueFactory(new TreeItemPropertyValueFactory<>("name"));
    this.ctlImportEntryViewCRT.setCellFactory(CheckBoxTreeTableCell.forTreeTableColumn(this.ctlImportEntryViewCRT));
    this.ctlImportEntryViewCRT.setCellValueFactory(new TreeItemPropertyValueFactory<>("hasCRT"));
    this.ctlImportEntryViewKey.setCellFactory(CheckBoxTreeTableCell.forTreeTableColumn(this.ctlImportEntryViewKey));
    this.ctlImportEntryViewKey.setCellValueFactory(new TreeItemPropertyValueFactory<>("hasKey"));
    this.ctlImportEntryViewCSR.setCellFactory(CheckBoxTreeTableCell.forTreeTableColumn(this.ctlImportEntryViewCSR));
    this.ctlImportEntryViewCSR.setCellValueFactory(new TreeItemPropertyValueFactory<>("hasCSR"));
    this.ctlImportEntryViewCRL.setCellFactory(CheckBoxTreeTableCell.forTreeTableColumn(this.ctlImportEntryViewCRL));
    this.ctlImportEntryViewCRL.setCellValueFactory(new TreeItemPropertyValueFactory<>("hasCRL"));
    this.ctlImportEntryView.setTreeColumn(this.ctlImportEntryViewDN);
    this.ctlFileSourceOption.setSelected(true);
    this.ctlServerSourceProtocolInput.setValue(SSLPeer.Protocol.SSL);
}
项目:javafx-dpi-scaling    文件:AdjusterTest.java   
@Test
public void testGetCheckBoxTreeTableCellAdjuster() {
    Adjuster adjuster = Adjuster.getAdjuster(CheckBoxTreeTableCell.class);

    assertThat(adjuster, is(instanceOf(ControlAdjuster.class)));
    assertThat(adjuster.getNodeClass(), is(sameInstance(Control.class)));
}