< prev index next >

modules/javafx.controls/src/main/java/javafx/scene/control/cell/ProgressBarTreeTableCell.java

Print this page




  34 /**
  35  * A class containing a {@link TreeTableCell} implementation that draws a
  36  * {@link ProgressBar} node inside the cell.
  37  *
  38  * @param <S> The type of the elements contained within the TableView.
  39  * @since JavaFX 8.0
  40  */
  41 public class ProgressBarTreeTableCell<S> extends TreeTableCell<S, Double> {
  42 
  43     /***************************************************************************
  44      *                                                                         *
  45      * Static cell factories                                                   *
  46      *                                                                         *
  47      **************************************************************************/
  48 
  49     /**
  50      * Provides a {@link ProgressBar} that allows easy visualisation of a Number
  51      * value as it proceeds from 0.0 to 1.0. If the value is -1, the progress
  52      * bar will appear indeterminate.
  53      *

  54      * @return A {@link Callback} that can be inserted into the
  55      *      {@link TreeTableColumn#cellFactoryProperty() cell factory property} of a
  56      *      TreeTableColumn, that enables visualisation of a Number as it progresses
  57      *      from 0.0 to 1.0.
  58      */
  59     public static <S> Callback<TreeTableColumn<S,Double>, TreeTableCell<S,Double>> forTreeTableColumn() {
  60         return param -> new ProgressBarTreeTableCell<S>();
  61     }
  62 
  63 
  64 
  65     /***************************************************************************
  66      *                                                                         *
  67      * Fields                                                                  *
  68      *                                                                         *
  69      **************************************************************************/
  70 
  71     private final ProgressBar progressBar;
  72 
  73     private ObservableValue<Double> observable;




  34 /**
  35  * A class containing a {@link TreeTableCell} implementation that draws a
  36  * {@link ProgressBar} node inside the cell.
  37  *
  38  * @param <S> The type of the elements contained within the TableView.
  39  * @since JavaFX 8.0
  40  */
  41 public class ProgressBarTreeTableCell<S> extends TreeTableCell<S, Double> {
  42 
  43     /***************************************************************************
  44      *                                                                         *
  45      * Static cell factories                                                   *
  46      *                                                                         *
  47      **************************************************************************/
  48 
  49     /**
  50      * Provides a {@link ProgressBar} that allows easy visualisation of a Number
  51      * value as it proceeds from 0.0 to 1.0. If the value is -1, the progress
  52      * bar will appear indeterminate.
  53      *
  54      * @param <S> The type of the TableView generic type
  55      * @return A {@link Callback} that can be inserted into the
  56      *      {@link TreeTableColumn#cellFactoryProperty() cell factory property} of a
  57      *      TreeTableColumn, that enables visualisation of a Number as it progresses
  58      *      from 0.0 to 1.0.
  59      */
  60     public static <S> Callback<TreeTableColumn<S,Double>, TreeTableCell<S,Double>> forTreeTableColumn() {
  61         return param -> new ProgressBarTreeTableCell<S>();
  62     }
  63 
  64 
  65 
  66     /***************************************************************************
  67      *                                                                         *
  68      * Fields                                                                  *
  69      *                                                                         *
  70      **************************************************************************/
  71 
  72     private final ProgressBar progressBar;
  73 
  74     private ObservableValue<Double> observable;


< prev index next >