SpreadsheetCell.
| Modifier and Type | Field and Description |
|---|---|
| private final EventHandler | actionEventHandler
Event Handler when the cell is simply clicked in order to display the possible actions in MenuItem. |
| private static final String | ANCHOR_PROPERTY_KEY
Static Fields * * |
| private boolean | |
| private EventHandler | |
| private final EventHandler | |
| private EventHandler | |
| private static final Duration | |
| private final ChangeListener | |
| pack-priv final SpreadsheetHandle | |
| private final ChangeListener | |
| private ChangeListener | parentListener
When this cell looses its parent, we release the Graphic if we had one. |
| private final EventHandler | |
| private final SetChangeListener | |
| private ChangeListener | |
| private Tooltip | tooltip
Because we don't want to recreate Tooltip each time the TableCell is
re-used.
|
| private static final int | |
| private final WeakEventHandler | |
| private final WeakChangeListener | |
| private final WeakSetChangeListener | |
| private WeakChangeListener |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | cancelEdit()
Overrides javafx. Cancels an edit to the value of the cell. |
| public void | commitEdit(SpreadsheetCell newValue)
Overrides javafx. Commits an edit to the value of the cell. |
| protected Skin | createDefaultSkin()
Overrides javafx. Create a new instance of the default skin for this control. |
| private void | |
| pack-priv static TablePositionBase | |
| private Tooltip | getAvailableTooltip()
See if a tootlip is available (either on the TableCell already, or in the Stack). |
| private EventHandler | |
| private EventHandler | |
| private GridCellEditor | getEditor(final SpreadsheetCell
The SpreadsheetCell cell, final SpreadsheetView spv)Return an instance of Editor specific to the Cell type We are not using the build-in editor-Cell because we cannot know in advance which editor we will need. |
| pack-priv Filter | |
| public static void | |
| pack-priv static boolean | |
| private void | |
| public boolean | Returns: true if this cell is the original cell (including filters) even when scrollingReturn true if this cell is the original cell (including filters) even when scrolling. |
| protected void | layoutChildren()
Overrides javafx. Invoked during the layout pass to layout the children in this
|
| public void | |
| pack-priv static void | |
| pack-priv static void | |
| private void | |
| private void | setCellGraphic(SpreadsheetCell
the item)SpreadsheetCell to set the graphic toSet the cell graphic if any. |
| public void | show(final SpreadsheetCell cell)
Called in the gridRowSkinBase when doing layout This allow not to override opacity in the row and let the cell handle itself |
| public void | |
| public void | updateItem(final SpreadsheetCell item, boolean empty)
Overrides javafx. The updateItem method should not be called by developers, but it is the best method for developers to override to allow for them to customise the visuals of the cell. |
| actionEventHandler | back to summary |
|---|---|
| private final EventHandler<MouseEvent> actionEventHandler Event Handler when the cell is simply clicked in order to display the possible actions in MenuItem. | |
| ANCHOR_PROPERTY_KEY | back to summary |
|---|---|
| private static final String ANCHOR_PROPERTY_KEY Static Fields * * | |
| dirtyStyle | back to summary |
|---|---|
| private boolean dirtyStyle | |
| dragDropHandler | back to summary |
|---|---|
| private EventHandler<DragEvent> dragDropHandler | |
| dragMouseEventHandler | back to summary |
|---|---|
| private final EventHandler<MouseEvent> dragMouseEventHandler | |
| dragOverHandler | back to summary |
|---|---|
| private EventHandler<DragEvent> dragOverHandler | |
| FADE_DURATION | back to summary |
|---|---|
| private static final Duration FADE_DURATION | |
| graphicListener | back to summary |
|---|---|
| private final ChangeListener<Node> graphicListener | |
| handle | back to summary |
|---|---|
| pack-priv final SpreadsheetHandle handle | |
| itemChangeListener | back to summary |
|---|---|
| private final ChangeListener<SpreadsheetCell> itemChangeListener | |
| parentListener | back to summary |
|---|---|
| private ChangeListener<Parent> parentListener When this cell looses its parent, we release the Graphic if we had one. | |
| startFullDragEventHandler | back to summary |
|---|---|
| private final EventHandler<MouseEvent> startFullDragEventHandler | |
| styleClassListener | back to summary |
|---|---|
| private final SetChangeListener<String> styleClassListener | |
| styleListener | back to summary |
|---|---|
| private ChangeListener<String> styleListener | |
| tooltip | back to summary |
|---|---|
| private Tooltip tooltip Hides javafx. Because we don't want to recreate Tooltip each time the TableCell is re-used. We save it properly here so we avoid recreating it each time since it's really time-consuming. | |
| TOOLTIP_MAX_WIDTH | back to summary |
|---|---|
| private static final int TOOLTIP_MAX_WIDTH | |
| weakActionhandler | back to summary |
|---|---|
| private final WeakEventHandler<T extends Event> weakActionhandler | |
| weakGraphicListener | back to summary |
|---|---|
| private final WeakChangeListener<Node> weakGraphicListener | |
| weakStyleClassListener | back to summary |
|---|---|
| private final WeakSetChangeListener<String> weakStyleClassListener | |
| weakStyleListener | back to summary |
|---|---|
| private WeakChangeListener<String> weakStyleListener | |
| CellView | back to summary |
|---|---|
| public CellView(SpreadsheetHandle handle) Constructor * * | |
| cancelEdit | back to summary |
|---|---|
| public void cancelEdit() Overrides javafx. Doc from javafx. Cancels an edit to the value of the cell. Call this function to transition from an editing state into a non-editing state, without saving any user input.
| |
| commitEdit | back to summary |
|---|---|
| public void commitEdit(SpreadsheetCell newValue) Overrides javafx. Doc from javafx. Commits an edit to the value of the cell. Call this function when appropriate (based on the user interaction requirements of your cell editing user interface) to do two things:
In general there is no need to override this method in custom cell
implementations - it should be sufficient to simply call this method
when appropriate (e.g., when the user pressed the Enter key, you may do something
like
| |
| createDefaultSkin | back to summary |
|---|---|
| protected Skin Overrides javafx. Doc from javafx. Create a new instance of the default skin for this control. This is called to create a skin for the control if
no skin is provided via CSS
| |
| dragSelect | back to summary |
|---|---|
| private void dragSelect(MouseEvent e) Method that will select all the cells between the drag place and that cell. | |
| getAnchor | back to summary |
|---|---|
| pack-priv static TablePositionBase | |
| getAvailableTooltip | back to summary |
|---|---|
| private Tooltip getAvailableTooltip() See if a tootlip is available (either on the TableCell already, or in the Stack). And then set it to the TableCell. | |
| getDragDropHandler | back to summary |
|---|---|
| private EventHandler | |
| getDragOverHandler | back to summary |
|---|---|
| private EventHandler | |
| getEditor | back to summary |
|---|---|
| private GridCellEditor getEditor(final SpreadsheetCell cell, final SpreadsheetView spv) Return an instance of Editor specific to the Cell type We are not using the build-in editor-Cell because we cannot know in advance which editor we will need. Furthermore, we want to control the behavior very closely in regards of the spanned cell (invisible etc).
| |
| getFilter | back to summary |
|---|---|
| pack-priv Filter getFilter() Return the Filter associated to this cell or null otherwise. | |
| getValue | back to summary |
|---|---|
| public static void getValue(final Runnable runnable) Will safely execute the request on the JFX thread by checking whether we are on the JFX thread or not. | |
| hasAnchor | back to summary |
|---|---|
| pack-priv static boolean hasAnchor(Control table) | |
| initStyleListener | back to summary |
|---|---|
| private void initStyleListener() | |
| isOriginalCell | back to summary |
|---|---|
| public boolean isOriginalCell() Return true if this cell is the original cell (including filters) even when scrolling.
| |
| layoutChildren | back to summary |
|---|---|
| protected void layoutChildren() Overrides javafx. Doc from javafx. Invoked during the layout pass to layout the children in this
Subclasses should override this function to layout content as needed.
| |
| releaseCellGraphic | back to summary |
|---|---|
| public void releaseCellGraphic() Releases and remove the graphic if any has been defined. Useful when the
graphic comes from the | |
| removeAnchor | back to summary |
|---|---|
| pack-priv static void removeAnchor(Control table) | |
| setAnchor | back to summary |
|---|---|
| pack-priv static void setAnchor(Control table, TablePositionBase<TC extends TableColumnBase<S, T>> anchor) | |
| setBrowserGraphic | back to summary |
|---|---|
| private void setBrowserGraphic(SpreadsheetCell item) Sets the browser in the cell. | |
| setCellGraphic | back to summary |
|---|---|
| private void setCellGraphic(SpreadsheetCell item) Set the cell graphic if any. If we have an Image, we try to make it take its full size (never more) within the cell's space. If we have some row span, we want to compute the image's size one time and then
| |
| show | back to summary |
|---|---|
| public void show(final SpreadsheetCell cell) Called in the gridRowSkinBase when doing layout This allow not to override opacity in the row and let the cell handle itself | |
| startEdit | back to summary |
|---|---|
| public void startEdit() Overrides javafx. Public Methods * *
| |
| updateItem | back to summary |
|---|---|
| public void updateItem(final SpreadsheetCell item, boolean empty) Overrides javafx. Doc from javafx. The updateItem method should not be called by developers, but it is the
best method for developers to override to allow for them to customise the
visuals of the cell. To clarify, developers should never call this method
in their code (they should leave it up to the UI control, such as the
It is very important that subclasses of Cell override the updateItem method properly, as failure to do so will lead to issues such as blank cells or cells with unexpected content appearing within them. Here is an example of how to properly override the updateItem method:
protected void updateItem(T item, boolean empty) {
super.updateItem(item, empty);
if (empty || item == null) {
setText(null);
setGraphic(null);
} else {
setText(item.toString());
}
}
Note in this code sample two important points:
| |