94 * * 95 * Public API * 96 * * 97 **************************************************************************/ 98 99 /** 100 * The column index that this TreeTablePosition represents in the TreeTableView. It 101 * is -1 if the TreeTableView or TreeTableColumn 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 TreeTableView that this TreeTablePosition is related to. 114 */ 115 public final TreeTableView<S> getTreeTableView() { 116 return controlRef.get(); 117 } 118 119 @Override public final TreeTableColumn<S,T> getTableColumn() { 120 // Forcing the return type to be TreeTableColumn<S,T>, not TableColumnBase<S,T> 121 return super.getTableColumn(); 122 } 123 124 /** 125 * Returns the {@link TreeItem} that backs the {@link #getRow()} row}. 126 */ 127 public final TreeItem<S> getTreeItem() { 128 return treeItemRef.get(); 129 } 130 } | 94 * * 95 * Public API * 96 * * 97 **************************************************************************/ 98 99 /** 100 * The column index that this TreeTablePosition represents in the TreeTableView. It 101 * is -1 if the TreeTableView or TreeTableColumn 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 TreeTableView that this TreeTablePosition is related to. 114 * @return the TreeTableView that this TreeTablePosition is related to 115 */ 116 public final TreeTableView<S> getTreeTableView() { 117 return controlRef.get(); 118 } 119 120 @Override public final TreeTableColumn<S,T> getTableColumn() { 121 // Forcing the return type to be TreeTableColumn<S,T>, not TableColumnBase<S,T> 122 return super.getTableColumn(); 123 } 124 125 /** 126 * Returns the {@link TreeItem} that backs the {@link #getRow()} row}. 127 * @return the {@link TreeItem} that backs the {@link #getRow()} row} 128 */ 129 public final TreeItem<S> getTreeItem() { 130 return treeItemRef.get(); 131 } 132 } |