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

java.lang.Object
  extended by org.apache.pivot.wtk.skin.ComponentSkin
      extended by 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.ListViewListener
ListViewListener.Adapter
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ListViewItemListener
ListViewItemListener.Adapter
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ListViewSelectionListener
ListViewSelectionListener.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
TerraListViewSkin()
           
 
Method Summary
 void checkmarksEnabledChanged(ListView listView)
          Called when a list view's checkmarks enabled flag has 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.
 Color getAlternateItemBackgroundColor()
           
 Color getBackgroundColor()
           
 int getBaseline(int width, int height)
          Returns the baseline for a given width and height.
 Insets getCheckboxPadding()
           
 Color getColor()
           
 Color getDisabledColor()
           
 Font getFont()
           
 Color getHighlightBackgroundColor()
           
 Color getInactiveSelectionBackgroundColor()
           
 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.
 Color getSelectionBackgroundColor()
           
 Color getSelectionColor()
           
 boolean getShowHighlight()
           
 boolean getWrapSelectNext()
           
 void install(Component component)
          Associates a skin with a component.
 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 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)
          UP Selects the previous enabled list item when select mode is not ListView.SelectMode.NONE
DOWN Selects the next enabled list item when select mode is not ListView.SelectMode.NONE SHIFT + UP Increases the selection size by including the previous enabled list item when select mode is ListView.SelectMode.MULTI
SHIFT + DOWN Increases the selection size by including the next enabled list item when select mode is ListView.SelectMode.MULTI
 boolean keyReleased(Component component, int keyCode, Keyboard.KeyLocation keyLocation)
          SPACE Toggles check mark selection when select mode is ListView.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(Graphics2D graphics)
          Paints the visual.
 void selectedItemChanged(ListView listView, 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(Color alternateItemBackgroundColor)
           
 void setAlternateItemBackgroundColor(String alternateItemBackgroundColor)
           
 void setAlternateItemColor(int alternateItemBackgroundColor)
           
 void setBackgroundColor(Color backgroundColor)
           
 void setBackgroundColor(int backgroundColor)
           
 void setBackgroundColor(String backgroundColor)
           
 void setCheckboxPadding(Dictionary<String,?> checkboxPadding)
           
 void setCheckboxPadding(Insets checkboxPadding)
           
 void setCheckboxPadding(int checkboxPadding)
           
 void setCheckboxPadding(Number padding)
           
 void setCheckboxPadding(String checkboxPadding)
           
 void setColor(Color color)
           
 void setColor(int color)
           
 void setColor(String color)
           
 void setDisabledColor(Color disabledColor)
           
 void setDisabledColor(int disabledColor)
           
 void setDisabledColor(String disabledColor)
           
 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 setInactiveSelectionBackgroundColor(Color inactiveSelectionBackgroundColor)
           
 void setInactiveSelectionBackgroundColor(int inactiveSelectionBackgroundColor)
           
 void setInactiveSelectionBackgroundColor(String inactiveSelectionBackgroundColor)
           
 void setInactiveSelectionColor(Color inactiveSelectionColor)
           
 void setInactiveSelectionColor(int inactiveSelectionColor)
           
 void setInactiveSelectionColor(String inactiveSelectionColor)
           
 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 setVariableItemHeight(boolean variableItemHeight)
           
 void setWrapSelectNext(boolean wrapSelectNext)
           
 
Methods inherited from class org.apache.pivot.wtk.skin.ComponentSkin
cursorChanged, decodeFont, dragSourceChanged, dropTargetChanged, getBaseline, getComponent, getHeight, getPreferredSize, getWidth, heightLimitsChanged, invalidateComponent, 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

TerraListViewSkin

public TerraListViewSkin()
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.

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.

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.

getItemAt

public int getItemAt(int y)
Specified by:
getItemAt in interface ListView.Skin

getItemBounds

public Bounds getItemBounds(int index)
Specified by:
getItemBounds in interface ListView.Skin

getItemIndent

public int getItemIndent()
Specified by:
getItemIndent in interface ListView.Skin

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)

getAlternateItemBackgroundColor

public Color getAlternateItemBackgroundColor()

setAlternateItemBackgroundColor

public void setAlternateItemBackgroundColor(Color alternateItemBackgroundColor)

setAlternateItemBackgroundColor

public final void setAlternateItemBackgroundColor(String alternateItemBackgroundColor)

setAlternateItemColor

public final void setAlternateItemColor(int alternateItemBackgroundColor)

getShowHighlight

public boolean getShowHighlight()

setShowHighlight

public void setShowHighlight(boolean showHighlight)

getWrapSelectNext

public boolean getWrapSelectNext()

setWrapSelectNext

public void setWrapSelectNext(boolean wrapSelectNext)

getCheckboxPadding

public Insets getCheckboxPadding()

setCheckboxPadding

public void setCheckboxPadding(Insets checkboxPadding)

setCheckboxPadding

public final void setCheckboxPadding(Dictionary<String,?> checkboxPadding)

setCheckboxPadding

public final void setCheckboxPadding(int checkboxPadding)

setCheckboxPadding

public final void setCheckboxPadding(Number padding)

setCheckboxPadding

public final void setCheckboxPadding(String checkboxPadding)

isVariableItemHeight

public boolean isVariableItemHeight()

setVariableItemHeight

public 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 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 list item when select mode is not ListView.SelectMode.NONE
DOWN Selects the next enabled list item when select mode is not ListView.SelectMode.NONE

SHIFT + UP Increases the selection size by including the previous enabled list item when select mode is ListView.SelectMode.MULTI
SHIFT + DOWN Increases the selection size by including the next enabled list item when select mode is ListView.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.

keyReleased

public boolean keyReleased(Component component,
                           int keyCode,
                           Keyboard.KeyLocation keyLocation)
SPACE Toggles check mark selection when select mode is ListView.SelectMode.SINGLE

Specified by:
keyReleased in interface ComponentKeyListener
Overrides:
keyReleased in class ComponentSkin
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 interface ComponentKeyListener
Overrides:
keyTyped 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.

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 interface ListViewListener

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 interface ListViewListener

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 interface ListViewListener

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 interface ListViewListener

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 interface ListViewListener

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 interface ListViewListener

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 interface ListViewListener

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 interface ListViewItemListener
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 interface ListViewItemListener
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 interface ListViewItemListener
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 interface ListViewItemListener

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 interface ListViewItemListener
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 interface ListViewItemStateListener

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 interface ListViewSelectionListener
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 interface ListViewSelectionListener
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.

Specified by:
selectedRangesChanged in interface ListViewSelectionListener
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, contains null.

selectedItemChanged

public void selectedItemChanged(ListView listView,
                                Object previousSelectedItem)
Description copied from interface: ListViewSelectionListener
Called when a list view's selected item has changed.

Specified by:
selectedItemChanged in interface ListViewSelectionListener
Parameters:
listView - The source of the event.
previousSelectedItem - The item that was previously selected.