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

public Class VerticalHeader

extends StackPane
Class Inheritance
Static Imports
impl.org.controlsfx.i18n.Localization.asKey, .Localization.localize

Display the vertical header on the left of the cells (view), the index of the lines displayed on screen.

Field Summary

Modifier and TypeField and Description
private ContextMenu
private Rectangle
private static final int
private static double
private int
private final List<Rectangle>
private final SpreadsheetHandle
handle

************************************************************************ Private Fields * * ***********************************************************************

private double
private final DoubleProperty
innerVerticalHeaderWidth

This represents the VerticalHeader width.

private int
private final List<Label>
private double
private final InvalidationListener
layout

************************************************************************ Listeners * * ***********************************************************************

private static final String
public static final int
private final EventHandler<MouseEvent>
private final Stack<Label>
private final Stack<Label>
private static final Image
private final EventHandler<MouseEvent>
private final EventHandler<MouseEvent>
private final EventHandler<MouseEvent>
private boolean
private final BitSet
selectedRows

This BitSet keeps track of the selected rows (when clicked on their header) in order to allow multi-resize.

private GridViewSkin
private final SpreadsheetView
private static final String
private static final String

Constructor Summary

AccessConstructor and Description
public
VerticalHeader(final SpreadsheetHandle
***************************************************************
handle
)

**************************************************************** CONSTRUCTOR

Method Summary

Modifier and TypeMethod and Description
private void
addFixedRows(double x, int cellSize)

private void
addVisibleRows(double x, int cellSize)

pack-priv void
public double
private Rectangle
getDragRect()

Create a new Rectangle and put it in the pile or just grab one from the pile.

private Label
getLabel(Integer row)

Create a new label and put it in the pile or just grab one from the pile.

private Label
getPicker(Picker picker)

private ContextMenu
getRowContextMenu(final Integer row)

Return a contextMenu for fixing a row if possible.

private String
getRowHeader(int index)

Return the String header associated with this row index.

public double
private void
headerClicked(int row, MouseEvent event)

If a header is clicked, we must select the whole row.

pack-priv void
init(final GridViewSkin skin, HorizontalHeader horizontalHeader)

Init

public static boolean
isFixedRowEmpty(SpreadsheetView spreadsheetView)

Return true if there are no fixed rows when taking hidden rows in consideration.

protected void
layoutChildren()

Overrides javafx.scene.layout.StackPane.layoutChildren.

Invoked during the layout pass to layout the children in this Parent.

private void
rowResizing(GridRow gridRow, Label label, MouseEvent me)

public ReadOnlyDoubleProperty
Inherited from javafx.scene.layout.StackPane:
alignmentPropertyclearConstraintscomputeMinHeightcomputeMinWidthcomputePrefHeightcomputePrefWidthgetAlignmentgetAlignmentgetClassCssMetaDatagetContentBiasgetCssMetaDatagetMarginrequestLayoutsetAlignmentsetAlignmentsetMargin

Field Detail

blankContextMenuback to summary
private ContextMenu blankContextMenu
clipback to summary
private Rectangle clip
DRAG_RECT_HEIGHTback to summary
private static final int DRAG_RECT_HEIGHT
dragAnchorYback to summary
private static double dragAnchorY
dragRectCountback to summary
private int dragRectCount
dragRectsback to summary
private final List<Rectangle> dragRects
handleback to summary
private final SpreadsheetHandle handle

************************************************************************ Private Fields * * ***********************************************************************

horizontalHeaderHeightback to summary
private double horizontalHeaderHeight
innerVerticalHeaderWidthback to summary
private final DoubleProperty innerVerticalHeaderWidth

This represents the VerticalHeader width. It's the total amount of space used by the VerticalHeader. It's composed of the sum of the SpreadsheetView SpreadsheetView#getRowHeaderWidth() and the size of the pickers (which is fixed right now).

labelCountback to summary
private int labelCount
labelListback to summary
private final List<Label> labelList
lastYback to summary
private double lastY
layoutback to summary
private final InvalidationListener layout

************************************************************************ Listeners * * ***********************************************************************

PICKER_INDEXback to summary
private static final String PICKER_INDEX
PICKER_SIZEback to summary
public static final int PICKER_SIZE
pickerMouseEventback to summary
private final EventHandler<MouseEvent> pickerMouseEvent
pickerPileback to summary
private final Stack<Label> pickerPile
pickerUsedback to summary
private final Stack<Label> pickerUsed
pinImageback to summary
private static final Image pinImage
rectMouseDraggedback to summary
private final EventHandler<MouseEvent> rectMouseDragged
rectMousePressedback to summary
private final EventHandler<MouseEvent> rectMousePressed
rectMouseReleasedback to summary
private final EventHandler<MouseEvent> rectMouseReleased
resizingback to summary
private boolean resizing
selectedRowsback to summary
private final BitSet selectedRows

This BitSet keeps track of the selected rows (when clicked on their header) in order to allow multi-resize.

skinback to summary
private GridViewSkin skin
spreadsheetViewback to summary
private final SpreadsheetView spreadsheetView
TABLE_LABEL_KEYback to summary
private static final String TABLE_LABEL_KEY
TABLE_ROW_KEYback to summary
private static final String TABLE_ROW_KEY

Constructor Detail

VerticalHeaderback to summary
public VerticalHeader(final SpreadsheetHandle handle)

**************************************************************** CONSTRUCTOR

Parameters
handle:SpreadsheetHandle

***************************************************************

Method Detail

addFixedRowsback to summary
private void addFixedRows(double x, int cellSize)
addVisibleRowsback to summary
private void addVisibleRows(double x, int cellSize)
clearSelectedRowsback to summary
pack-priv void clearSelectedRows()
computeHeaderWidthback to summary
public double computeHeaderWidth()
getDragRectback to summary
private Rectangle getDragRect()

Create a new Rectangle and put it in the pile or just grab one from the pile.

getLabelback to summary
private Label getLabel(Integer row)

Create a new label and put it in the pile or just grab one from the pile.

getPickerback to summary
private Label getPicker(Picker picker)
getRowContextMenuback to summary
private ContextMenu getRowContextMenu(final Integer row)

Return a contextMenu for fixing a row if possible.

getRowHeaderback to summary
private String getRowHeader(int index)

Return the String header associated with this row index.

getVerticalHeaderWidthback to summary
public double getVerticalHeaderWidth()
headerClickedback to summary
private void headerClicked(int row, MouseEvent event)

If a header is clicked, we must select the whole row. If Control key of Shift key is pressed, we must not deselect the previous selection but just act like the GridViewBehavior would.

initback to summary
pack-priv void init(final GridViewSkin skin, HorizontalHeader horizontalHeader)

Init

isFixedRowEmptyback to summary
public static boolean isFixedRowEmpty(SpreadsheetView spreadsheetView)

Return true if there are no fixed rows when taking hidden rows in consideration.

layoutChildrenback to summary
protected void layoutChildren()

Overrides javafx.scene.layout.StackPane.layoutChildren.

Doc from javafx.scene.Parent.layoutChildren.

Invoked during the layout pass to layout the children in this Parent. By default it will only set the size of managed, resizable content to their preferred sizes and does not do any node positioning.

Subclasses should override this function to layout content as needed.

Annotations
@Override
rowResizingback to summary
private void rowResizing(GridRow gridRow, Label label, MouseEvent me)
verticalHeaderWidthPropertyback to summary
public ReadOnlyDoubleProperty verticalHeaderWidthProperty()