Package javafx.scene.control

Examples of javafx.scene.control.Toggle


  private void construct()
  {
    // react to when the user clicks on another togglebutton
    selectedToggleProperty().addListener( (observable) ->  {
      // get selected toggle
      Toggle lToggle = selectedToggleProperty().get();
      if (lToggle == null)
      {
        valueObjectProperty.set(null);
      }
      else
      {
        T lValue = (T)lToggle.getUserData();
        valueObjectProperty.set( lValue );
      }
    });
   
    // react to when the value property get a different value
    valueObjectProperty.addListener( (observable) ->  {
      T value = valueObjectProperty.get();
     
      // if null
      if (value == null) {
        // deselect
        selectToggle(null);
        return;
      }

      // scan all toggles
      for (Toggle lToggle : getToggles()) {
       
        // if user data is equal
        if (Objects.equals(lToggle.getUserData(), value)) {
         
          // set toggle if required
          if (getSelectedToggle() != lToggle) {
            selectToggle(lToggle);
            return;
View Full Code Here


    return new ChangeListener<Toggle>()
    {
      @Override
      public void changed(ObservableValue<? extends Toggle> arg0, Toggle arg1, Toggle arg2)
      {
        Toggle selectedToggle = groupTiered.getSelectedToggle();

        if (selectedToggle != null)
        {
          if (selectedToggle.equals(rbForceNoTiered))
          {
            config.setTieredCompilationMode(TieredCompilation.FORCE_NO_TIERED);
          }
          else if (selectedToggle.equals(rbForceTiered))
          {
            config.setTieredCompilationMode(TieredCompilation.FORCE_TIERED);
          }
          else if (selectedToggle.equals(rbVMDefault))
          {
            config.setTieredCompilationMode(TieredCompilation.VM_DEFAULT);
          }
        }
      }
View Full Code Here

    return new ChangeListener<Toggle>()
    {
      @Override
      public void changed(ObservableValue<? extends Toggle> arg0, Toggle arg1, Toggle arg2)
      {
        Toggle selectedToggle = groupOops.getSelectedToggle();

        if (selectedToggle != null)
        {
          if (selectedToggle.equals(rbForceNoCompressed))
          {
            config.setCompressedOopsMode(CompressedOops.FORCE_NO_COMPRESSED);
          }
          else if (selectedToggle.equals(rbForceCompressed))
          {
            config.setCompressedOopsMode(CompressedOops.FORCE_COMPRESSED);
          }
          else if (selectedToggle.equals(rbVMDefault))
          {
            config.setCompressedOopsMode(CompressedOops.VM_DEFAULT);
          }
        }
      }
View Full Code Here

TOP

Related Classes of javafx.scene.control.Toggle

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.