< prev index next >

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

Print this page




  72 
  73     /***************************************************************************
  74      *                                                                         *
  75      * Instance Variables                                                      *
  76      *                                                                         *
  77      **************************************************************************/
  78 
  79     private final int row;
  80     private final WeakReference<TC> tableColumnRef;
  81 
  82 
  83 
  84     /***************************************************************************
  85      *                                                                         *
  86      * Public API                                                              *
  87      *                                                                         *
  88      **************************************************************************/
  89 
  90     /**
  91      * The row that this TablePosition represents in the TableView.

  92      */
  93     public int getRow() {
  94         return row;
  95     }
  96 
  97     /**
  98      * The column index that this TablePosition represents in the TableView. It
  99      * is -1 if the TableView or TableColumn instances are null.


 100      */
 101     public abstract int getColumn();
 102 
 103     /**
 104      * The TableColumn that this TablePosition represents in the TableView.

 105      */
 106     public TC getTableColumn() {
 107         return tableColumnRef.get();
 108     }
 109 
 110     /**
 111      * Indicates whether some other object is "equal to" this one.
 112      * @param obj the reference object with which to compare.
 113      * @return {@code true} if this object is equal to the {@code obj} argument; {@code false} otherwise.
 114      */
 115     @Override public boolean equals(Object obj) {
 116         if (obj == null) {
 117             return false;
 118         }
 119         if (getClass() != obj.getClass()) {
 120             return false;
 121         }
 122         @SuppressWarnings("unchecked")
 123         final TablePositionBase other = (TablePositionBase) obj;
 124         if (this.row != other.row) {




  72 
  73     /***************************************************************************
  74      *                                                                         *
  75      * Instance Variables                                                      *
  76      *                                                                         *
  77      **************************************************************************/
  78 
  79     private final int row;
  80     private final WeakReference<TC> tableColumnRef;
  81 
  82 
  83 
  84     /***************************************************************************
  85      *                                                                         *
  86      * Public API                                                              *
  87      *                                                                         *
  88      **************************************************************************/
  89 
  90     /**
  91      * The row that this TablePosition represents in the TableView.
  92      * @return the row that this TablePosition represents in the TableView
  93      */
  94     public int getRow() {
  95         return row;
  96     }
  97 
  98     /**
  99      * The column index that this TablePosition represents in the TableView. It
 100      * is -1 if the TableView or TableColumn instances are null.
 101      * @return the column index that this TablePosition represents in the
 102      * TableView
 103      */
 104     public abstract int getColumn();
 105 
 106     /**
 107      * The TableColumn that this TablePosition represents in the TableView.
 108      * @return the TableColumn that this TablePosition represents in the TableView
 109      */
 110     public TC getTableColumn() {
 111         return tableColumnRef.get();
 112     }
 113 
 114     /**
 115      * Indicates whether some other object is "equal to" this one.
 116      * @param obj the reference object with which to compare.
 117      * @return {@code true} if this object is equal to the {@code obj} argument; {@code false} otherwise.
 118      */
 119     @Override public boolean equals(Object obj) {
 120         if (obj == null) {
 121             return false;
 122         }
 123         if (getClass() != obj.getClass()) {
 124             return false;
 125         }
 126         @SuppressWarnings("unchecked")
 127         final TablePositionBase other = (TablePositionBase) obj;
 128         if (this.row != other.row) {


< prev index next >