Class TerraTableViewSkin
- java.lang.Object
-
- org.apache.pivot.wtk.skin.ComponentSkin
-
- 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.ComponentKeyListener
ComponentKeyListener.Adapter, ComponentKeyListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentListener
ComponentListener.Adapter, ComponentListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseButtonListener
ComponentMouseButtonListener.Adapter, ComponentMouseButtonListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseListener
ComponentMouseListener.Adapter, ComponentMouseListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseWheelListener
ComponentMouseWheelListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentStateListener
ComponentStateListener.Adapter, ComponentStateListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentTooltipListener
ComponentTooltipListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.TableViewColumnListener
TableViewColumnListener.Adapter, TableViewColumnListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.TableViewListener
TableViewListener.Adapter, TableViewListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.TableViewRowListener
TableViewRowListener.Adapter, TableViewRowListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.TableViewSelectionListener
TableViewSelectionListener.Adapter, TableViewSelectionListener.Listeners
-
-
Constructor Summary
Constructors Constructor Description TerraTableViewSkin()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcolumnCellRendererChanged(TableView.Column column, TableView.CellRenderer previousCellRenderer)Called when a column's cell renderer has changed.voidcolumnFilterChanged(TableView.Column column, java.lang.Object previousFilter)Called when a column's filter has changed.voidcolumnHeaderDataChanged(TableView.Column column, java.lang.Object previousHeaderData)Called when a column's header data has changed.voidcolumnHeaderDataRendererChanged(TableView.Column column, TableView.HeaderDataRenderer previousHeaderDataRenderer)Called when a column's header data renderer has changed.voidcolumnInserted(TableView tableView, int index)Called when a column is inserted into a table view's column sequence.voidcolumnNameChanged(TableView.Column column, java.lang.String previousName)Called when a column's name has changed.voidcolumnSourceChanged(TableView tableView, TableView previousColumnSource)Called when a table view's column source has changed.voidcolumnsRemoved(TableView tableView, int index, Sequence<TableView.Column> columns)Called when columns are removed from a table view's column sequence.voidcolumnWidthChanged(TableView.Column column, int previousWidth, boolean previousRelative)Called when a column's width has changed.voidcolumnWidthLimitsChanged(TableView.Column column, int previousMinimumWidth, int previousMaximumWidth)Called when a column's width limits have changed.voiddisabledRowFilterChanged(TableView tableView, Filter<?> previousDisabledRowFilter)Called when a table view's disabled row filter has changed.voidenabledChanged(Component component)Called when a component's enabled state has changed.voidfocusedChanged(Component component, Component obverseComponent)Called when a component's focused state has changed.java.awt.ColorgetAlternateRowBackgroundColor()java.awt.ColorgetBackgroundColor()intgetBaseline(int width, int height)Should be implemented in every subclass.BoundsgetCellBounds(int rowIndex, int columnIndex)java.awt.ColorgetColor()intgetColumnAt(int x)BoundsgetColumnBounds(int columnIndex)java.awt.ColorgetColumnSelectionColor()java.awt.ColorgetColumnSelectionHorizontalGridColor()static ArrayList<java.lang.Integer>getColumnWidths(TableView tableView, int width)java.awt.ColorgetDisabledColor()java.awt.FontgetFont()java.awt.ColorgetHighlightBackgroundColor()java.awt.ColorgetHorizontalGridColor()java.awt.ColorgetInactiveSelectionBackgroundColor()java.awt.ColorgetInactiveSelectionColor()booleangetIncludeTrailingHorizontalGridLine()booleangetIncludeTrailingVerticalGridLine()intgetPreferredHeight(int width)Returns the visual's preferred height given the provided width constraint.DimensionsgetPreferredSize()Returns the visual's unconstrained preferred size.intgetPreferredWidth(int height)Returns the visual's preferred width given the provided height constraint.static intgetPreferredWidth(TableView tableView, boolean includeTrailingVerticalGridLine)intgetRowAt(int y)BoundsgetRowBounds(int rowIndex)java.awt.ColorgetSelectionBackgroundColor()java.awt.ColorgetSelectionColor()booleangetShowHighlight()booleangetShowHorizontalGridLines()booleangetShowVerticalGridLines()protected intgetVariableRowHeight(int rowIndex, ArrayList<java.lang.Integer> columnWidthsArgument)java.awt.ColorgetVerticalGridColor()voidinstall(Component component)Must be implemented in every subclass in order to do component-specific operations at instantiation time, but every subclass must call this superclass method to setup the necessary listeners, etc.booleanisEditOnMouseDown()booleanisFocusable()By default, skins are focusable.booleanisOpaque()By default, skins are assumed to be opaque.booleanisVariableRowHeight()booleankeyPressed(Component component, int keyCode, Keyboard.KeyLocation keyLocation)Keyboard handling (arrow keys with modifiers and a few others).voidlayout()If the component on which the skin is installed is a container, lays out the container's children.booleanmouseClick(Component component, Mouse.Button button, int x, int y, int count)Called when a mouse button is clicked over a component.booleanmouseDown(Component component, Mouse.Button button, int x, int y)Called when a mouse button is pressed over a component.booleanmouseMove(Component component, int x, int y)Called when the mouse is moved over a component.voidmouseOut(Component component)Called when the mouse exits a component.booleanmouseUp(Component component, Mouse.Button button, int x, int y)Called when a mouse button is released over a component.booleanmouseWheel(Component component, Mouse.ScrollType scrollType, int scrollAmount, int wheelRotation, int x, int y)Called when the mouse wheel is scrolled over a component.voidpaint(java.awt.Graphics2D graphics)Paints the visual.voidrowEditorChanged(TableView tableView, TableView.RowEditor previousRowEditor)Called when a table view's row editor has changed.voidrowInserted(TableView tableView, int index)Called when a row has been inserted into the table view.voidrowsCleared(TableView listView)Called when the rows in a table view have been cleared.voidrowsRemoved(TableView tableView, int index, int count)Called when rows have been removed from the table view.voidrowsSorted(TableView tableView)Called when the rows in a table have been sorted.voidrowUpdated(TableView tableView, int index)Called when an row in the table view has been updated.voidselectedRangeAdded(TableView tableView, int rangeStart, int rangeEnd)Called when a range has been added to a table view's selection.voidselectedRangeRemoved(TableView tableView, int rangeStart, int rangeEnd)Called when a range has been removed from a table view's selection.voidselectedRangesChanged(TableView tableView, Sequence<Span> previousSelectedRanges)Called when a table view's selection state has been reset.voidselectedRowChanged(TableView tableView, java.lang.Object previousSelectedRow)Called when a table view's selected item has changed.voidselectModeChanged(TableView tableView, TableView.SelectMode previousSelectMode)Called when a table view's select mode has changed.voidsetAlternateRowBackgroundColor(int alternateRowBackgroundColor)voidsetAlternateRowBackgroundColor(java.awt.Color alternateRowBackgroundColor)voidsetAlternateRowBackgroundColor(java.lang.String alternateRowBackgroundColor)voidsetBackgroundColor(int backgroundColor)voidsetBackgroundColor(java.awt.Color backgroundColor)voidsetBackgroundColor(java.lang.String backgroundColor)voidsetColor(int color)voidsetColor(java.awt.Color color)voidsetColor(java.lang.String color)voidsetColumnSelectionColor(int columnSelectionColor)voidsetColumnSelectionColor(java.awt.Color columnSelectionColor)voidsetColumnSelectionColor(java.lang.String columnSelectionColor)voidsetColumnSelectionHorizontalGridColor(int columnSelectionHorizontalGridColor)voidsetColumnSelectionHorizontalGridColor(java.awt.Color columnSelectionHorizontalGridColor)voidsetColumnSelectionHorizontalGridColor(java.lang.String columnSelectionHorizontalGridColor)voidsetDisabledColor(int disabledColor)voidsetDisabledColor(java.awt.Color disabledColor)voidsetDisabledColor(java.lang.String disabledColor)voidsetEditOnMouseDown(boolean editOnMouseDown)Set whether thisTableViewwill go into edit mode on a mouse down or on a mouse double click (the default).voidsetFont(java.awt.Font font)voidsetFont(java.lang.String font)voidsetFont(Dictionary<java.lang.String,?> font)voidsetHighlightBackgroundColor(int highlightBackgroundColor)voidsetHighlightBackgroundColor(java.awt.Color highlightBackgroundColor)voidsetHighlightBackgroundColor(java.lang.String highlightBackgroundColor)voidsetHorizontalGridColor(int horizontalGridColor)voidsetHorizontalGridColor(java.awt.Color horizontalGridColor)voidsetHorizontalGridColor(java.lang.String horizontalGridColor)voidsetInactiveSelectionBackgroundColor(int inactiveSelectionBackgroundColor)voidsetInactiveSelectionBackgroundColor(java.awt.Color inactiveSelectionBackgroundColor)voidsetInactiveSelectionBackgroundColor(java.lang.String inactiveSelectionBackgroundColor)voidsetInactiveSelectionColor(int inactiveSelectionColor)voidsetInactiveSelectionColor(java.awt.Color inactiveSelectionColor)voidsetInactiveSelectionColor(java.lang.String inactiveSelectionColor)voidsetIncludeTrailingHorizontalGridLine(boolean includeTrailingHorizontalGridLine)voidsetIncludeTrailingVerticalGridLine(boolean includeTrailingVerticalGridLine)voidsetSelectionBackgroundColor(int selectionBackgroundColor)voidsetSelectionBackgroundColor(java.awt.Color selectionBackgroundColor)voidsetSelectionBackgroundColor(java.lang.String selectionBackgroundColor)voidsetSelectionColor(int selectionColor)voidsetSelectionColor(java.awt.Color selectionColor)voidsetSelectionColor(java.lang.String selectionColor)voidsetShowHighlight(boolean showHighlight)voidsetShowHorizontalGridLines(boolean showHorizontalGridLines)voidsetShowVerticalGridLines(boolean showVerticalGridLines)voidsetVariableRowHeight(boolean variableRowHeight)voidsetVerticalGridColor(int verticalGridColor)voidsetVerticalGridColor(java.awt.Color verticalGridColor)voidsetVerticalGridColor(java.lang.String verticalGridColor)voidtableDataChanged(TableView tableView, List<?> previousTableData)Called when a table view's table data has changed.-
Methods inherited from class org.apache.pivot.wtk.skin.ComponentSkin
colorFromObject, colorFromObject, colorFromObject, colorFromObject, currentTheme, cursorChanged, decodeFont, defaultBackgroundColor, defaultForegroundColor, dragSourceChanged, dropTargetChanged, fontFromObject, getBaseline, getColor, getComponent, getFocusRectangleStroke, getHeight, getSize, getTextInputMethodListener, getThemeFont, getWidth, heightLimitsChanged, invalidateComponent, keyReleased, keyTyped, locationChanged, menuHandlerChanged, mouseOver, nameChanged, parentChanged, preferredSizeChanged, repaintComponent, repaintComponent, repaintComponent, repaintComponent, repaintComponent, setDefaultStyles, setSize, sizeChanged, themeHasThickFocusRectangle, themeHasTransitionEnabled, themeIsDark, themeIsFlat, tooltipDelayChanged, tooltipTextChanged, tooltipTriggered, visibleChanged, widthLimitsChanged
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.pivot.wtk.ConstrainedVisual
setSize
-
-
-
-
Method Detail
-
install
public void install(Component component)
Description copied from class:ComponentSkinMust be implemented in every subclass in order to do component-specific operations at instantiation time, but every subclass must call this superclass method to setup the necessary listeners, etc.- Specified by:
installin interfaceSkin- Overrides:
installin classComponentSkin- Parameters:
component- The component to which the skin is being attached.
-
getPreferredWidth
public int getPreferredWidth(int height)
Description copied from interface:ConstrainedVisualReturns the visual's preferred width given the provided height constraint.- Specified by:
getPreferredWidthin interfaceConstrainedVisual- Parameters:
height- The height by which to constrain the preferred width, or-1for no constraint.- Returns:
- The preferred width given the height constraint.
-
getPreferredWidth
public static int getPreferredWidth(TableView tableView, boolean includeTrailingVerticalGridLine)
-
getPreferredHeight
public int getPreferredHeight(int width)
Description copied from interface:ConstrainedVisualReturns the visual's preferred height given the provided width constraint.- Specified by:
getPreferredHeightin interfaceConstrainedVisual- Parameters:
width- The width by which to constrain the preferred height, or-1for no constraint.- Returns:
- The preferred height given the width constraint.
-
getPreferredSize
public Dimensions getPreferredSize()
Description copied from interface:ConstrainedVisualReturns the visual's unconstrained preferred size.- Specified by:
getPreferredSizein interfaceConstrainedVisual- Overrides:
getPreferredSizein classComponentSkin- Returns:
- The preferred size (width and height) of this component.
Depending on the component this can be a static value or derived (as for a container) from its subcomponents, etc.
The default implementation simply calls
ConstrainedVisual.getPreferredWidth(int)andConstrainedVisual.getPreferredHeight(int).
-
getBaseline
public int getBaseline(int width, int height)Description copied from class:ComponentSkinShould be implemented in every subclass.The default implementation here simply returns -1 (no baseline).
- Specified by:
getBaselinein interfaceConstrainedVisual- Overrides:
getBaselinein classComponentSkin- Parameters:
width- Constrained width to compute the baseline for.height- Constrained height to compute the baseline for.- Returns:
- The baseline relative to the origin of this visual, or
-1if this visual does not have a baseline.
-
layout
public void layout()
Description copied from interface:SkinIf the component on which the skin is installed is a container, lays out the container's children.
-
paint
public void paint(java.awt.Graphics2D graphics)
Description copied from interface:VisualPaints the visual.
-
getVariableRowHeight
protected int getVariableRowHeight(int rowIndex, ArrayList<java.lang.Integer> columnWidthsArgument)
-
getRowAt
public int getRowAt(int y)
- Specified by:
getRowAtin interfaceTableView.Skin
-
getColumnAt
public int getColumnAt(int x)
- Specified by:
getColumnAtin interfaceTableView.Skin
-
getRowBounds
public Bounds getRowBounds(int rowIndex)
- Specified by:
getRowBoundsin interfaceTableView.Skin
-
getColumnBounds
public Bounds getColumnBounds(int columnIndex)
- Specified by:
getColumnBoundsin interfaceTableView.Skin
-
getCellBounds
public Bounds getCellBounds(int rowIndex, int columnIndex)
- Specified by:
getCellBoundsin interfaceTableView.Skin
-
getColumnWidths
public static ArrayList<java.lang.Integer> getColumnWidths(TableView tableView, int width)
-
isFocusable
public final boolean isFocusable()
Description copied from class:ComponentSkinBy default, skins are focusable.- Specified by:
isFocusablein interfaceSkin- Overrides:
isFocusablein classComponentSkin- Returns:
trueif this skin is focusable;false, otherwise.
-
isOpaque
public final boolean isOpaque()
Description copied from class:ComponentSkinBy default, skins are assumed to be opaque.- Specified by:
isOpaquein interfaceSkin- Overrides:
isOpaquein classComponentSkin- Returns:
trueif this skin is opaque;falseif any part of it is transparent or translucent.
-
getFont
public final java.awt.Font getFont()
-
setFont
public final void setFont(java.awt.Font font)
-
setFont
public final void setFont(java.lang.String font)
-
setFont
public final void setFont(Dictionary<java.lang.String,?> font)
-
getColor
public final java.awt.Color getColor()
-
setColor
public final void setColor(java.awt.Color color)
-
setColor
public final void setColor(java.lang.String color)
-
setColor
public final void setColor(int color)
-
getDisabledColor
public final java.awt.Color getDisabledColor()
-
setDisabledColor
public final void setDisabledColor(java.awt.Color disabledColor)
-
setDisabledColor
public final void setDisabledColor(java.lang.String disabledColor)
-
setDisabledColor
public final void setDisabledColor(int disabledColor)
-
getBackgroundColor
public final java.awt.Color getBackgroundColor()
-
setBackgroundColor
public final void setBackgroundColor(java.awt.Color backgroundColor)
-
setBackgroundColor
public final void setBackgroundColor(java.lang.String backgroundColor)
-
setBackgroundColor
public final void setBackgroundColor(int backgroundColor)
-
getSelectionColor
public final java.awt.Color getSelectionColor()
-
setSelectionColor
public final void setSelectionColor(java.awt.Color selectionColor)
-
setSelectionColor
public final void setSelectionColor(java.lang.String selectionColor)
-
setSelectionColor
public final void setSelectionColor(int selectionColor)
-
getSelectionBackgroundColor
public final java.awt.Color getSelectionBackgroundColor()
-
setSelectionBackgroundColor
public final void setSelectionBackgroundColor(java.awt.Color selectionBackgroundColor)
-
setSelectionBackgroundColor
public final void setSelectionBackgroundColor(java.lang.String selectionBackgroundColor)
-
setSelectionBackgroundColor
public final void setSelectionBackgroundColor(int selectionBackgroundColor)
-
getInactiveSelectionColor
public final java.awt.Color getInactiveSelectionColor()
-
setInactiveSelectionColor
public final void setInactiveSelectionColor(java.awt.Color inactiveSelectionColor)
-
setInactiveSelectionColor
public final void setInactiveSelectionColor(java.lang.String inactiveSelectionColor)
-
setInactiveSelectionColor
public final void setInactiveSelectionColor(int inactiveSelectionColor)
-
getInactiveSelectionBackgroundColor
public final java.awt.Color getInactiveSelectionBackgroundColor()
-
setInactiveSelectionBackgroundColor
public final void setInactiveSelectionBackgroundColor(java.awt.Color inactiveSelectionBackgroundColor)
-
setInactiveSelectionBackgroundColor
public final void setInactiveSelectionBackgroundColor(java.lang.String inactiveSelectionBackgroundColor)
-
setInactiveSelectionBackgroundColor
public final void setInactiveSelectionBackgroundColor(int inactiveSelectionBackgroundColor)
-
getHighlightBackgroundColor
public final java.awt.Color getHighlightBackgroundColor()
-
setHighlightBackgroundColor
public final void setHighlightBackgroundColor(java.awt.Color highlightBackgroundColor)
-
setHighlightBackgroundColor
public final void setHighlightBackgroundColor(java.lang.String highlightBackgroundColor)
-
setHighlightBackgroundColor
public final void setHighlightBackgroundColor(int highlightBackgroundColor)
-
getAlternateRowBackgroundColor
public final java.awt.Color getAlternateRowBackgroundColor()
-
setAlternateRowBackgroundColor
public final void setAlternateRowBackgroundColor(java.awt.Color alternateRowBackgroundColor)
-
setAlternateRowBackgroundColor
public final void setAlternateRowBackgroundColor(java.lang.String alternateRowBackgroundColor)
-
setAlternateRowBackgroundColor
public final void setAlternateRowBackgroundColor(int alternateRowBackgroundColor)
-
getColumnSelectionColor
public final java.awt.Color getColumnSelectionColor()
-
setColumnSelectionColor
public final void setColumnSelectionColor(java.awt.Color columnSelectionColor)
-
setColumnSelectionColor
public final void setColumnSelectionColor(java.lang.String columnSelectionColor)
-
setColumnSelectionColor
public final void setColumnSelectionColor(int columnSelectionColor)
-
getColumnSelectionHorizontalGridColor
public final java.awt.Color getColumnSelectionHorizontalGridColor()
-
setColumnSelectionHorizontalGridColor
public final void setColumnSelectionHorizontalGridColor(java.awt.Color columnSelectionHorizontalGridColor)
-
setColumnSelectionHorizontalGridColor
public final void setColumnSelectionHorizontalGridColor(java.lang.String columnSelectionHorizontalGridColor)
-
setColumnSelectionHorizontalGridColor
public final void setColumnSelectionHorizontalGridColor(int columnSelectionHorizontalGridColor)
-
getHorizontalGridColor
public final java.awt.Color getHorizontalGridColor()
-
setHorizontalGridColor
public final void setHorizontalGridColor(java.awt.Color horizontalGridColor)
-
setHorizontalGridColor
public final void setHorizontalGridColor(java.lang.String horizontalGridColor)
-
setHorizontalGridColor
public final void setHorizontalGridColor(int horizontalGridColor)
-
getVerticalGridColor
public final java.awt.Color getVerticalGridColor()
-
setVerticalGridColor
public final void setVerticalGridColor(java.awt.Color verticalGridColor)
-
setVerticalGridColor
public final void setVerticalGridColor(java.lang.String verticalGridColor)
-
setVerticalGridColor
public final void setVerticalGridColor(int verticalGridColor)
-
getShowHighlight
public final boolean getShowHighlight()
-
setShowHighlight
public final void setShowHighlight(boolean showHighlight)
-
getShowHorizontalGridLines
public final boolean getShowHorizontalGridLines()
-
setShowHorizontalGridLines
public final void setShowHorizontalGridLines(boolean showHorizontalGridLines)
-
getShowVerticalGridLines
public final boolean getShowVerticalGridLines()
-
setShowVerticalGridLines
public final void setShowVerticalGridLines(boolean showVerticalGridLines)
-
getIncludeTrailingVerticalGridLine
public final boolean getIncludeTrailingVerticalGridLine()
-
setIncludeTrailingVerticalGridLine
public final void setIncludeTrailingVerticalGridLine(boolean includeTrailingVerticalGridLine)
-
getIncludeTrailingHorizontalGridLine
public final boolean getIncludeTrailingHorizontalGridLine()
-
setIncludeTrailingHorizontalGridLine
public final void setIncludeTrailingHorizontalGridLine(boolean includeTrailingHorizontalGridLine)
-
isVariableRowHeight
public final boolean isVariableRowHeight()
-
setVariableRowHeight
public final void setVariableRowHeight(boolean variableRowHeight)
-
isEditOnMouseDown
public final boolean isEditOnMouseDown()
- Returns:
- Is this
TableViewgoing into edit mode on a mouse down or on a mouse double click?
-
setEditOnMouseDown
public final void setEditOnMouseDown(boolean editOnMouseDown)
Set whether thisTableViewwill go into edit mode on a mouse down or on a mouse double click (the default).Setting this to
truecan reduce the number of mouse clicks necessary to rapidly edit a table view.- Parameters:
editOnMouseDown- The new setting.
-
mouseMove
public boolean mouseMove(Component component, int x, int y)
Description copied from interface:ComponentMouseListenerCalled when the mouse is moved over a component.- Specified by:
mouseMovein interfaceComponentMouseListener- Overrides:
mouseMovein classComponentSkin- Parameters:
component- Component that is under the mouse.x- X position of the mouse.y- Y position of the mouse.- Returns:
trueto consume the event;falseto allow it to propagate (default return).
-
mouseOut
public void mouseOut(Component component)
Description copied from interface:ComponentMouseListenerCalled when the mouse exits a component.Default is to do nothing.
- Specified by:
mouseOutin interfaceComponentMouseListener- Overrides:
mouseOutin classComponentSkin- Parameters:
component- Component that has now lost the mouse pointer.
-
mouseDown
public boolean mouseDown(Component component, Mouse.Button button, int x, int y)
Description copied from interface:ComponentMouseButtonListenerCalled when a mouse button is pressed over a component.- Specified by:
mouseDownin interfaceComponentMouseButtonListener- Overrides:
mouseDownin classComponentSkin- Parameters:
component- Component that is under the mouse pointer.button- Which mouse button was pressed.x- X position of the mouse.y- Y position of the mouse.- Returns:
trueto consume the event;falseto allow it to propagate (default).
-
mouseUp
public boolean mouseUp(Component component, Mouse.Button button, int x, int y)
Description copied from interface:ComponentMouseButtonListenerCalled when a mouse button is released over a component.- Specified by:
mouseUpin interfaceComponentMouseButtonListener- Overrides:
mouseUpin classComponentSkin- Parameters:
component- Component user the mouse pointer.button- Which mouse button that was released.x- X position of the mouse.y- Y position of the mouse.- Returns:
trueto consume the event;falseto allow it to propagate (default).
-
mouseClick
public boolean mouseClick(Component component, Mouse.Button button, int x, int y, int count)
Description copied from interface:ComponentMouseButtonListenerCalled when a mouse button is clicked over a component.- Specified by:
mouseClickin interfaceComponentMouseButtonListener- Overrides:
mouseClickin classComponentSkin- Parameters:
component- Component user the mouse pointer.button- Which mouse button was clicked.x- X position of the mouse.y- Y position of the mouse.count- Number of clicks (1 = single click, 2 = double click, etc.).- Returns:
trueto consume the event;falseto allow it to propagate (default).
-
mouseWheel
public boolean mouseWheel(Component component, Mouse.ScrollType scrollType, int scrollAmount, int wheelRotation, int x, int y)
Description copied from interface:ComponentMouseWheelListenerCalled when the mouse wheel is scrolled over a component.- Specified by:
mouseWheelin interfaceComponentMouseWheelListener- Overrides:
mouseWheelin classComponentSkin- Parameters:
component- Component under the mouse pointer.scrollType- What type of scroll was requested on the mouse.scrollAmount- Amount of scrolling.wheelRotation- Rotation value.x- X position of the mouse.y- Y position of the mouse.- Returns:
trueto consume the event;falseto allow it to propagate.
-
keyPressed
public boolean keyPressed(Component component, int keyCode, Keyboard.KeyLocation keyLocation)
Keyboard handling (arrow keys with modifiers and a few others).UPSelects the previous enabled row when select mode is notTableView.SelectMode.NONEDOWNSelects the next enabled row when select mode is notTableView.SelectMode.NONESHIFT+UPIncreases the selection size by including the previous enabled row when select mode isTableView.SelectMode.MULTISHIFT+DOWNIncreases the selection size by including the next enabled row when select mode isTableView.SelectMode.MULTICmd/Ctrl-AinTableView.SelectMode.MULTIselect mode to select everythingCmd/Ctrl-Uwill unselect whatever is selectedSPACEwil select/unselect the "current" location
- Specified by:
keyPressedin interfaceComponentKeyListener- Overrides:
keyPressedin classComponentSkin- Parameters:
component- Component that has the focus.keyCode- The key code for the key that was pressed.keyLocation- Location value for the key (left or right for shift keys, etc.).- Returns:
trueto consume the event;falseto allow it to propagate.
-
enabledChanged
public void enabledChanged(Component component)
Description copied from interface:ComponentStateListenerCalled when a component's enabled state has changed.Called both when the component is enabled and when it is disabled. The component's
enabledflag has already been set when this method is called so the new state can be determined by calling theComponent.isEnabled()method.- Specified by:
enabledChangedin interfaceComponentStateListener- Overrides:
enabledChangedin classComponentSkin- Parameters:
component- The component whose enabled state is changing.
-
focusedChanged
public void focusedChanged(Component component, Component obverseComponent)
Description copied from interface:ComponentStateListenerCalled 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:
focusedChangedin interfaceComponentStateListener- Overrides:
focusedChangedin classComponentSkin- 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:TableViewListenerCalled when a table view's table data has changed.- Specified by:
tableDataChangedin interfaceTableViewListener- Parameters:
tableView- The source of this event.previousTableData- The previous data list for this table view.
-
columnSourceChanged
public void columnSourceChanged(TableView tableView, TableView previousColumnSource)
Description copied from interface:TableViewListenerCalled when a table view's column source has changed.- Specified by:
columnSourceChangedin interfaceTableViewListener- Parameters:
tableView- The source of this event.previousColumnSource- The previous column source for this table.
-
rowEditorChanged
public void rowEditorChanged(TableView tableView, TableView.RowEditor previousRowEditor)
Description copied from interface:TableViewListenerCalled when a table view's row editor has changed.- Specified by:
rowEditorChangedin interfaceTableViewListener- Parameters:
tableView- The source of this event.previousRowEditor- The row editor that was previously used.
-
selectModeChanged
public void selectModeChanged(TableView tableView, TableView.SelectMode previousSelectMode)
Description copied from interface:TableViewListenerCalled when a table view's select mode has changed.- Specified by:
selectModeChangedin interfaceTableViewListener- Parameters:
tableView- The source of the event.previousSelectMode- What the select mode used to be.
-
disabledRowFilterChanged
public void disabledRowFilterChanged(TableView tableView, Filter<?> previousDisabledRowFilter)
Description copied from interface:TableViewListenerCalled when a table view's disabled row filter has changed.- Specified by:
disabledRowFilterChangedin interfaceTableViewListener- Parameters:
tableView- The table view in question.previousDisabledRowFilter- What the previous filter for disabled rows was.
-
columnInserted
public void columnInserted(TableView tableView, int index)
Description copied from interface:TableViewColumnListenerCalled when a column is inserted into a table view's column sequence.- Specified by:
columnInsertedin interfaceTableViewColumnListener- Parameters:
tableView- The table view that has changed.index- Where the new column has been inserted.
-
columnsRemoved
public void columnsRemoved(TableView tableView, int index, Sequence<TableView.Column> columns)
Description copied from interface:TableViewColumnListenerCalled when columns are removed from a table view's column sequence.- Specified by:
columnsRemovedin interfaceTableViewColumnListener- Parameters:
tableView- The table view that has changed.index- The starting location of the removed columns.columns- The actual sequence of columns that were removed.
-
columnNameChanged
public void columnNameChanged(TableView.Column column, java.lang.String previousName)
Description copied from interface:TableViewColumnListenerCalled when a column's name has changed.- Specified by:
columnNameChangedin interfaceTableViewColumnListener- Parameters:
column- The column that changed names.previousName- What the previous name was.
-
columnHeaderDataChanged
public void columnHeaderDataChanged(TableView.Column column, java.lang.Object previousHeaderData)
Description copied from interface:TableViewColumnListenerCalled when a column's header data has changed.- Specified by:
columnHeaderDataChangedin interfaceTableViewColumnListener- Parameters:
column- The column that changed.previousHeaderData- What the header data used to be.
-
columnHeaderDataRendererChanged
public void columnHeaderDataRendererChanged(TableView.Column column, TableView.HeaderDataRenderer previousHeaderDataRenderer)
Description copied from interface:TableViewColumnListenerCalled when a column's header data renderer has changed.- Specified by:
columnHeaderDataRendererChangedin interfaceTableViewColumnListener- Parameters:
column- The column whose header data renderer has changed.previousHeaderDataRenderer- The previous renderer for header data.
-
columnWidthChanged
public void columnWidthChanged(TableView.Column column, int previousWidth, boolean previousRelative)
Description copied from interface:TableViewColumnListenerCalled when a column's width has changed.- Specified by:
columnWidthChangedin interfaceTableViewColumnListener- Parameters:
column- The column that changed.previousWidth- The previous numeric value of the column width.previousRelative- Whether the previous width was relative or not.
-
columnWidthLimitsChanged
public void columnWidthLimitsChanged(TableView.Column column, int previousMinimumWidth, int previousMaximumWidth)
Description copied from interface:TableViewColumnListenerCalled when a column's width limits have changed.- Specified by:
columnWidthLimitsChangedin interfaceTableViewColumnListener- Parameters:
column- The source of this event.previousMinimumWidth- The previous minimum column width.previousMaximumWidth- The previous maximum column width.
-
columnFilterChanged
public void columnFilterChanged(TableView.Column column, java.lang.Object previousFilter)
Description copied from interface:TableViewColumnListenerCalled when a column's filter has changed.- Specified by:
columnFilterChangedin interfaceTableViewColumnListener- Parameters:
column- The source of this event.previousFilter- The previous filter value for this column.
-
columnCellRendererChanged
public void columnCellRendererChanged(TableView.Column column, TableView.CellRenderer previousCellRenderer)
Description copied from interface:TableViewColumnListenerCalled when a column's cell renderer has changed.- Specified by:
columnCellRendererChangedin interfaceTableViewColumnListener- Parameters:
column- The source of this event.previousCellRenderer- The previous cell renderer for this column.
-
rowInserted
public void rowInserted(TableView tableView, int index)
Description copied from interface:TableViewRowListenerCalled when a row has been inserted into the table view.- Specified by:
rowInsertedin interfaceTableViewRowListener- 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:TableViewRowListenerCalled when rows have been removed from the table view.- Specified by:
rowsRemovedin interfaceTableViewRowListener- Parameters:
tableView- The source of the event.index- The first index affected by the event.count- The number of rows that were removed, or-1if all rows were removed.
-
rowUpdated
public void rowUpdated(TableView tableView, int index)
Description copied from interface:TableViewRowListenerCalled when an row in the table view has been updated.- Specified by:
rowUpdatedin interfaceTableViewRowListener- 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:TableViewRowListenerCalled when the rows in a table view have been cleared.- Specified by:
rowsClearedin interfaceTableViewRowListener- Parameters:
listView- The source of the event.
-
rowsSorted
public void rowsSorted(TableView tableView)
Description copied from interface:TableViewRowListenerCalled when the rows in a table have been sorted.- Specified by:
rowsSortedin interfaceTableViewRowListener- Parameters:
tableView- The source of the event.
-
selectedRangeAdded
public void selectedRangeAdded(TableView tableView, int rangeStart, int rangeEnd)
Description copied from interface:TableViewSelectionListenerCalled when a range has been added to a table view's selection.- Specified by:
selectedRangeAddedin interfaceTableViewSelectionListener- 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:TableViewSelectionListenerCalled when a range has been removed from a table view's selection.- Specified by:
selectedRangeRemovedin interfaceTableViewSelectionListener- 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:TableViewSelectionListenerCalled when a table view's selection state has been reset.- Specified by:
selectedRangesChangedin interfaceTableViewSelectionListener- 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, containsnull.
-
selectedRowChanged
public void selectedRowChanged(TableView tableView, java.lang.Object previousSelectedRow)
Description copied from interface:TableViewSelectionListenerCalled when a table view's selected item has changed.- Specified by:
selectedRowChangedin interfaceTableViewSelectionListener- Parameters:
tableView- The source of the event.previousSelectedRow- The row that was previously selected.
-
-