org.apache.pivot.wtk.skin.terra
Class TerraTableViewSkin

java.lang.Object
  extended by org.apache.pivot.wtk.skin.ComponentSkin
      extended by org.apache.pivot.wtk.skin.terra.TerraTableViewSkin
All Implemented Interfaces:
ComponentKeyListener, ComponentListener, ComponentMouseButtonListener, ComponentMouseListener, ComponentMouseWheelListener, ComponentStateListener, ComponentTooltipListener, ConstrainedVisual, Skin, TableView.Skin, TableViewColumnListener, TableViewListener, TableViewRowListener, TableViewSelectionListener, Visual

public class TerraTableViewSkin
extends ComponentSkin
implements TableView.Skin, TableViewListener, TableViewColumnListener, TableViewRowListener, TableViewSelectionListener

Table view skin.

TODO Add disableMouseSelection style to support the case where selection should be enabled but the caller wants to implement the management of it; e.g. changing a message's flag state in an email client.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.TableViewListener
TableViewListener.Adapter
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.TableViewColumnListener
TableViewColumnListener.Adapter
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.TableViewRowListener
TableViewRowListener.Adapter
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.TableViewSelectionListener
TableViewSelectionListener.Adapter
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentListener
ComponentListener.Adapter
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentStateListener
ComponentStateListener.Adapter
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseListener
ComponentMouseListener.Adapter
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseButtonListener
ComponentMouseButtonListener.Adapter
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentKeyListener
ComponentKeyListener.Adapter
 
Constructor Summary
TerraTableViewSkin()
           
 
Method Summary
 void columnCellRendererChanged(TableView.Column column, TableView.CellRenderer previousCellRenderer)
          Called when a column's cell renderer has changed.
 void columnFilterChanged(TableView.Column column, Object previousFilter)
          Called when a column's filter has changed.
 void columnHeaderDataChanged(TableView.Column column, Object previousHeaderData)
          Called when a column's header data has changed.
 void columnHeaderDataRendererChanged(TableView.Column column, TableView.HeaderDataRenderer previousHeaderDataRenderer)
          Called when a column's header data renderer has changed.
 void columnInserted(TableView tableView, int index)
          Called when a column is inserted into a table view's column sequence.
 void columnNameChanged(TableView.Column column, String previousName)
          Called when a column's name has changed.
 void columnSourceChanged(TableView tableView, TableView previousColumnSource)
          Called when a table view's column source has changed.
 void columnsRemoved(TableView tableView, int index, Sequence<TableView.Column> columns)
          Called when columns are removed from a table view's column sequence.
 void columnWidthChanged(TableView.Column column, int previousWidth, boolean previousRelative)
          Called when a column's width has changed.
 void columnWidthLimitsChanged(TableView.Column column, int previousMinimumWidth, int previousMaximumWidth)
          Called when a column's width limits have changed.
 void disabledRowFilterChanged(TableView tableView, Filter<?> previousDisabledRowFilter)
          Called when a table view's disabled row filter has changed.
 void enabledChanged(Component component)
          Called when a component's enabled state has changed.
 void focusedChanged(Component component, Component obverseComponent)
          Called when a component's focused state has changed.
 Color getAlternateRowBackgroundColor()
           
 Color getBackgroundColor()
           
 int getBaseline(int width, int height)
          Returns the baseline for a given width and height.
 Bounds getCellBounds(int rowIndex, int columnIndex)
           
 Color getColor()
           
 int getColumnAt(int x)
           
 Bounds getColumnBounds(int columnIndex)
           
 Color getColumnSelectionColor()
           
 Color getColumnSelectionHorizontalGridColor()
           
static ArrayList<Integer> getColumnWidths(TableView tableView, int width)
           
 Color getDisabledColor()
           
 Font getFont()
           
 Color getHighlightBackgroundColor()
           
 Color getHorizontalGridColor()
           
 Color getInactiveSelectionBackgroundColor()
           
 Color getInactiveSelectionColor()
           
 boolean getIncludeTrailingHorizontalGridLine()
           
 boolean getIncludeTrailingVerticalGridLine()
           
 int getPreferredHeight(int width)
          Returns the visual's preferred height given the provided width constraint.
 Dimensions getPreferredSize()
          Returns the visual's unconstrained preferred size.
 int getPreferredWidth(int height)
          Returns the visual's preferred width given the provided height constraint.
static int getPreferredWidth(TableView tableView, boolean includeTrailingVerticalGridLine)
           
 int getRowAt(int y)
           
 Bounds getRowBounds(int rowIndex)
           
 Color getSelectionBackgroundColor()
           
 Color getSelectionColor()
           
 boolean getShowHighlight()
           
 boolean getShowHorizontalGridLines()
           
 boolean getShowVerticalGridLines()
           
protected  int getVariableRowHeight(int rowIndex, ArrayList<Integer> columnWidthsArgument)
           
 Color getVerticalGridColor()
           
 void install(Component component)
          Associates a skin with a component.
 boolean isEditOnMouseDown()
           
 boolean isFocusable()
          By default, skins are focusable.
 boolean isOpaque()
          By default, skins are assumed to be opaque.
 boolean isVariableRowHeight()
           
 boolean keyPressed(Component component, int keyCode, Keyboard.KeyLocation keyLocation)
          UP Selects the previous enabled row when select mode is not TableView.SelectMode.NONE
DOWN Selects the next enabled row when select mode is not TableView.SelectMode.NONE SHIFT + UP Increases the selection size by including the previous enabled row when select mode is TableView.SelectMode.MULTI
SHIFT + DOWN Increases the selection size by including the next enabled row when select mode is TableView.SelectMode.MULTI
 void layout()
          If the component on which the skin is installed is a container, lays out the container's children.
 boolean mouseClick(Component component, Mouse.Button button, int x, int y, int count)
          Called when a mouse button is clicked over a component.
 boolean mouseDown(Component component, Mouse.Button button, int x, int y)
          Called when a mouse button is pressed over a component.
 boolean mouseMove(Component component, int x, int y)
          Called when the mouse is moved over a component.
 void mouseOut(Component component)
          Called when the mouse exits a component.
 boolean mouseUp(Component component, Mouse.Button button, int x, int y)
          Called when a mouse button is released over a component.
 boolean mouseWheel(Component component, Mouse.ScrollType scrollType, int scrollAmount, int wheelRotation, int x, int y)
          Called when the mouse wheel is scrolled over a component.
 void paint(Graphics2D graphics)
          Paints the visual.
 void rowEditorChanged(TableView tableView, TableView.RowEditor previousRowEditor)
          Called when a table view's row editor has changed.
 void rowInserted(TableView tableView, int index)
          Called when a row has been inserted into the table view.
 void rowsCleared(TableView listView)
          Called when the rows in a table view have been cleared.
 void rowsRemoved(TableView tableView, int index, int count)
          Called when rows have been removed from the table view.
 void rowsSorted(TableView tableView)
          Called when the rows in a table have been sorted.
 void rowUpdated(TableView tableView, int index)
          Called when an row in the table view has been updated.
 void selectedRangeAdded(TableView tableView, int rangeStart, int rangeEnd)
          Called when a range has been added to a table view's selection.
 void selectedRangeRemoved(TableView tableView, int rangeStart, int rangeEnd)
          Called when a range has been removed from a table view's selection.
 void selectedRangesChanged(TableView tableView, Sequence<Span> previousSelectedRanges)
          Called when a table view's selection state has been reset.
 void selectedRowChanged(TableView tableView, Object previousSelectedRow)
          Called when a table view's selected item has changed.
 void selectModeChanged(TableView tableView, TableView.SelectMode previousSelectMode)
          Called when a table view's select mode has changed.
 void setAlternateRowBackgroundColor(Color alternateRowBackgroundColor)
           
 void setAlternateRowBackgroundColor(int alternateRowBackgroundColor)
           
 void setAlternateRowBackgroundColor(String alternateRowBackgroundColor)
           
 void setBackgroundColor(Color backgroundColor)
           
 void setBackgroundColor(int backgroundColor)
           
 void setBackgroundColor(String backgroundColor)
           
 void setColor(Color color)
           
 void setColor(int color)
           
 void setColor(String color)
           
 void setColumnSelectionColor(Color columnSelectionColor)
           
 void setColumnSelectionColor(int columnSelectionColor)
           
 void setColumnSelectionColor(String columnSelectionColor)
           
 void setColumnSelectionHorizontalGridColor(Color columnSelectionHorizontalGridColor)
           
 void setColumnSelectionHorizontalGridColor(int columnSelectionHorizontalGridColor)
           
 void setColumnSelectionHorizontalGridColor(String columnSelectionHorizontalGridColor)
           
 void setDisabledColor(Color disabledColor)
           
 void setDisabledColor(int disabledColor)
           
 void setDisabledColor(String disabledColor)
           
 void setEditOnMouseDown(boolean editOnMouseDown)
           
 void setFont(Dictionary<String,?> font)
           
 void setFont(Font font)
           
 void setFont(String font)
           
 void setHighlightBackgroundColor(Color highlightBackgroundColor)
           
 void setHighlightBackgroundColor(int highlightBackgroundColor)
           
 void setHighlightBackgroundColor(String highlightBackgroundColor)
           
 void setHorizontalGridColor(Color horizontalGridColor)
           
 void setHorizontalGridColor(int horizontalGridColor)
           
 void setHorizontalGridColor(String horizontalGridColor)
           
 void setInactiveSelectionBackgroundColor(Color inactiveSelectionBackgroundColor)
           
 void setInactiveSelectionBackgroundColor(int inactiveSelectionBackgroundColor)
           
 void setInactiveSelectionBackgroundColor(String inactiveSelectionBackgroundColor)
           
 void setInactiveSelectionColor(Color inactiveSelectionColor)
           
 void setInactiveSelectionColor(int inactiveSelectionColor)
           
 void setInactiveSelectionColor(String inactiveSelectionColor)
           
 void setIncludeTrailingHorizontalGridLine(boolean includeTrailingHorizontalGridLine)
           
 void setIncludeTrailingVerticalGridLine(boolean includeTrailingVerticalGridLine)
           
 void setSelectionBackgroundColor(Color selectionBackgroundColor)
           
 void setSelectionBackgroundColor(int selectionBackgroundColor)
           
 void setSelectionBackgroundColor(String selectionBackgroundColor)
           
 void setSelectionColor(Color selectionColor)
           
 void setSelectionColor(int selectionColor)
           
 void setSelectionColor(String selectionColor)
           
 void setShowHighlight(boolean showHighlight)
           
 void setShowHorizontalGridLines(boolean showHorizontalGridLines)
           
 void setShowVerticalGridLines(boolean showVerticalGridLines)
           
 void setVariableRowHeight(boolean variableRowHeight)
           
 void setVerticalGridColor(Color verticalGridColor)
           
 void setVerticalGridColor(int verticalGridColor)
           
 void setVerticalGridColor(String verticalGridColor)
           
 void tableDataChanged(TableView tableView, List<?> previousTableData)
          Called when a table view's table data has changed.
 
Methods inherited from class org.apache.pivot.wtk.skin.ComponentSkin
cursorChanged, decodeFont, dragSourceChanged, dropTargetChanged, getBaseline, getComponent, getHeight, getWidth, heightLimitsChanged, invalidateComponent, keyReleased, keyTyped, locationChanged, menuHandlerChanged, mouseOver, nameChanged, parentChanged, preferredSizeChanged, repaintComponent, repaintComponent, repaintComponent, repaintComponent, repaintComponent, setSize, sizeChanged, tooltipDelayChanged, tooltipTextChanged, tooltipTriggered, visibleChanged, widthLimitsChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TerraTableViewSkin

public TerraTableViewSkin()
Method Detail

install

public void install(Component component)
Description copied from interface: Skin
Associates a skin with a component.

Specified by:
install in interface Skin
Overrides:
install in class ComponentSkin
Parameters:
component - The component to which the skin is being attached.

getPreferredWidth

public int getPreferredWidth(int height)
Description copied from interface: ConstrainedVisual
Returns the visual's preferred width given the provided height constraint.

Specified by:
getPreferredWidth in interface ConstrainedVisual
Parameters:
height - The height by which to constrain the preferred width, or -1 for no constraint.

getPreferredWidth

public static int getPreferredWidth(TableView tableView,
                                    boolean includeTrailingVerticalGridLine)

getPreferredHeight

public int getPreferredHeight(int width)
Description copied from interface: ConstrainedVisual
Returns the visual's preferred height given the provided width constraint.

Specified by:
getPreferredHeight in interface ConstrainedVisual
Parameters:
width - The width by which to constrain the preferred height, or -1 for no constraint.

getPreferredSize

public Dimensions getPreferredSize()
Description copied from interface: ConstrainedVisual
Returns the visual's unconstrained preferred size.

Specified by:
getPreferredSize in interface ConstrainedVisual
Overrides:
getPreferredSize in class ComponentSkin

getBaseline

public int getBaseline(int width,
                       int height)
Description copied from interface: ConstrainedVisual
Returns the baseline for a given width and height.

Specified by:
getBaseline in interface ConstrainedVisual
Overrides:
getBaseline in class ComponentSkin
Returns:
The baseline relative to the origin of this visual, or -1 if this visual does not have a baseline.

layout

public void layout()
Description copied from interface: Skin
If the component on which the skin is installed is a container, lays out the container's children.

Specified by:
layout in interface Skin

paint

public void paint(Graphics2D graphics)
Description copied from interface: Visual
Paints the visual.

Specified by:
paint in interface Visual
Parameters:
graphics - The graphics context in which to paint the visual.

getVariableRowHeight

protected int getVariableRowHeight(int rowIndex,
                                   ArrayList<Integer> columnWidthsArgument)

getRowAt

public int getRowAt(int y)
Specified by:
getRowAt in interface TableView.Skin

getColumnAt

public int getColumnAt(int x)
Specified by:
getColumnAt in interface TableView.Skin

getRowBounds

public Bounds getRowBounds(int rowIndex)
Specified by:
getRowBounds in interface TableView.Skin

getColumnBounds

public Bounds getColumnBounds(int columnIndex)
Specified by:
getColumnBounds in interface TableView.Skin

getCellBounds

public Bounds getCellBounds(int rowIndex,
                            int columnIndex)
Specified by:
getCellBounds in interface TableView.Skin

getColumnWidths

public static ArrayList<Integer> getColumnWidths(TableView tableView,
                                                 int width)

isFocusable

public boolean isFocusable()
Description copied from class: ComponentSkin
By default, skins are focusable.

Specified by:
isFocusable in interface Skin
Overrides:
isFocusable in class ComponentSkin
Returns:
true if this skin is focusable; false, otherwise.

isOpaque

public boolean isOpaque()
Description copied from class: ComponentSkin
By default, skins are assumed to be opaque.

Specified by:
isOpaque in interface Skin
Overrides:
isOpaque in class ComponentSkin
Returns:
true if this skin is opaque; false if any part of it is transparent or translucent.

getFont

public Font getFont()

setFont

public void setFont(Font font)

setFont

public final void setFont(String font)

setFont

public final void setFont(Dictionary<String,?> font)

getColor

public Color getColor()

setColor

public void setColor(Color color)

setColor

public final void setColor(String color)

setColor

public final void setColor(int color)

getDisabledColor

public Color getDisabledColor()

setDisabledColor

public void setDisabledColor(Color disabledColor)

setDisabledColor

public final void setDisabledColor(String disabledColor)

setDisabledColor

public final void setDisabledColor(int disabledColor)

getBackgroundColor

public Color getBackgroundColor()

setBackgroundColor

public void setBackgroundColor(Color backgroundColor)

setBackgroundColor

public final void setBackgroundColor(String backgroundColor)

setBackgroundColor

public final void setBackgroundColor(int backgroundColor)

getSelectionColor

public Color getSelectionColor()

setSelectionColor

public void setSelectionColor(Color selectionColor)

setSelectionColor

public final void setSelectionColor(String selectionColor)

setSelectionColor

public final void setSelectionColor(int selectionColor)

getSelectionBackgroundColor

public Color getSelectionBackgroundColor()

setSelectionBackgroundColor

public void setSelectionBackgroundColor(Color selectionBackgroundColor)

setSelectionBackgroundColor

public final void setSelectionBackgroundColor(String selectionBackgroundColor)

setSelectionBackgroundColor

public final void setSelectionBackgroundColor(int selectionBackgroundColor)

getInactiveSelectionColor

public Color getInactiveSelectionColor()

setInactiveSelectionColor

public void setInactiveSelectionColor(Color inactiveSelectionColor)

setInactiveSelectionColor

public final void setInactiveSelectionColor(String inactiveSelectionColor)

setInactiveSelectionColor

public final void setInactiveSelectionColor(int inactiveSelectionColor)

getInactiveSelectionBackgroundColor

public Color getInactiveSelectionBackgroundColor()

setInactiveSelectionBackgroundColor

public void setInactiveSelectionBackgroundColor(Color inactiveSelectionBackgroundColor)

setInactiveSelectionBackgroundColor

public final void setInactiveSelectionBackgroundColor(String inactiveSelectionBackgroundColor)

setInactiveSelectionBackgroundColor

public final void setInactiveSelectionBackgroundColor(int inactiveSelectionBackgroundColor)

getHighlightBackgroundColor

public Color getHighlightBackgroundColor()

setHighlightBackgroundColor

public void setHighlightBackgroundColor(Color highlightBackgroundColor)

setHighlightBackgroundColor

public final void setHighlightBackgroundColor(String highlightBackgroundColor)

setHighlightBackgroundColor

public final void setHighlightBackgroundColor(int highlightBackgroundColor)

getAlternateRowBackgroundColor

public Color getAlternateRowBackgroundColor()

setAlternateRowBackgroundColor

public void setAlternateRowBackgroundColor(Color alternateRowBackgroundColor)

setAlternateRowBackgroundColor

public final void setAlternateRowBackgroundColor(String alternateRowBackgroundColor)

setAlternateRowBackgroundColor

public final void setAlternateRowBackgroundColor(int alternateRowBackgroundColor)

getColumnSelectionColor

public Color getColumnSelectionColor()

setColumnSelectionColor

public void setColumnSelectionColor(Color columnSelectionColor)

setColumnSelectionColor

public final void setColumnSelectionColor(String columnSelectionColor)

setColumnSelectionColor

public final void setColumnSelectionColor(int columnSelectionColor)

getColumnSelectionHorizontalGridColor

public Color getColumnSelectionHorizontalGridColor()

setColumnSelectionHorizontalGridColor

public void setColumnSelectionHorizontalGridColor(Color columnSelectionHorizontalGridColor)

setColumnSelectionHorizontalGridColor

public final void setColumnSelectionHorizontalGridColor(String columnSelectionHorizontalGridColor)

setColumnSelectionHorizontalGridColor

public final void setColumnSelectionHorizontalGridColor(int columnSelectionHorizontalGridColor)

getHorizontalGridColor

public Color getHorizontalGridColor()

setHorizontalGridColor

public void setHorizontalGridColor(Color horizontalGridColor)

setHorizontalGridColor

public final void setHorizontalGridColor(String horizontalGridColor)

setHorizontalGridColor

public final void setHorizontalGridColor(int horizontalGridColor)

getVerticalGridColor

public Color getVerticalGridColor()

setVerticalGridColor

public void setVerticalGridColor(Color verticalGridColor)

setVerticalGridColor

public final void setVerticalGridColor(String verticalGridColor)

setVerticalGridColor

public final void setVerticalGridColor(int verticalGridColor)

getShowHighlight

public boolean getShowHighlight()

setShowHighlight

public void setShowHighlight(boolean showHighlight)

getShowHorizontalGridLines

public boolean getShowHorizontalGridLines()

setShowHorizontalGridLines

public void setShowHorizontalGridLines(boolean showHorizontalGridLines)

getShowVerticalGridLines

public boolean getShowVerticalGridLines()

setShowVerticalGridLines

public void setShowVerticalGridLines(boolean showVerticalGridLines)

getIncludeTrailingVerticalGridLine

public boolean getIncludeTrailingVerticalGridLine()

setIncludeTrailingVerticalGridLine

public void setIncludeTrailingVerticalGridLine(boolean includeTrailingVerticalGridLine)

getIncludeTrailingHorizontalGridLine

public boolean getIncludeTrailingHorizontalGridLine()

setIncludeTrailingHorizontalGridLine

public void setIncludeTrailingHorizontalGridLine(boolean includeTrailingHorizontalGridLine)

isVariableRowHeight

public boolean isVariableRowHeight()

setVariableRowHeight

public void setVariableRowHeight(boolean variableRowHeight)

isEditOnMouseDown

public boolean isEditOnMouseDown()

setEditOnMouseDown

public void setEditOnMouseDown(boolean editOnMouseDown)

mouseMove

public boolean mouseMove(Component component,
                         int x,
                         int y)
Description copied from interface: ComponentMouseListener
Called when the mouse is moved over a component.

Specified by:
mouseMove in interface ComponentMouseListener
Overrides:
mouseMove in class ComponentSkin
Returns:
true to consume the event; false to allow it to propagate.

mouseOut

public void mouseOut(Component component)
Description copied from interface: ComponentMouseListener
Called when the mouse exits a component.

Specified by:
mouseOut in interface ComponentMouseListener
Overrides:
mouseOut in class ComponentSkin

mouseDown

public boolean mouseDown(Component component,
                         Mouse.Button button,
                         int x,
                         int y)
Description copied from interface: ComponentMouseButtonListener
Called when a mouse button is pressed over a component.

Specified by:
mouseDown in interface ComponentMouseButtonListener
Overrides:
mouseDown in class ComponentSkin
Returns:
true to consume the event; false to allow it to propagate.

mouseUp

public boolean mouseUp(Component component,
                       Mouse.Button button,
                       int x,
                       int y)
Description copied from interface: ComponentMouseButtonListener
Called when a mouse button is released over a component.

Specified by:
mouseUp in interface ComponentMouseButtonListener
Overrides:
mouseUp in class ComponentSkin
Returns:
true to consume the event; false to allow it to propagate.

mouseClick

public boolean mouseClick(Component component,
                          Mouse.Button button,
                          int x,
                          int y,
                          int count)
Description copied from interface: ComponentMouseButtonListener
Called when a mouse button is clicked over a component.

Specified by:
mouseClick in interface ComponentMouseButtonListener
Overrides:
mouseClick in class ComponentSkin
Returns:
true to consume the event; false to allow it to propagate.

mouseWheel

public boolean mouseWheel(Component component,
                          Mouse.ScrollType scrollType,
                          int scrollAmount,
                          int wheelRotation,
                          int x,
                          int y)
Description copied from interface: ComponentMouseWheelListener
Called when the mouse wheel is scrolled over a component.

Specified by:
mouseWheel in interface ComponentMouseWheelListener
Overrides:
mouseWheel in class ComponentSkin
Returns:
true to consume the event; false to allow it to propagate.

keyPressed

public boolean keyPressed(Component component,
                          int keyCode,
                          Keyboard.KeyLocation keyLocation)
UP Selects the previous enabled row when select mode is not TableView.SelectMode.NONE
DOWN Selects the next enabled row when select mode is not TableView.SelectMode.NONE

SHIFT + UP Increases the selection size by including the previous enabled row when select mode is TableView.SelectMode.MULTI
SHIFT + DOWN Increases the selection size by including the next enabled row when select mode is TableView.SelectMode.MULTI

Specified by:
keyPressed in interface ComponentKeyListener
Overrides:
keyPressed in class ComponentSkin
Returns:
true to consume the event; false to allow it to propagate.

enabledChanged

public void enabledChanged(Component component)
Description copied from interface: ComponentStateListener
Called when a component's enabled state has changed.

Called both when the component is enabled and when it is disabled. The component's enabled flag has already been set when this method is called so the new state can be determined by calling the Component.isEnabled() method.

Specified by:
enabledChanged in interface ComponentStateListener
Overrides:
enabledChanged in class ComponentSkin
Parameters:
component - The component whose enabled state is changing.

focusedChanged

public void focusedChanged(Component component,
                           Component obverseComponent)
Description copied from interface: ComponentStateListener
Called when a component's focused state has changed.

This will be called both when a component gains focus and when it loses focus. The currently focused component has already been set when this method is called, so that the new state of the component can be determined by calling the Component.isFocused() method.

Specified by:
focusedChanged in interface ComponentStateListener
Overrides:
focusedChanged in class ComponentSkin
Parameters:
component - The component that is either gaining focus or the one that previously had focus and is now losing it.
obverseComponent - If the component is gaining focus, this is the component that is losing focus. If the component is losing focus this is the component that is gaining the focus instead.

tableDataChanged

public void tableDataChanged(TableView tableView,
                             List<?> previousTableData)
Description copied from interface: TableViewListener
Called when a table view's table data has changed.

Specified by:
tableDataChanged in interface TableViewListener

columnSourceChanged

public void columnSourceChanged(TableView tableView,
                                TableView previousColumnSource)
Description copied from interface: TableViewListener
Called when a table view's column source has changed.

Specified by:
columnSourceChanged in interface TableViewListener

rowEditorChanged

public void rowEditorChanged(TableView tableView,
                             TableView.RowEditor previousRowEditor)
Description copied from interface: TableViewListener
Called when a table view's row editor has changed.

Specified by:
rowEditorChanged in interface TableViewListener

selectModeChanged

public void selectModeChanged(TableView tableView,
                              TableView.SelectMode previousSelectMode)
Description copied from interface: TableViewListener
Called when a table view's select mode has changed.

Specified by:
selectModeChanged in interface TableViewListener

disabledRowFilterChanged

public void disabledRowFilterChanged(TableView tableView,
                                     Filter<?> previousDisabledRowFilter)
Description copied from interface: TableViewListener
Called when a table view's disabled row filter has changed.

Specified by:
disabledRowFilterChanged in interface TableViewListener

columnInserted

public void columnInserted(TableView tableView,
                           int index)
Description copied from interface: TableViewColumnListener
Called when a column is inserted into a table view's column sequence.

Specified by:
columnInserted in interface TableViewColumnListener

columnsRemoved

public void columnsRemoved(TableView tableView,
                           int index,
                           Sequence<TableView.Column> columns)
Description copied from interface: TableViewColumnListener
Called when columns are removed from a table view's column sequence.

Specified by:
columnsRemoved in interface TableViewColumnListener

columnNameChanged

public void columnNameChanged(TableView.Column column,
                              String previousName)
Description copied from interface: TableViewColumnListener
Called when a column's name has changed.

Specified by:
columnNameChanged in interface TableViewColumnListener

columnHeaderDataChanged

public void columnHeaderDataChanged(TableView.Column column,
                                    Object previousHeaderData)
Description copied from interface: TableViewColumnListener
Called when a column's header data has changed.

Specified by:
columnHeaderDataChanged in interface TableViewColumnListener

columnHeaderDataRendererChanged

public void columnHeaderDataRendererChanged(TableView.Column column,
                                            TableView.HeaderDataRenderer previousHeaderDataRenderer)
Description copied from interface: TableViewColumnListener
Called when a column's header data renderer has changed.

Specified by:
columnHeaderDataRendererChanged in interface TableViewColumnListener

columnWidthChanged

public void columnWidthChanged(TableView.Column column,
                               int previousWidth,
                               boolean previousRelative)
Description copied from interface: TableViewColumnListener
Called when a column's width has changed.

Specified by:
columnWidthChanged in interface TableViewColumnListener

columnWidthLimitsChanged

public void columnWidthLimitsChanged(TableView.Column column,
                                     int previousMinimumWidth,
                                     int previousMaximumWidth)
Description copied from interface: TableViewColumnListener
Called when a column's width limits have changed.

Specified by:
columnWidthLimitsChanged in interface TableViewColumnListener

columnFilterChanged

public void columnFilterChanged(TableView.Column column,
                                Object previousFilter)
Description copied from interface: TableViewColumnListener
Called when a column's filter has changed.

Specified by:
columnFilterChanged in interface TableViewColumnListener

columnCellRendererChanged

public void columnCellRendererChanged(TableView.Column column,
                                      TableView.CellRenderer previousCellRenderer)
Description copied from interface: TableViewColumnListener
Called when a column's cell renderer has changed.

Specified by:
columnCellRendererChanged in interface TableViewColumnListener

rowInserted

public void rowInserted(TableView tableView,
                        int index)
Description copied from interface: TableViewRowListener
Called when a row has been inserted into the table view.

Specified by:
rowInserted in interface TableViewRowListener
Parameters:
tableView - The source of the event.
index - The index of the row that was inserted.

rowsRemoved

public void rowsRemoved(TableView tableView,
                        int index,
                        int count)
Description copied from interface: TableViewRowListener
Called when rows have been removed from the table view.

Specified by:
rowsRemoved in interface TableViewRowListener
Parameters:
tableView - The source of the event.
index - The first index affected by the event.
count - The number of rows that were removed, or -1 if all rows were removed.

rowUpdated

public void rowUpdated(TableView tableView,
                       int index)
Description copied from interface: TableViewRowListener
Called when an row in the table view has been updated.

Specified by:
rowUpdated in interface TableViewRowListener
Parameters:
tableView - The source of the event.
index - The first index affected by the event.

rowsCleared

public void rowsCleared(TableView listView)
Description copied from interface: TableViewRowListener
Called when the rows in a table view have been cleared.

Specified by:
rowsCleared in interface TableViewRowListener

rowsSorted

public void rowsSorted(TableView tableView)
Description copied from interface: TableViewRowListener
Called when the rows in a table have been sorted.

Specified by:
rowsSorted in interface TableViewRowListener
Parameters:
tableView - The source of the event.

selectedRangeAdded

public void selectedRangeAdded(TableView tableView,
                               int rangeStart,
                               int rangeEnd)
Description copied from interface: TableViewSelectionListener
Called when a range has been added to a table view's selection.

Specified by:
selectedRangeAdded in interface TableViewSelectionListener
Parameters:
tableView - The source of the event.
rangeStart - The start index of the range that was added, inclusive.
rangeEnd - The end index of the range that was added, inclusive.

selectedRangeRemoved

public void selectedRangeRemoved(TableView tableView,
                                 int rangeStart,
                                 int rangeEnd)
Description copied from interface: TableViewSelectionListener
Called when a range has been removed from a table view's selection.

Specified by:
selectedRangeRemoved in interface TableViewSelectionListener
Parameters:
tableView - The source of the event.
rangeStart - The start index of the range that was removed, inclusive.
rangeEnd - The end index of the range that was removed, inclusive.

selectedRangesChanged

public void selectedRangesChanged(TableView tableView,
                                  Sequence<Span> previousSelectedRanges)
Description copied from interface: TableViewSelectionListener
Called when a table view's selection state has been reset.

Specified by:
selectedRangesChanged in interface TableViewSelectionListener
Parameters:
tableView - The source of the event.
previousSelectedRanges - If the selection changed directly, contains the ranges that were previously selected. If the selection changed indirectly as a result of a model change, contains the current selection. Otherwise, contains null.

selectedRowChanged

public void selectedRowChanged(TableView tableView,
                               Object previousSelectedRow)
Description copied from interface: TableViewSelectionListener
Called when a table view's selected item has changed.

Specified by:
selectedRowChanged in interface TableViewSelectionListener
Parameters:
tableView - The source of the event.
previousSelectedRow - The row that was previously selected.