Package javafx.scene.control

Examples of javafx.scene.control.CheckBox


* Time: 23:57
*/
public class CheckboxFactory implements Callback<Void, FXFormNode> {

    public FXFormNode call(Void aVoid) {
        final CheckBox checkBox = new CheckBox();
        return new FXFormNodeWrapper(checkBox, checkBox.selectedProperty());
    }
View Full Code Here


  @Override
  protected void createWidget() {
    if( (style & SWT.RADIO) != 0 ) {
      control = new RadioButton();
    } else if( (style & SWT.CHECK) != 0 ) {
      control = new CheckBox();
      ((CheckBox)control).setAllowIndeterminate(false);
    } else {
      control = new javafx.scene.control.Button()
    }
   
View Full Code Here

    }
   
    @Inject
    public void setSelected(@Named(UIEvents.Item.SELECTED) boolean selected) {
      if( getWidget() instanceof CheckBox ) {
        CheckBox b = (CheckBox) getWidget();
        if( b.isSelected() != selected ) {
          b.setSelected(selected);
        }
       
      } else if( getWidget() instanceof ToggleButton ) {
        RadioButton b = (RadioButton) getWidget();
        if( b.isSelected() != selected ) {
          b.setSelected(selected);
        }
      }
    }
View Full Code Here

    }
   
    private ButtonBase internalCreateWidget() {
      switch (type) {
      case CHECK:
        return new CheckBox("CheckBox");
      case PUSH:
        if( menuButton ) {
          SplitMenuButton b = new SplitMenuButton();
          b.setText("Push/Menu Button");
          return b;
View Full Code Here

        TableColumn<Row, Boolean> column = new TableColumn<Row, Boolean>();
        column.setCellFactory(new Callback<TableColumn<Row, Boolean>, TableCell<Row, Boolean>>() {

          @Override
          public TableCell<Row, Boolean> call(final TableColumn<Row, Boolean> param) {
            final CheckBox checkBox = new CheckBox();
            final TableCell<Row, Boolean> cell = new TableCell<Row, Boolean>() {

              @Override
              protected void updateItem(Boolean item, boolean empty) {
                super.updateItem(item, empty);
                if (item == null) {
                  checkBox.setDisable(true);
                  checkBox.setSelected(false);
                  checkBox.setOnAction(null);
                } else {
                  checkBox.setDisable(false);
                  checkBox.setSelected(item);
                  checkBox.setOnAction(new EventHandler<ActionEvent>() {

                    @Override
                    public void handle(ActionEvent event) {
                      tabView.edit(0, param);
                      commitEdit(checkBox.isSelected());
                    }
                  });
                }
              }
            };
View Full Code Here

TOP

Related Classes of javafx.scene.control.CheckBox

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.