< prev index next >

modules/javafx.controls/src/main/java/javafx/scene/control/TablePosition.java

Print this page




  94      *                                                                         *
  95      * Public API                                                              *
  96      *                                                                         *
  97      **************************************************************************/
  98 
  99     /**
 100      * The column index that this TablePosition represents in the TableView. It
 101      * is -1 if the TableView or TableColumn instances are null at the time the class
 102      * is instantiated (i.e. it is computed at construction).
 103      */
 104     @Override public int getColumn() {
 105         if (fixedColumnIndex > -1) {
 106             return fixedColumnIndex;
 107         }
 108 
 109         return nonFixedColumnIndex;
 110     }
 111 
 112     /**
 113      * The TableView that this TablePosition is related to.

 114      */
 115     public final TableView<S> getTableView() {
 116         return controlRef.get();
 117     }
 118 
 119     /** {@inheritDoc} */
 120     @Override public final TableColumn<S,T> getTableColumn() {
 121         // Forcing the return type to be TableColumn<S,T>, not TableColumnBase<S,T>
 122         return super.getTableColumn();
 123     }
 124 
 125     /**
 126      * Returns the item that backs the {@link #getRow()} row}, at the point
 127      * in time when this TablePosition was created.
 128      */
 129     final S getItem() {
 130         return itemRef == null ? null : itemRef.get();
 131     }
 132 
 133     /**


  94      *                                                                         *
  95      * Public API                                                              *
  96      *                                                                         *
  97      **************************************************************************/
  98 
  99     /**
 100      * The column index that this TablePosition represents in the TableView. It
 101      * is -1 if the TableView or TableColumn instances are null at the time the class
 102      * is instantiated (i.e. it is computed at construction).
 103      */
 104     @Override public int getColumn() {
 105         if (fixedColumnIndex > -1) {
 106             return fixedColumnIndex;
 107         }
 108 
 109         return nonFixedColumnIndex;
 110     }
 111 
 112     /**
 113      * The TableView that this TablePosition is related to.
 114      * @return the TableView
 115      */
 116     public final TableView<S> getTableView() {
 117         return controlRef.get();
 118     }
 119 
 120     /** {@inheritDoc} */
 121     @Override public final TableColumn<S,T> getTableColumn() {
 122         // Forcing the return type to be TableColumn<S,T>, not TableColumnBase<S,T>
 123         return super.getTableColumn();
 124     }
 125 
 126     /**
 127      * Returns the item that backs the {@link #getRow()} row}, at the point
 128      * in time when this TablePosition was created.
 129      */
 130     final S getItem() {
 131         return itemRef == null ? null : itemRef.get();
 132     }
 133 
 134     /**
< prev index next >