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

public Class SpreadsheetCellBase

extends Object
implements SpreadsheetCell, EventTarget
Class Inheritance
All Implemented Interfaces
javafx.event.EventTarget, org.controlsfx.control.spreadsheet.SpreadsheetCell
Imports
com.sun.javafx.event.EventHandlerManager, java.util.ArrayList, .Collections, .List, .Objects, .Optional, javafx.beans.property.ObjectProperty, .ReadOnlyStringProperty, .SimpleObjectProperty, .SimpleStringProperty, .StringProperty, javafx.beans.value.ChangeListener, .ObservableValue, javafx.collections.FXCollections, .ObservableSet, javafx.event.Event, .EventDispatchChain, .EventHandler, .EventTarget, .EventType, javafx.scene.Node, javafx.scene.control.MenuItem, javafx.scene.image.ImageView, javafx.stage.Popup

The SpreadsheetCells serve as model for the SpreadsheetView.
You will provide them when constructing a Grid.

SpreadsheetCell Types

Each SpreadsheetCell has its own SpreadsheetCellType which has its own SpreadsheetCellEditor in order to control very closely the possible modifications.

Different SpreadsheetCellTypes are available depending on the data you want to represent in your SpreadsheetView. You can use the different static method provided in SpreadsheetCellType in order to create the specialized SpreadsheetCell that suits your need.

If you want to create a SpreadsheetCell of your own, you simply have to use one of the provided constructor. Usually you will let your SpreadsheetCellType create the cells. For example SpreadsheetCellType.StringType#createCell(int, int, int, int, java.lang.String). You will also have to provide a custom SpreadsheetCellEditor.

Configuration

You will have to indicate the coordinates of the cell together with the row and column span. You can specify if you want the cell to be editable or not using setEditable(boolean). Be advised that a cell with a rowSpan means that the cell will replace all the cells situated in the rowSpan range. Same with the column span.
So the best way to handle spanning is to fill your grid with unique cells, and then call at the end GridBase#spanColumn(int, int, int) or GridBase#spanRow(int, int, int). These methods will handle the span for you.

Format

Your cell can have its very own format. If you want to display some dates with different format, you just have to create a unique SpreadsheetCellType and then specify for each cell their format with setFormat(String). You will then have the guaranty that all your cells will have a LocalDate as a value, but the value will be displayed differently for each cell. This will also guaranty that copy/paste and other operation will be compatible since every cell will share the same SpreadsheetCellType.
Here an example :
SpreadsheetCell cell = SpreadsheetCellType.DATE.createCell(row, column, rowSpan, colSpan,
        LocalDate.now().plusDays((int) (Math.random() * 10))); // Random value
// given here
final double random = Math.random();
if (random < 0.25) {
    cell.setFormat("EEEE d");
} else if (random < 0.5) {
    cell.setFormat("dd/MM :YY");
} else {
    cell.setFormat("dd/MM/YYYY");
}
SpreadsheetCellBase with custom format

Popup

Each cell can display a Popup when clicked. This is useful when some non editable cell wants to display several actions to take on the grid. This feature is completely different from the Filter. Filters are shown on one particular row whereas popup can be added to every cell.

Graphic

Each cell can have a graphic to display next to the text in the cells. Just use the setGraphic(Node) in order to specify the graphic you want. If you specify an ImageView, the SpreadsheetView will try to resize it in order to fit the space available in the cell. For example :
cell.setGraphic(new ImageView(new Image(getClass().getResourceAsStream("icons/exclamation.png"))));
SpreadsheetCellBase with graphic

In addition to that, you can also specify another graphic property to your cell with activateCorner(org.controlsfx.control.spreadsheet.SpreadsheetCell.CornerPosition). This allow you to activate or deactivate some graphics on the cell in every corner. Right now it's a little red triangle but you can modify this in your CSS by using the "cell-corner" style class.
.cell-corner.top-left{
    -fx-background-color: red;
    -fx-shape : "M 0 0 L 1 0 L 0 1 z";
}
SpreadsheetCellBase with a styled cell-corner

You can also customize the tooltip of your SpreadsheetCell by specifying one with setTooltip(java.lang.String).

Style with CSS

You can style your cell by specifying some styleClass with getStyleClass(). You just have to create and custom that class in your CSS stylesheet associated with your SpreadsheetView. Also note that all SpreadsheetCell have a "spreadsheet-cell" styleClass added by default. Here is a example :
cell.getStyleClass().add("row_header");
And in the CSS:
 .spreadsheet-cell.row_header{
    -fx-background-color: #b4d4ad ;
    -fx-background-insets: 0, 0 1 1 0;
    -fx-alignment: center;
}

Examples

Here is an example that uses all the pre-built SpreadsheetCellType types. The generation is random here so you will want to replace the logic to suit your needs.
private SpreadsheetCell<?> generateCell(int row, int column, int rowSpan, int colSpan) {
    List<String> stringListTextCell = Arrays.asList("Shanghai","Paris","New York City","Bangkok","Singapore","Johannesburg","Berlin","Wellington","London","Montreal");
    final double random = Math.random();
    if (random < 0.10) {
        List<String> stringList = Arrays.asList("China","France","New Zealand","United States","Germany","Canada");
        cell = SpreadsheetCellType.LIST(stringList).createCell(row, column, rowSpan, colSpan, stringList.get((int) (Math.random() * 6)));
    } else if (random >= 0.10 && random < 0.25) {
        cell = SpreadsheetCellType.STRING.createCell(row, column, rowSpan, colSpan,stringListTextCell.get((int)(Math.random()*10)));
    } else if (random >= 0.25 && random < 0.75) {
        cell = SpreadsheetCellType.DOUBLE.createCell(row, column, rowSpan, colSpan,(double)Math.round((Math.random()*100)*100)/100);
    } else {
        cell = SpreadsheetCellType.DATE.createCell(row, column, rowSpan, colSpan, LocalDate.now().plusDays((int)(Math.random()*10)));
    }
    return cell;
}
See Also
SpreadsheetView, SpreadsheetCellEditor, SpreadsheetCellType

Field Summary

Modifier and TypeField and Description
private List<MenuItem>
private final int
private int
private static final int
EDITABLE_BIT_POSITION

Private Fields

private final EventHandlerManager
private final StringProperty
private final ObjectProperty<Node>
private static final int
private final ObjectProperty<Object>
private int
propertyContainer

This variable handles all boolean values of this SpreadsheetCell inside its bits.

private final int
private int
private ObservableSet<String>
private final StringProperty
private final StringProperty
private String
private final SpreadsheetCellType<T>
private static final int

Constructor Summary

AccessConstructor and Description
public
SpreadsheetCellBase(final int row, final int column, final int rowSpan, final int columnSpan)

Constructs a SpreadsheetCell with the given configuration.

public
SpreadsheetCellBase(final int row, final int column, final int rowSpan, final int columnSpan, final SpreadsheetCellType<?> type)

Constructs a SpreadsheetCell with the given configuration.

Method Summary

Modifier and TypeMethod and Description
public void
activateCorner(SpreadsheetCell.CornerPosition position)

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.activateCorner.

Activates the given CornerPosition in order to display a little triangle in the cell.

public <E extends Event> void
addEventHandler(EventType<E> eventType, EventHandler<? super E> eventHandler)

Overrides default javafx.event.EventTarget.addEventHandler.

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.addEventHandler.

Registers an event handler to this SpreadsheetCell.

public EventDispatchChain
buildEventDispatchChain(EventDispatchChain tail)

Implements javafx.event.EventTarget.buildEventDispatchChain.

Construct an event dispatch chain for this target.

public void
deactivateCorner(SpreadsheetCell.CornerPosition position)

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.deactivateCorner.

This deactivates the given CornerPosition so that no triangle will be shown for this cell.

public final boolean
equals(Object obj)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public final StringProperty
formatProperty()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.formatProperty.

Returns the StringProperty linked with the format.

public final SpreadsheetCellType<T>
public final int
getColumn()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.getColumn.

Returns the column index of this cell.

public final int
getColumnSpan()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.getColumnSpan.

Returns how much this cell is spanning in column, 1 means the cell is not spanning.

private int
getCornerBitNumber(SpreadsheetCell.CornerPosition position)

Return the Bit position for each corner.

public final String
getFormat()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.getFormat.

Returns the format of this cell or an empty string if no format has been specified.

public Node
getGraphic()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.getGraphic.

Returns the graphic node associated with this cell.

public final Object
getItem()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.getItem.

Returns the value contained in this cell.

public List<Object>
getOptionsForEditor()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.getOptionsForEditor.

If some options cannot be factorized in a SpreadsheetCellType and are specific to a cell, you can return them here and the SpreadsheetCellEditor will receive them.

public List<MenuItem>
getPopupItems()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.getPopupItems.

If hasPopup() is set to true, this method will be called when the user clicks on the cell in order to gather the MenuItem to show in the Popup.

public final int
getRow()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.getRow.

Returns the row index of this cell.

public final int
getRowSpan()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.getRowSpan.

Returns how much this cell is spanning in row, 1 means the cell is not spanning.

public String
getStyle()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.getStyle.

A string representation of the CSS style associated with this specific Node.

public final ObservableSet<String>
getStyleClass()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.getStyleClass.

Returns an ObservableList of String of all the style class associated with this cell.

public final String
getText()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.getText.

Returns the String representation currently used for display in the SpreadsheetView.

public Optional<String>
getTooltip()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.getTooltip.

Returns the tooltip for this cell.

public ObjectProperty<Node>
graphicProperty()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.graphicProperty.

Returns the ObjectProperty representing this cell graphic.

public final int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public boolean
hasPopup()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.hasPopup.

Returns true if this cell needs to display a popup when clicked in order to show some MenuItem like a MenuButton.

public boolean
isCellGraphic()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.isCellGraphic.

Returns true if this cell contains something particular in its item and a Node given by the CellGraphicFactory will be used to display it.

public boolean
isCornerActivated(SpreadsheetCell.CornerPosition position)

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.isCornerActivated.

Returns true if a triangle is displayed in the cell for the given CornerPosition.

public final boolean
isEditable()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.isEditable.

Returns true if this cell can be edited.

private boolean
isSet(int position)

Returns: whether the specified bit position is true.

public boolean
isWrapText()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.isWrapText.

If a run of text exceeds the width of the Labeled, then this variable indicates whether the text should wrap onto another line.

public final ObjectProperty<Object>
itemProperty()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.itemProperty.

The item property represents the currently-set value inside this SpreadsheetCell.

public boolean
match(Object value)

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.match.

Verifies that the upcoming cell value can be set to the current cell.

public <E extends Event> void
removeEventHandler(EventType<E> eventType, EventHandler<? super E> eventHandler)

Overrides default javafx.event.EventTarget.removeEventHandler.

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.removeEventHandler.

Unregisters a previously registered event handler from this SpreadsheetCell.

public void
setCellGraphic(boolean isBrowser)

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.setCellGraphic.

If isCellGraphic is true, this cell item contains something particular and should be display by using CellGraphicFactory object in the CellView.

public final void
setColumnSpan(int columnSpan)

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.setColumnSpan.

Sets how much this cell is spanning in column.

public final void
setEditable(boolean editable)

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.setEditable.

Change the editable state of this cell

public final void
setFormat(String format)

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.setFormat.

Sets a new format for this cell.

public void
setGraphic(Node graphic)

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.setGraphic.

Sets a graphic for this cell.

public void
setHasPopup(boolean value)

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.setHasPopup.

Sets to true if this cell needs to display a popup when clicked in order to show some MenuItem like a MenuButton.

public final void
setItem(Object value)

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.setItem.

Sets the value of the property Item.

private boolean

Returns:

whether a change has really occured.
setMask
(boolean flag, int position)

Set the specified bit position at the value specified by flag.

public final void
setRowSpan(int rowSpan)

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.setRowSpan.

Sets how much this cell is spanning in row.

public void
setStyle(String style)

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.setStyle.

A string representation of the CSS style associated with this specific Node.

public void
setTooltip(String tooltip)

Set a new tooltip for this cell.

public void
setWrapText(boolean wrapText)

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.setWrapText.

If a run of text exceeds the width of the Labeled, then this variable indicates whether the text should wrap onto another line.

public StringProperty
styleProperty()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.styleProperty.

A string representation of the CSS style associated with this specific Node.

public final ReadOnlyStringProperty
textProperty()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.textProperty.

Returns the StringProperty of the representation of the value.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

protected void
updateText()

Update the text for the SpreadsheetView.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

actionsListback to summary
private List<MenuItem> actionsList
columnback to summary
private final int column
columnSpanback to summary
private int columnSpan
EDITABLE_BIT_POSITIONback to summary
private static final int EDITABLE_BIT_POSITION

Private Fields

eventHandlerManagerback to summary
private final EventHandlerManager eventHandlerManager
formatback to summary
private final StringProperty format
graphicback to summary
private final ObjectProperty<Node> graphic
IS_BROWSER_POSITIONback to summary
private static final int IS_BROWSER_POSITION
itemback to summary
private final ObjectProperty<Object> item
propertyContainerback to summary
private int propertyContainer

This variable handles all boolean values of this SpreadsheetCell inside its bits. Instead of using regular boolean, we use that int so that we can reduce memory usage to the bare minimum.

rowback to summary
private final int row
rowSpanback to summary
private int rowSpan
styleClassback to summary
private ObservableSet<String> styleClass
stylePropertyback to summary
private final StringProperty styleProperty
textback to summary
private final StringProperty text
tooltipback to summary
private String tooltip
typeback to summary
private final SpreadsheetCellType<T> type
WRAP_BIT_POSITIONback to summary
private static final int WRAP_BIT_POSITION

Constructor Detail

SpreadsheetCellBaseback to summary
public SpreadsheetCellBase(final int row, final int column, final int rowSpan, final int columnSpan)

Constructs a SpreadsheetCell with the given configuration. Use the SpreadsheetCellType#OBJECT type.

SpreadsheetCellBaseback to summary
public SpreadsheetCellBase(final int row, final int column, final int rowSpan, final int columnSpan, final SpreadsheetCellType<?> type)

Constructs a SpreadsheetCell with the given configuration.

Method Detail

activateCornerback to summary
public void activateCorner(SpreadsheetCell.CornerPosition position)

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.activateCorner.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.activateCorner.

Activates the given CornerPosition in order to display a little triangle in the cell.

Annotations
@Override
addEventHandlerback to summary
public <E extends Event> void addEventHandler(EventType<E> eventType, EventHandler<? super E> eventHandler)

Overrides default javafx.event.EventTarget.addEventHandler.

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.addEventHandler.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.addEventHandler.

Registers an event handler to this SpreadsheetCell.

Annotations
@Override
buildEventDispatchChainback to summary
public EventDispatchChain buildEventDispatchChain(EventDispatchChain tail)

Implements javafx.event.EventTarget.buildEventDispatchChain.

Doc from javafx.event.EventTarget.buildEventDispatchChain.

Construct an event dispatch chain for this target. The event dispatch chain contains event dispatchers which might be interested in processing of events targeted at this EventTarget. This event target is not automatically added to the chain, so if it wants to process events, it needs to add an EventDispatcher for itself to the chain.

In the case the event target is part of some hierarchy, the chain for it is usually built from event dispatchers collected from the root of the hierarchy to the event target.

The event dispatch chain is constructed by modifications to the provided initial event dispatch chain. The returned chain should have the initial chain at its end so the dispatchers should be prepended to the initial chain.

The caller shouldn't assume that the initial chain remains unchanged nor that the returned value will reference a different chain.

Annotations
@Override
deactivateCornerback to summary
public void deactivateCorner(SpreadsheetCell.CornerPosition position)

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.deactivateCorner.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.deactivateCorner.

This deactivates the given CornerPosition so that no triangle will be shown for this cell.

Annotations
@Override
equalsback to summary
public final boolean equals(Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Annotations
@Override
formatPropertyback to summary
public final StringProperty formatProperty()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.formatProperty.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.formatProperty.

Returns the StringProperty linked with the format.

Annotations
@Override
getCellTypeback to summary
public final SpreadsheetCellType<T> getCellType()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.getCellType.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.getCellType.

Returns the SpreadsheetCellType of this cell.

Annotations
@Override
getColumnback to summary
public final int getColumn()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.getColumn.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.getColumn.

Returns the column index of this cell.

Annotations
@Override
getColumnSpanback to summary
public final int getColumnSpan()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.getColumnSpan.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.getColumnSpan.

Returns how much this cell is spanning in column, 1 means the cell is not spanning.

Annotations
@Override
getCornerBitNumberback to summary
private int getCornerBitNumber(SpreadsheetCell.CornerPosition position)

Return the Bit position for each corner.

getFormatback to summary
public final String getFormat()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.getFormat.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.getFormat.

Returns the format of this cell or an empty string if no format has been specified.

Annotations
@Override
getGraphicback to summary
public Node getGraphic()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.getGraphic.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.getGraphic.

Returns the graphic node associated with this cell. Returns null if nothing has been associated.

Annotations
@Override
getItemback to summary
public final Object getItem()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.getItem.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.getItem.

Returns the value contained in this cell.

Annotations
@Override
getOptionsForEditorback to summary
public List<Object> getOptionsForEditor()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.getOptionsForEditor.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.getOptionsForEditor.

If some options cannot be factorized in a SpreadsheetCellType and are specific to a cell, you can return them here and the SpreadsheetCellEditor will receive them.

Annotations
@Override
getPopupItemsback to summary
public List<MenuItem> getPopupItems()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.getPopupItems.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.getPopupItems.

If hasPopup() is set to true, this method will be called when the user clicks on the cell in order to gather the MenuItem to show in the Popup.

Annotations
@Override
getRowback to summary
public final int getRow()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.getRow.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.getRow.

Returns the row index of this cell.

Annotations
@Override
getRowSpanback to summary
public final int getRowSpan()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.getRowSpan.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.getRowSpan.

Returns how much this cell is spanning in row, 1 means the cell is not spanning.

Annotations
@Override
getStyleback to summary
public String getStyle()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.getStyle.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.getStyle.

A string representation of the CSS style associated with this specific Node. This is analogous to the "style" attribute of an HTML element. Note that, like the HTML style attribute, this variable contains style properties and values and not the selector portion of a style rule.

Annotations
@Override
getStyleClassback to summary
public final ObservableSet<String> getStyleClass()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.getStyleClass.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.getStyleClass.

Returns an ObservableList of String of all the style class associated with this cell. You can easily modify its appearance by adding a style class (previously set in CSS).

Annotations
@Override
getTextback to summary
public final String getText()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.getText.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.getText.

Returns the String representation currently used for display in the SpreadsheetView.

Annotations
@Override
getTooltipback to summary
public Optional<String> getTooltip()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.getTooltip.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.getTooltip.

Returns the tooltip for this cell.

Annotations
@Override
graphicPropertyback to summary
public ObjectProperty<Node> graphicProperty()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.graphicProperty.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.graphicProperty.

Returns the ObjectProperty representing this cell graphic.

Annotations
@Override
hashCodeback to summary
public final int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Annotations
@Override
hasPopupback to summary
public boolean hasPopup()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.hasPopup.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.hasPopup.

Returns true if this cell needs to display a popup when clicked in order to show some MenuItem like a MenuButton. The items can be set in getPopupItems().

Annotations
@Override
isCellGraphicback to summary
public boolean isCellGraphic()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.isCellGraphic.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.isCellGraphic.

Returns true if this cell contains something particular in its item and a Node given by the CellGraphicFactory will be used to display it.

isCornerActivatedback to summary
public boolean isCornerActivated(SpreadsheetCell.CornerPosition position)

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.isCornerActivated.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.isCornerActivated.

Returns true if a triangle is displayed in the cell for the given CornerPosition.

Annotations
@Override
isEditableback to summary
public final boolean isEditable()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.isEditable.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.isEditable.

Returns true if this cell can be edited.

Annotations
@Override
isSetback to summary
private boolean isSet(int position)
Returns:boolean

whether the specified bit position is true.

isWrapTextback to summary
public boolean isWrapText()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.isWrapText.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.isWrapText.

If a run of text exceeds the width of the Labeled, then this variable indicates whether the text should wrap onto another line.

Annotations
@Override
itemPropertyback to summary
public final ObjectProperty<Object> itemProperty()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.itemProperty.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.itemProperty.

The item property represents the currently-set value inside this SpreadsheetCell.

Annotations
@Override
matchback to summary
public boolean match(Object value)

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.match.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.match.

Verifies that the upcoming cell value can be set to the current cell. This is currently used by the Copy/Paste.

Annotations
@Override
removeEventHandlerback to summary
public <E extends Event> void removeEventHandler(EventType<E> eventType, EventHandler<? super E> eventHandler)

Overrides default javafx.event.EventTarget.removeEventHandler.

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.removeEventHandler.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.removeEventHandler.

Unregisters a previously registered event handler from this SpreadsheetCell.

Annotations
@Override
setCellGraphicback to summary
public void setCellGraphic(boolean isBrowser)

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.setCellGraphic.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.setCellGraphic.

If isCellGraphic is true, this cell item contains something particular and should be display by using CellGraphicFactory object in the CellView.

setColumnSpanback to summary
public final void setColumnSpan(int columnSpan)

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.setColumnSpan.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.setColumnSpan.

Sets how much this cell is spanning in column. See SpreadsheetCell description for information. You should use Grid#spanColumn(int, int, int) instead of using this method directly. 1 means the cell is not spanning. Thus, the rowSpan should not be inferior to 1.

Annotations
@Override
setEditableback to summary
public final void setEditable(boolean editable)

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.setEditable.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.setEditable.

Change the editable state of this cell

Annotations
@Override
setFormatback to summary
public final void setFormat(String format)

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.setFormat.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.setFormat.

Sets a new format for this cell. This format will be used by SpreadsheetCellType#toString(java.lang.Object, java.lang.String). This should be used by numbers for example.

Annotations
@Override
setGraphicback to summary
public void setGraphic(Node graphic)

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.setGraphic.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.setGraphic.

Sets a graphic for this cell. It is displayed aside with the text if any is specified. Otherwise it's fully displayed in the cell.

Annotations
@Override
setHasPopupback to summary
public void setHasPopup(boolean value)

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.setHasPopup.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.setHasPopup.

Sets to true if this cell needs to display a popup when clicked in order to show some MenuItem like a MenuButton.

Annotations
@Override
setItemback to summary
public final void setItem(Object value)

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.setItem.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.setItem.

Sets the value of the property Item. This should be used only at initialization. Prefer Grid#setCellValue(int, int, Object) after because it will compute correctly the modifiedCell. If isEditable() return false, nothing is done.

Annotations
@Override
setMaskback to summary
private boolean setMask(boolean flag, int position)

Set the specified bit position at the value specified by flag.

Returns:boolean

whether a change has really occured.

setRowSpanback to summary
public final void setRowSpan(int rowSpan)

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.setRowSpan.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.setRowSpan.

Sets how much this cell is spanning in row. See SpreadsheetCell description for information. You should use Grid#spanRow(int, int, int) instead of using this method directly. 1 means the cell is not spanning. Thus, the rowSpan should not be inferior to 1.

Annotations
@Override
setStyleback to summary
public void setStyle(String style)

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.setStyle.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.setStyle.

A string representation of the CSS style associated with this specific Node. This is analogous to the "style" attribute of an HTML element. Note that, like the HTML style attribute, this variable contains style properties and values and not the selector portion of a style rule.

Annotations
@Override
setTooltipback to summary
public void setTooltip(String tooltip)

Set a new tooltip for this cell.

setWrapTextback to summary
public void setWrapText(boolean wrapText)

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.setWrapText.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.setWrapText.

If a run of text exceeds the width of the Labeled, then this variable indicates whether the text should wrap onto another line.

Annotations
@Override
stylePropertyback to summary
public StringProperty styleProperty()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.styleProperty.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.styleProperty.

A string representation of the CSS style associated with this specific Node. This is analogous to the "style" attribute of an HTML element. Note that, like the HTML style attribute, this variable contains style properties and values and not the selector portion of a style rule.

Annotations
@Override
textPropertyback to summary
public final ReadOnlyStringProperty textProperty()

Implements org.controlsfx.control.spreadsheet.SpreadsheetCell.textProperty.

Doc from org.controlsfx.control.spreadsheet.SpreadsheetCell.textProperty.

Returns the StringProperty of the representation of the value.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
updateTextback to summary
protected void updateText()

Update the text for the SpreadsheetView. This method is automatically called whenever the item property or the filter property has changed. In addition it can be called manually whenever an update of the text is necessary, e.g. in a case where the item itself has changed to such an amount that the text representation has changed aswell. In this case the item property itself has not changed, so no automatic text update will be triggered.

Annotations
@SuppressWarnings:unchecked