Package org.apache.pivot.wtk.skin.terra
Class TerraListViewSkin
- java.lang.Object
-
- org.apache.pivot.wtk.skin.ComponentSkin
-
- org.apache.pivot.wtk.skin.terra.TerraListViewSkin
-
- All Implemented Interfaces:
ComponentKeyListener
,ComponentListener
,ComponentMouseButtonListener
,ComponentMouseListener
,ComponentMouseWheelListener
,ComponentStateListener
,ComponentTooltipListener
,ConstrainedVisual
,ListView.Skin
,ListViewItemListener
,ListViewItemStateListener
,ListViewListener
,ListViewSelectionListener
,Skin
,Visual
public class TerraListViewSkin extends ComponentSkin implements ListView.Skin, ListViewListener, ListViewItemListener, ListViewItemStateListener, ListViewSelectionListener
List view skin.
-
-
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.ListViewItemListener
ListViewItemListener.Adapter, ListViewItemListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ListViewItemStateListener
ListViewItemStateListener.Adapter, ListViewItemStateListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ListViewListener
ListViewListener.Adapter, ListViewListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ListViewSelectionListener
ListViewSelectionListener.Adapter, ListViewSelectionListener.Listeners
-
-
Constructor Summary
Constructors Constructor Description TerraListViewSkin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkmarksEnabledChanged(ListView listView)
Called when a list view's checkmarks enabled flag has changed.void
checkmarksMixedAsCheckedChanged(ListView listView)
Called when a list view's flag to decide if mixed checkbox state should be treated as checked has been changed.void
checkmarksTriStateChanged(ListView listView)
Called when a list view's tri-state checkmarks flag has been changed.void
disabledCheckmarkFilterChanged(ListView listView, Filter<?> previousDisabledCheckmarkFilter)
Called when a list view's disabled checkmark filter has changed.void
disabledItemFilterChanged(ListView listView, Filter<?> previousDisabledItemFilter)
Called when a list view's disabled item 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.java.awt.Color
getAlternateItemBackgroundColor()
java.awt.Color
getBackgroundColor()
int
getBaseline(int width, int height)
Should be implemented in every subclass.Insets
getCheckboxPadding()
java.awt.Color
getColor()
java.awt.Color
getDisabledColor()
java.awt.Font
getFont()
java.awt.Color
getHighlightBackgroundColor()
java.awt.Color
getInactiveSelectionBackgroundColor()
java.awt.Color
getInactiveSelectionColor()
int
getItemAt(int y)
Bounds
getItemBounds(int index)
int
getItemIndent()
int
getPreferredHeight(int width)
Returns the visual's preferred height given the provided width constraint.int
getPreferredWidth(int height)
Returns the visual's preferred width given the provided height constraint.java.awt.Color
getSelectionBackgroundColor()
java.awt.Color
getSelectionColor()
boolean
getShowHighlight()
boolean
getWrapSelectNext()
void
install(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.boolean
isFocusable()
By default, skins are focusable.boolean
isOpaque()
By default, skins are assumed to be opaque.boolean
isVariableItemHeight()
void
itemCheckedChanged(ListView listView, int index)
Called when an item's checked state has changed.void
itemCheckedStateChanged(ListView listView, int index)
Called when a tri-state item's state has changed, that is, in or out of theButton.State.MIXED
state.void
itemEditorChanged(ListView listView, ListView.ItemEditor previousItemEditor)
Called when a list view's item editor has changed.void
itemInserted(ListView listView, int index)
Called when an item has been inserted into the list view.void
itemRendererChanged(ListView listView, ListView.ItemRenderer previousItemRenderer)
Called when a list view's item renderer has changed.void
itemsCleared(ListView listView)
Called when the items in a list view have been cleared.void
itemsRemoved(ListView listView, int index, int count)
Called when items have been removed from the list view.void
itemsSorted(ListView listView)
Called when the items in a list view have been sorted.void
itemUpdated(ListView listView, int index)
Called when an item in the list view has been updated.boolean
keyPressed(Component component, int keyCode, Keyboard.KeyLocation keyLocation)
Keyboard handling (arrow keys with modifiers).boolean
keyReleased(Component component, int keyCode, Keyboard.KeyLocation keyLocation)
SPACE
Toggles check mark selection when select mode isListView.SelectMode.SINGLE
.boolean
keyTyped(Component component, char character)
Select the next enabled list item where the first character of the rendered text matches the typed key (case insensitive).void
layout()
If the component on which the skin is installed is a container, lays out the container's children.void
listDataChanged(ListView listView, List<?> previousListData)
Called when a list view's list data has changed.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(java.awt.Graphics2D graphics)
Paints the visual.void
selectedItemChanged(ListView listView, java.lang.Object previousSelectedItem)
Called when a list view's selected item has changed.void
selectedRangeAdded(ListView listView, int rangeStart, int rangeEnd)
Called when a range has been added to a list view's selection.void
selectedRangeRemoved(ListView listView, int rangeStart, int rangeEnd)
Called when a range has been removed from a list view's selection.void
selectedRangesChanged(ListView listView, Sequence<Span> previousSelectedRanges)
Called when a list view's selection state has changed.void
selectModeChanged(ListView listView, ListView.SelectMode previousSelectMode)
Called when a list view's select mode has changed.void
setAlternateItemBackgroundColor(java.awt.Color alternateItemBackgroundColor)
void
setAlternateItemBackgroundColor(java.lang.String alternateItemBackgroundColor)
void
setAlternateItemColor(int alternateItemBackgroundColor)
void
setBackgroundColor(int backgroundColor)
void
setBackgroundColor(java.awt.Color backgroundColor)
void
setBackgroundColor(java.lang.String backgroundColor)
void
setCheckboxPadding(int checkboxPadding)
void
setCheckboxPadding(java.lang.Number padding)
void
setCheckboxPadding(java.lang.String checkboxPadding)
void
setCheckboxPadding(Dictionary<java.lang.String,?> checkboxPadding)
void
setCheckboxPadding(Insets checkboxPadding)
void
setColor(int color)
void
setColor(java.awt.Color color)
void
setColor(java.lang.String color)
void
setDisabledColor(int disabledColor)
void
setDisabledColor(java.awt.Color disabledColor)
void
setDisabledColor(java.lang.String disabledColor)
void
setFont(java.awt.Font font)
void
setFont(java.lang.String font)
void
setFont(Dictionary<java.lang.String,?> font)
void
setHighlightBackgroundColor(int highlightBackgroundColor)
void
setHighlightBackgroundColor(java.awt.Color highlightBackgroundColor)
void
setHighlightBackgroundColor(java.lang.String highlightBackgroundColor)
void
setInactiveSelectionBackgroundColor(int inactiveSelectionBackgroundColor)
void
setInactiveSelectionBackgroundColor(java.awt.Color inactiveSelectionBackgroundColor)
void
setInactiveSelectionBackgroundColor(java.lang.String inactiveSelectionBackgroundColor)
void
setInactiveSelectionColor(int inactiveSelectionColor)
void
setInactiveSelectionColor(java.awt.Color inactiveSelectionColor)
void
setInactiveSelectionColor(java.lang.String inactiveSelectionColor)
void
setSelectionBackgroundColor(int selectionBackgroundColor)
void
setSelectionBackgroundColor(java.awt.Color selectionBackgroundColor)
void
setSelectionBackgroundColor(java.lang.String selectionBackgroundColor)
void
setSelectionColor(int selectionColor)
void
setSelectionColor(java.awt.Color selectionColor)
void
setSelectionColor(java.lang.String selectionColor)
void
setShowHighlight(boolean showHighlight)
void
setVariableItemHeight(boolean variableItemHeight)
void
setWrapSelectNext(boolean wrapSelectNext)
-
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, getPreferredSize, getSize, getTextInputMethodListener, getThemeFont, getWidth, heightLimitsChanged, invalidateComponent, 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:ComponentSkin
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.- Specified by:
install
in interfaceSkin
- Overrides:
install
in classComponentSkin
- 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 interfaceConstrainedVisual
- Parameters:
height
- The height by which to constrain the preferred width, or-1
for no constraint.- Returns:
- The preferred width given the height constraint.
-
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 interfaceConstrainedVisual
- Parameters:
width
- The width by which to constrain the preferred height, or-1
for no constraint.- Returns:
- The preferred height given the width constraint.
-
getBaseline
public int getBaseline(int width, int height)
Description copied from class:ComponentSkin
Should be implemented in every subclass.The default implementation here simply returns -1 (no baseline).
- Specified by:
getBaseline
in interfaceConstrainedVisual
- Overrides:
getBaseline
in 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
-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.
-
paint
public void paint(java.awt.Graphics2D graphics)
Description copied from interface:Visual
Paints the visual.
-
getItemAt
public int getItemAt(int y)
- Specified by:
getItemAt
in interfaceListView.Skin
-
getItemBounds
public Bounds getItemBounds(int index)
- Specified by:
getItemBounds
in interfaceListView.Skin
-
getItemIndent
public int getItemIndent()
- Specified by:
getItemIndent
in interfaceListView.Skin
-
isFocusable
public final boolean isFocusable()
Description copied from class:ComponentSkin
By default, skins are focusable.- Specified by:
isFocusable
in interfaceSkin
- Overrides:
isFocusable
in classComponentSkin
- Returns:
true
if this skin is focusable;false
, otherwise.
-
isOpaque
public final boolean isOpaque()
Description copied from class:ComponentSkin
By default, skins are assumed to be opaque.- Specified by:
isOpaque
in interfaceSkin
- Overrides:
isOpaque
in classComponentSkin
- Returns:
true
if this skin is opaque;false
if 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)
-
getAlternateItemBackgroundColor
public final java.awt.Color getAlternateItemBackgroundColor()
-
setAlternateItemBackgroundColor
public final void setAlternateItemBackgroundColor(java.awt.Color alternateItemBackgroundColor)
-
setAlternateItemBackgroundColor
public final void setAlternateItemBackgroundColor(java.lang.String alternateItemBackgroundColor)
-
setAlternateItemColor
public final void setAlternateItemColor(int alternateItemBackgroundColor)
-
getShowHighlight
public final boolean getShowHighlight()
-
setShowHighlight
public final void setShowHighlight(boolean showHighlight)
-
getWrapSelectNext
public final boolean getWrapSelectNext()
-
setWrapSelectNext
public final void setWrapSelectNext(boolean wrapSelectNext)
-
getCheckboxPadding
public final Insets getCheckboxPadding()
-
setCheckboxPadding
public final void setCheckboxPadding(Insets checkboxPadding)
-
setCheckboxPadding
public final void setCheckboxPadding(Dictionary<java.lang.String,?> checkboxPadding)
-
setCheckboxPadding
public final void setCheckboxPadding(int checkboxPadding)
-
setCheckboxPadding
public final void setCheckboxPadding(java.lang.Number padding)
-
setCheckboxPadding
public final void setCheckboxPadding(java.lang.String checkboxPadding)
-
isVariableItemHeight
public final boolean isVariableItemHeight()
-
setVariableItemHeight
public final void setVariableItemHeight(boolean variableItemHeight)
-
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 interfaceComponentMouseListener
- Overrides:
mouseMove
in classComponentSkin
- Parameters:
component
- Component that is under the mouse.x
- X position of the mouse.y
- Y position of the mouse.- Returns:
true
to consume the event;false
to allow it to propagate (default return).
-
mouseOut
public void mouseOut(Component component)
Description copied from interface:ComponentMouseListener
Called when the mouse exits a component.Default is to do nothing.
- Specified by:
mouseOut
in interfaceComponentMouseListener
- Overrides:
mouseOut
in 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:ComponentMouseButtonListener
Called when a mouse button is pressed over a component.- Specified by:
mouseDown
in interfaceComponentMouseButtonListener
- Overrides:
mouseDown
in 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:
true
to consume the event;false
to allow it to propagate (default).
-
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 interfaceComponentMouseButtonListener
- Overrides:
mouseUp
in 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:
true
to consume the event;false
to allow it to propagate (default).
-
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 interfaceComponentMouseButtonListener
- Overrides:
mouseClick
in 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:
true
to consume the event;false
to 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:ComponentMouseWheelListener
Called when the mouse wheel is scrolled over a component.- Specified by:
mouseWheel
in interfaceComponentMouseWheelListener
- Overrides:
mouseWheel
in 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:
true
to consume the event;false
to allow it to propagate.
-
keyPressed
public boolean keyPressed(Component component, int keyCode, Keyboard.KeyLocation keyLocation)
Keyboard handling (arrow keys with modifiers).UP
Selects the previous enabled list item when select mode is notListView.SelectMode.NONE
DOWN
Selects the next enabled list item when select mode is notListView.SelectMode.NONE
SHIFT
+UP
Increases the selection size by including the previous enabled list item when select mode isListView.SelectMode.MULTI
SHIFT
+DOWN
Increases the selection size by including the next enabled list item when select mode isListView.SelectMode.MULTI
- Specified by:
keyPressed
in interfaceComponentKeyListener
- Overrides:
keyPressed
in 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:
true
to consume the event;false
to allow it to propagate.
-
keyReleased
public boolean keyReleased(Component component, int keyCode, Keyboard.KeyLocation keyLocation)
SPACE
Toggles check mark selection when select mode isListView.SelectMode.SINGLE
.- Specified by:
keyReleased
in interfaceComponentKeyListener
- Overrides:
keyReleased
in classComponentSkin
- Parameters:
component
- Component that has the focus, that is receiving this key event.keyCode
- Code for the key that was released.keyLocation
- Location of the key.- Returns:
true
to consume the event;false
to allow it to propagate.
-
keyTyped
public boolean keyTyped(Component component, char character)
Select the next enabled list item where the first character of the rendered text matches the typed key (case insensitive).- Specified by:
keyTyped
in interfaceComponentKeyListener
- Overrides:
keyTyped
in classComponentSkin
- Parameters:
component
- Component that has the focus, that is receiving this key.character
- The decoded character that was typed.- 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 theComponent.isEnabled()
method.- Specified by:
enabledChanged
in interfaceComponentStateListener
- Overrides:
enabledChanged
in classComponentSkin
- 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 interfaceComponentStateListener
- Overrides:
focusedChanged
in 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.
-
listDataChanged
public void listDataChanged(ListView listView, List<?> previousListData)
Description copied from interface:ListViewListener
Called when a list view's list data has changed.- Specified by:
listDataChanged
in interfaceListViewListener
- Parameters:
listView
- The source of the event.previousListData
- The previous list data that was displayed.
-
itemRendererChanged
public void itemRendererChanged(ListView listView, ListView.ItemRenderer previousItemRenderer)
Description copied from interface:ListViewListener
Called when a list view's item renderer has changed.- Specified by:
itemRendererChanged
in interfaceListViewListener
- Parameters:
listView
- The source of the event.previousItemRenderer
- The previous renderer used for each item.
-
itemEditorChanged
public void itemEditorChanged(ListView listView, ListView.ItemEditor previousItemEditor)
Description copied from interface:ListViewListener
Called when a list view's item editor has changed.- Specified by:
itemEditorChanged
in interfaceListViewListener
- Parameters:
listView
- The source of the event.previousItemEditor
- The previous editor used for updating items.
-
selectModeChanged
public void selectModeChanged(ListView listView, ListView.SelectMode previousSelectMode)
Description copied from interface:ListViewListener
Called when a list view's select mode has changed.- Specified by:
selectModeChanged
in interfaceListViewListener
- Parameters:
listView
- The source of the event.previousSelectMode
- The previous selection mode.
-
checkmarksEnabledChanged
public void checkmarksEnabledChanged(ListView listView)
Description copied from interface:ListViewListener
Called when a list view's checkmarks enabled flag has changed.- Specified by:
checkmarksEnabledChanged
in interfaceListViewListener
- Parameters:
listView
- The list view that has been changed.
-
checkmarksTriStateChanged
public void checkmarksTriStateChanged(ListView listView)
Description copied from interface:ListViewListener
Called when a list view's tri-state checkmarks flag has been changed.- Specified by:
checkmarksTriStateChanged
in interfaceListViewListener
- Parameters:
listView
- The list view that has been changed.
-
checkmarksMixedAsCheckedChanged
public void checkmarksMixedAsCheckedChanged(ListView listView)
Description copied from interface:ListViewListener
Called when a list view's flag to decide if mixed checkbox state should be treated as checked has been changed.- Specified by:
checkmarksMixedAsCheckedChanged
in interfaceListViewListener
- Parameters:
listView
- The list view that has been changed.
-
disabledItemFilterChanged
public void disabledItemFilterChanged(ListView listView, Filter<?> previousDisabledItemFilter)
Description copied from interface:ListViewListener
Called when a list view's disabled item filter has changed.- Specified by:
disabledItemFilterChanged
in interfaceListViewListener
- Parameters:
listView
- The source of the event.previousDisabledItemFilter
- The previous filter function used to disable specific items.
-
disabledCheckmarkFilterChanged
public void disabledCheckmarkFilterChanged(ListView listView, Filter<?> previousDisabledCheckmarkFilter)
Description copied from interface:ListViewListener
Called when a list view's disabled checkmark filter has changed.- Specified by:
disabledCheckmarkFilterChanged
in interfaceListViewListener
- Parameters:
listView
- The source of the event.previousDisabledCheckmarkFilter
- The previous filter function used to disable checkmarks for certain items.
-
itemInserted
public void itemInserted(ListView listView, int index)
Description copied from interface:ListViewItemListener
Called when an item has been inserted into the list view.- Specified by:
itemInserted
in interfaceListViewItemListener
- Parameters:
listView
- The source of the event.index
- The index of the item that was inserted.
-
itemsRemoved
public void itemsRemoved(ListView listView, int index, int count)
Description copied from interface:ListViewItemListener
Called when items have been removed from the list view.- Specified by:
itemsRemoved
in interfaceListViewItemListener
- Parameters:
listView
- The source of the event.index
- The first index affected by the event.count
- The number of items that were removed, or-1
if all items were removed.
-
itemUpdated
public void itemUpdated(ListView listView, int index)
Description copied from interface:ListViewItemListener
Called when an item in the list view has been updated.- Specified by:
itemUpdated
in interfaceListViewItemListener
- Parameters:
listView
- The source of the event.index
- The first index affected by the event.
-
itemsCleared
public void itemsCleared(ListView listView)
Description copied from interface:ListViewItemListener
Called when the items in a list view have been cleared.- Specified by:
itemsCleared
in interfaceListViewItemListener
- Parameters:
listView
- The source of the event.
-
itemsSorted
public void itemsSorted(ListView listView)
Description copied from interface:ListViewItemListener
Called when the items in a list view have been sorted.- Specified by:
itemsSorted
in interfaceListViewItemListener
- Parameters:
listView
- The source of the event.
-
itemCheckedChanged
public void itemCheckedChanged(ListView listView, int index)
Description copied from interface:ListViewItemStateListener
Called when an item's checked state has changed.- Specified by:
itemCheckedChanged
in interfaceListViewItemStateListener
- Parameters:
listView
- The list view whose state has changed.index
- The index of the item whose checked state has changed.
-
itemCheckedStateChanged
public void itemCheckedStateChanged(ListView listView, int index)
Description copied from interface:ListViewItemStateListener
Called when a tri-state item's state has changed, that is, in or out of theButton.State.MIXED
state.- Specified by:
itemCheckedStateChanged
in interfaceListViewItemStateListener
- Parameters:
listView
- The list view whose state has changed.index
- The index of the item whose tri-state has changed.
-
selectedRangeAdded
public void selectedRangeAdded(ListView listView, int rangeStart, int rangeEnd)
Description copied from interface:ListViewSelectionListener
Called when a range has been added to a list view's selection.- Specified by:
selectedRangeAdded
in interfaceListViewSelectionListener
- Parameters:
listView
- 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(ListView listView, int rangeStart, int rangeEnd)
Description copied from interface:ListViewSelectionListener
Called when a range has been removed from a list view's selection.- Specified by:
selectedRangeRemoved
in interfaceListViewSelectionListener
- Parameters:
listView
- The source of the event.rangeStart
- The starting index of the range that was removed, inclusive.rangeEnd
- The starting index of the range that was removed, inclusive.
-
selectedRangesChanged
public void selectedRangesChanged(ListView listView, Sequence<Span> previousSelectedRanges)
Description copied from interface:ListViewSelectionListener
Called when a list view's selection state has changed. Called in any select mode, and will be called BEFORE theListViewSelectionListener.selectedItemChanged(org.apache.pivot.wtk.ListView, java.lang.Object)
callback if the ListView is in single-select mode. But, will be called AFTER eitherListViewSelectionListener.selectedRangeAdded(org.apache.pivot.wtk.ListView, int, int)
orListViewSelectionListener.selectedRangeRemoved(org.apache.pivot.wtk.ListView, int, int)
if appropriate.- Specified by:
selectedRangesChanged
in interfaceListViewSelectionListener
- Parameters:
listView
- 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
.
-
selectedItemChanged
public void selectedItemChanged(ListView listView, java.lang.Object previousSelectedItem)
Description copied from interface:ListViewSelectionListener
Called when a list view's selected item has changed. Only called in single-select mode.- Specified by:
selectedItemChanged
in interfaceListViewSelectionListener
- Parameters:
listView
- The source of the event.previousSelectedItem
- The item that was previously selected.
-
-