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 voidcheckmarksEnabledChanged(ListView listView)Called when a list view's checkmarks enabled flag has changed.voidcheckmarksMixedAsCheckedChanged(ListView listView)Called when a list view's flag to decide if mixed checkbox state should be treated as checked has been changed.voidcheckmarksTriStateChanged(ListView listView)Called when a list view's tri-state checkmarks flag has been changed.voiddisabledCheckmarkFilterChanged(ListView listView, Filter<?> previousDisabledCheckmarkFilter)Called when a list view's disabled checkmark filter has changed.voiddisabledItemFilterChanged(ListView listView, Filter<?> previousDisabledItemFilter)Called when a list view's disabled item 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.ColorgetAlternateItemBackgroundColor()java.awt.ColorgetBackgroundColor()intgetBaseline(int width, int height)Should be implemented in every subclass.InsetsgetCheckboxPadding()java.awt.ColorgetColor()java.awt.ColorgetDisabledColor()java.awt.FontgetFont()java.awt.ColorgetHighlightBackgroundColor()java.awt.ColorgetInactiveSelectionBackgroundColor()java.awt.ColorgetInactiveSelectionColor()intgetItemAt(int y)BoundsgetItemBounds(int index)intgetItemIndent()intgetPreferredHeight(int width)Returns the visual's preferred height given the provided width constraint.intgetPreferredWidth(int height)Returns the visual's preferred width given the provided height constraint.java.awt.ColorgetSelectionBackgroundColor()java.awt.ColorgetSelectionColor()booleangetShowHighlight()booleangetWrapSelectNext()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.booleanisFocusable()By default, skins are focusable.booleanisOpaque()By default, skins are assumed to be opaque.booleanisVariableItemHeight()voiditemCheckedChanged(ListView listView, int index)Called when an item's checked state has changed.voiditemCheckedStateChanged(ListView listView, int index)Called when a tri-state item's state has changed, that is, in or out of theButton.State.MIXEDstate.voiditemEditorChanged(ListView listView, ListView.ItemEditor previousItemEditor)Called when a list view's item editor has changed.voiditemInserted(ListView listView, int index)Called when an item has been inserted into the list view.voiditemRendererChanged(ListView listView, ListView.ItemRenderer previousItemRenderer)Called when a list view's item renderer has changed.voiditemsCleared(ListView listView)Called when the items in a list view have been cleared.voiditemsRemoved(ListView listView, int index, int count)Called when items have been removed from the list view.voiditemsSorted(ListView listView)Called when the items in a list view have been sorted.voiditemUpdated(ListView listView, int index)Called when an item in the list view has been updated.booleankeyPressed(Component component, int keyCode, Keyboard.KeyLocation keyLocation)Keyboard handling (arrow keys with modifiers).booleankeyReleased(Component component, int keyCode, Keyboard.KeyLocation keyLocation)SPACEToggles check mark selection when select mode isListView.SelectMode.SINGLE.booleankeyTyped(Component component, char character)Select the next enabled list item where the first character of the rendered text matches the typed key (case insensitive).voidlayout()If the component on which the skin is installed is a container, lays out the container's children.voidlistDataChanged(ListView listView, List<?> previousListData)Called when a list view's list data has changed.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.voidselectedItemChanged(ListView listView, java.lang.Object previousSelectedItem)Called when a list view's selected item has changed.voidselectedRangeAdded(ListView listView, int rangeStart, int rangeEnd)Called when a range has been added to a list view's selection.voidselectedRangeRemoved(ListView listView, int rangeStart, int rangeEnd)Called when a range has been removed from a list view's selection.voidselectedRangesChanged(ListView listView, Sequence<Span> previousSelectedRanges)Called when a list view's selection state has changed.voidselectModeChanged(ListView listView, ListView.SelectMode previousSelectMode)Called when a list view's select mode has changed.voidsetAlternateItemBackgroundColor(java.awt.Color alternateItemBackgroundColor)voidsetAlternateItemBackgroundColor(java.lang.String alternateItemBackgroundColor)voidsetAlternateItemColor(int alternateItemBackgroundColor)voidsetBackgroundColor(int backgroundColor)voidsetBackgroundColor(java.awt.Color backgroundColor)voidsetBackgroundColor(java.lang.String backgroundColor)voidsetCheckboxPadding(int checkboxPadding)voidsetCheckboxPadding(java.lang.Number padding)voidsetCheckboxPadding(java.lang.String checkboxPadding)voidsetCheckboxPadding(Dictionary<java.lang.String,?> checkboxPadding)voidsetCheckboxPadding(Insets checkboxPadding)voidsetColor(int color)voidsetColor(java.awt.Color color)voidsetColor(java.lang.String color)voidsetDisabledColor(int disabledColor)voidsetDisabledColor(java.awt.Color disabledColor)voidsetDisabledColor(java.lang.String disabledColor)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)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)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)voidsetVariableItemHeight(boolean variableItemHeight)voidsetWrapSelectNext(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: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.
-
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.
-
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.
-
getItemAt
public int getItemAt(int y)
- Specified by:
getItemAtin interfaceListView.Skin
-
getItemBounds
public Bounds getItemBounds(int index)
- Specified by:
getItemBoundsin interfaceListView.Skin
-
getItemIndent
public int getItemIndent()
- Specified by:
getItemIndentin interfaceListView.Skin
-
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)
-
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: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).UPSelects the previous enabled list item when select mode is notListView.SelectMode.NONEDOWNSelects the next enabled list item when select mode is notListView.SelectMode.NONESHIFT+UPIncreases the selection size by including the previous enabled list item when select mode isListView.SelectMode.MULTISHIFT+DOWNIncreases the selection size by including the next enabled list item when select mode isListView.SelectMode.MULTI
- 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.
-
keyReleased
public boolean keyReleased(Component component, int keyCode, Keyboard.KeyLocation keyLocation)
SPACEToggles check mark selection when select mode isListView.SelectMode.SINGLE.- Specified by:
keyReleasedin interfaceComponentKeyListener- Overrides:
keyReleasedin 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:
trueto consume the event;falseto 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:
keyTypedin interfaceComponentKeyListener- Overrides:
keyTypedin classComponentSkin- Parameters:
component- Component that has the focus, that is receiving this key.character- The decoded character that was typed.- 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.
-
listDataChanged
public void listDataChanged(ListView listView, List<?> previousListData)
Description copied from interface:ListViewListenerCalled when a list view's list data has changed.- Specified by:
listDataChangedin 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:ListViewListenerCalled when a list view's item renderer has changed.- Specified by:
itemRendererChangedin 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:ListViewListenerCalled when a list view's item editor has changed.- Specified by:
itemEditorChangedin 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:ListViewListenerCalled when a list view's select mode has changed.- Specified by:
selectModeChangedin interfaceListViewListener- Parameters:
listView- The source of the event.previousSelectMode- The previous selection mode.
-
checkmarksEnabledChanged
public void checkmarksEnabledChanged(ListView listView)
Description copied from interface:ListViewListenerCalled when a list view's checkmarks enabled flag has changed.- Specified by:
checkmarksEnabledChangedin interfaceListViewListener- Parameters:
listView- The list view that has been changed.
-
checkmarksTriStateChanged
public void checkmarksTriStateChanged(ListView listView)
Description copied from interface:ListViewListenerCalled when a list view's tri-state checkmarks flag has been changed.- Specified by:
checkmarksTriStateChangedin interfaceListViewListener- Parameters:
listView- The list view that has been changed.
-
checkmarksMixedAsCheckedChanged
public void checkmarksMixedAsCheckedChanged(ListView listView)
Description copied from interface:ListViewListenerCalled when a list view's flag to decide if mixed checkbox state should be treated as checked has been changed.- Specified by:
checkmarksMixedAsCheckedChangedin interfaceListViewListener- Parameters:
listView- The list view that has been changed.
-
disabledItemFilterChanged
public void disabledItemFilterChanged(ListView listView, Filter<?> previousDisabledItemFilter)
Description copied from interface:ListViewListenerCalled when a list view's disabled item filter has changed.- Specified by:
disabledItemFilterChangedin 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:ListViewListenerCalled when a list view's disabled checkmark filter has changed.- Specified by:
disabledCheckmarkFilterChangedin 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:ListViewItemListenerCalled when an item has been inserted into the list view.- Specified by:
itemInsertedin 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:ListViewItemListenerCalled when items have been removed from the list view.- Specified by:
itemsRemovedin 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-1if all items were removed.
-
itemUpdated
public void itemUpdated(ListView listView, int index)
Description copied from interface:ListViewItemListenerCalled when an item in the list view has been updated.- Specified by:
itemUpdatedin 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:ListViewItemListenerCalled when the items in a list view have been cleared.- Specified by:
itemsClearedin interfaceListViewItemListener- Parameters:
listView- The source of the event.
-
itemsSorted
public void itemsSorted(ListView listView)
Description copied from interface:ListViewItemListenerCalled when the items in a list view have been sorted.- Specified by:
itemsSortedin interfaceListViewItemListener- Parameters:
listView- The source of the event.
-
itemCheckedChanged
public void itemCheckedChanged(ListView listView, int index)
Description copied from interface:ListViewItemStateListenerCalled when an item's checked state has changed.- Specified by:
itemCheckedChangedin 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:ListViewItemStateListenerCalled when a tri-state item's state has changed, that is, in or out of theButton.State.MIXEDstate.- Specified by:
itemCheckedStateChangedin 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:ListViewSelectionListenerCalled when a range has been added to a list view's selection.- Specified by:
selectedRangeAddedin 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:ListViewSelectionListenerCalled when a range has been removed from a list view's selection.- Specified by:
selectedRangeRemovedin 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:ListViewSelectionListenerCalled 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:
selectedRangesChangedin 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:ListViewSelectionListenerCalled when a list view's selected item has changed. Only called in single-select mode.- Specified by:
selectedItemChangedin interfaceListViewSelectionListener- Parameters:
listView- The source of the event.previousSelectedItem- The item that was previously selected.
-
-