Top Description Inners Fields Constructors Methods
impl.org.controlsfx.spreadsheet

public Class RectangleSelection

extends Rectangle
Class Inheritance
Imports
java.util.List, .TreeSet, javafx.beans.InvalidationListener, .Observable, javafx.collections.ObservableList, javafx.event.EventHandler, javafx.scene.control.IndexedCell, .TableColumn, .TablePosition, javafx.scene.input.MouseEvent, javafx.scene.shape.Rectangle, org.controlsfx.control.spreadsheet.ClipboardCell, .SpreadsheetCell, .SpreadsheetColumn, .SpreadsheetView

This class extends Rectangle and will draw a rectangle with a border to the selection.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class
RectangleSelection.SelectionRange

Utility class to transform a list of selected cells into a union of ranges.

Field Summary

Modifier and TypeField and Description
private final InvalidationListener
private final EventHandler<MouseEvent>
private final InvalidationListener
private final RectangleSelection.SelectionRange
private final GridViewSkin
private final TableViewSpanSelectionModel

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
handleHorizontalPositioning(int minColumn, int maxColumn)

This will compute and assign the x and width propertis of the Rectangle.

private void
handleVerticalPositioning(int minRow, int maxRow, GridRow gridMinRow, GridRow gridMaxRow)

This will compute and assign the y and height properties of the rectangle.

private double

Returns:

value ceiled to nearest pixel
snapSize
(double
the size value to be snapped
value
)

Returns a value ceiled to the nearest pixel.

public final void
Inherited from javafx.scene.shape.Rectangle:
arcHeightPropertyarcWidthPropertygetArcHeightgetArcWidthgetClassCssMetaDatagetCssMetaDatagetHeightgetWidthgetXgetYheightPropertysetArcHeightsetArcWidthsetHeightsetWidthsetXsetYtoStringwidthPropertyxPropertyyProperty

Field Detail

layoutListenerback to summary
private final InvalidationListener layoutListener
mouseDraggedListenerback to summary
private final EventHandler<MouseEvent> mouseDraggedListener
selectedCellListenerback to summary
private final InvalidationListener selectedCellListener
selectionRangeback to summary
private final RectangleSelection.SelectionRange selectionRange
skinback to summary
private final GridViewSkin skin
smback to summary
private final TableViewSpanSelectionModel sm

Constructor Detail

RectangleSelectionback to summary
public RectangleSelection(GridViewSkin skin, TableViewSpanSelectionModel sm)

Method Detail

handleHorizontalPositioningback to summary
private void handleHorizontalPositioning(int minColumn, int maxColumn)

This will compute and assign the x and width propertis of the Rectangle.

handleVerticalPositioningback to summary
private void handleVerticalPositioning(int minRow, int maxRow, GridRow gridMinRow, GridRow gridMaxRow)

This will compute and assign the y and height properties of the rectangle.

snapSizeback to summary
private double snapSize(double value)

Returns a value ceiled to the nearest pixel.

Parameters
value:double

the size value to be snapped

Returns:double

value ceiled to nearest pixel

updateRectangleback to summary
public final void updateRectangle()
impl.org.controlsfx.spreadsheet back to summary

public Class RectangleSelection.GridRange

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final int
private final int
private final int
private final int

Constructor Summary

AccessConstructor and Description
public
GridRange(int top, int bottom, int left, int right)

Method Summary

Modifier and TypeMethod and Description
public int
public int
public int
public int
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bottomback to summary
private final int bottom
leftback to summary
private final int left
rightback to summary
private final int right
topback to summary
private final int top

Constructor Detail

GridRangeback to summary
public GridRange(int top, int bottom, int left, int right)

Method Detail

getBottomback to summary
public int getBottom()
getLeftback to summary
public int getLeft()
getRightback to summary
public int getRight()
getTopback to summary
public int getTop()
impl.org.controlsfx.spreadsheet back to summary

public Class RectangleSelection.SelectionRange

extends Object
Class Inheritance
  • java.lang.Object
  • impl.org.controlsfx.spreadsheet.RectangleSelection.SelectionRange

Utility class to transform a list of selected cells into a union of ranges.

Field Summary

Modifier and TypeField and Description
private RectangleSelection.GridRange
private final TreeSet<Long>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
computeRange()

return a list of WsGridRange

public void
fill(List<TablePosition<S, T>> list)

public void
fill(List<TablePosition<S, T>> list, SpreadsheetView spv)

Construct a SelectionRange with a List of Pair where the value is the row and the value is column.

public void
fillClipboardRange(List<ClipboardCell>
the list a ClipboardCell
list
)

Fills this ClipBoardRange with a list a ClipboardCell.

private int
public RectangleSelection.GridRange
private int
public static Long
key(int row, int column)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

rangeback to summary
private RectangleSelection.GridRange range
setback to summary
private final TreeSet<Long> set

Constructor Detail

SelectionRangeback to summary
public SelectionRange()

Method Detail

computeRangeback to summary
private void computeRange()

return a list of WsGridRange

fillback to summary
public void fill(List<TablePosition<S, T>> list)
fillback to summary
public void fill(List<TablePosition<S, T>> list, SpreadsheetView spv)

Construct a SelectionRange with a List of Pair where the value is the row and the value is column.

fillClipboardRangeback to summary
public void fillClipboardRange(List<ClipboardCell> list)

Fills this ClipBoardRange with a list a ClipboardCell. The result can be accessed with the getRange() method.

Parameters
list:List<ClipboardCell>

the list a ClipboardCell

getColumnback to summary
private int getColumn(Long l)
getRangeback to summary
public RectangleSelection.GridRange getRange()
getRowback to summary
private int getRow(Long l)
keyback to summary
public static Long key(int row, int column)