|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.pivot.wtk.skin.ComponentSkin
org.apache.pivot.wtk.skin.terra.TerraListViewSkin
public class TerraListViewSkin
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.NONEDOWN 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.MULTISHIFT + 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 |
|---|
public TerraListViewSkin()
| Method Detail |
|---|
public void install(Component component)
Skin
install in interface Skininstall in class ComponentSkincomponent - The component to which the skin is being attached.public int getPreferredWidth(int height)
ConstrainedVisual
getPreferredWidth in interface ConstrainedVisualheight - The height by which to constrain the preferred width, or -1
for no constraint.public int getPreferredHeight(int width)
ConstrainedVisual
getPreferredHeight in interface ConstrainedVisualwidth - The width by which to constrain the preferred height, or -1
for no constraint.
public int getBaseline(int width,
int height)
ConstrainedVisual
getBaseline in interface ConstrainedVisualgetBaseline in class ComponentSkinpublic void layout()
Skin
layout in interface Skinpublic void paint(Graphics2D graphics)
Visual
paint in interface Visualgraphics - The graphics context in which to paint the visual.public int getItemAt(int y)
getItemAt in interface ListView.Skinpublic Bounds getItemBounds(int index)
getItemBounds in interface ListView.Skinpublic int getItemIndent()
getItemIndent in interface ListView.Skinpublic boolean isFocusable()
ComponentSkin
isFocusable in interface SkinisFocusable in class ComponentSkinpublic boolean isOpaque()
ComponentSkin
isOpaque in interface SkinisOpaque in class ComponentSkinpublic Font getFont()
public void setFont(Font font)
public final void setFont(String font)
public final void setFont(Dictionary<String,?> font)
public Color getColor()
public void setColor(Color color)
public final void setColor(String color)
public final void setColor(int color)
public Color getDisabledColor()
public void setDisabledColor(Color disabledColor)
public final void setDisabledColor(String disabledColor)
public final void setDisabledColor(int disabledColor)
public Color getBackgroundColor()
public void setBackgroundColor(Color backgroundColor)
public final void setBackgroundColor(String backgroundColor)
public final void setBackgroundColor(int backgroundColor)
public Color getSelectionColor()
public void setSelectionColor(Color selectionColor)
public final void setSelectionColor(String selectionColor)
public final void setSelectionColor(int selectionColor)
public Color getSelectionBackgroundColor()
public void setSelectionBackgroundColor(Color selectionBackgroundColor)
public final void setSelectionBackgroundColor(String selectionBackgroundColor)
public final void setSelectionBackgroundColor(int selectionBackgroundColor)
public Color getInactiveSelectionColor()
public void setInactiveSelectionColor(Color inactiveSelectionColor)
public final void setInactiveSelectionColor(String inactiveSelectionColor)
public final void setInactiveSelectionColor(int inactiveSelectionColor)
public Color getInactiveSelectionBackgroundColor()
public void setInactiveSelectionBackgroundColor(Color inactiveSelectionBackgroundColor)
public final void setInactiveSelectionBackgroundColor(String inactiveSelectionBackgroundColor)
public final void setInactiveSelectionBackgroundColor(int inactiveSelectionBackgroundColor)
public Color getHighlightBackgroundColor()
public void setHighlightBackgroundColor(Color highlightBackgroundColor)
public final void setHighlightBackgroundColor(String highlightBackgroundColor)
public final void setHighlightBackgroundColor(int highlightBackgroundColor)
public Color getAlternateItemBackgroundColor()
public void setAlternateItemBackgroundColor(Color alternateItemBackgroundColor)
public final void setAlternateItemBackgroundColor(String alternateItemBackgroundColor)
public final void setAlternateItemColor(int alternateItemBackgroundColor)
public boolean getShowHighlight()
public void setShowHighlight(boolean showHighlight)
public boolean getWrapSelectNext()
public void setWrapSelectNext(boolean wrapSelectNext)
public Insets getCheckboxPadding()
public void setCheckboxPadding(Insets checkboxPadding)
public final void setCheckboxPadding(Dictionary<String,?> checkboxPadding)
public final void setCheckboxPadding(int checkboxPadding)
public final void setCheckboxPadding(Number padding)
public final void setCheckboxPadding(String checkboxPadding)
public boolean isVariableItemHeight()
public void setVariableItemHeight(boolean variableItemHeight)
public boolean mouseMove(Component component,
int x,
int y)
ComponentMouseListener
mouseMove in interface ComponentMouseListenermouseMove in class ComponentSkinpublic void mouseOut(Component component)
ComponentMouseListener
mouseOut in interface ComponentMouseListenermouseOut in class ComponentSkin
public boolean mouseDown(Component component,
Mouse.Button button,
int x,
int y)
ComponentMouseButtonListener
mouseDown in interface ComponentMouseButtonListenermouseDown in class ComponentSkin
public boolean mouseUp(Component component,
Mouse.Button button,
int x,
int y)
ComponentMouseButtonListener
mouseUp in interface ComponentMouseButtonListenermouseUp in class ComponentSkin
public boolean mouseClick(Component component,
Mouse.Button button,
int x,
int y,
int count)
ComponentMouseButtonListener
mouseClick in interface ComponentMouseButtonListenermouseClick in class ComponentSkin
public boolean mouseWheel(Component component,
Mouse.ScrollType scrollType,
int scrollAmount,
int wheelRotation,
int x,
int y)
ComponentMouseWheelListener
mouseWheel in interface ComponentMouseWheelListenermouseWheel in class ComponentSkin
public boolean keyPressed(Component component,
int keyCode,
Keyboard.KeyLocation keyLocation)
UP Selects the previous enabled list item when select
mode is not ListView.SelectMode.NONEDOWN 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
keyPressed in interface ComponentKeyListenerkeyPressed in class ComponentSkin
public boolean keyReleased(Component component,
int keyCode,
Keyboard.KeyLocation keyLocation)
SPACE Toggles check mark selection when select
mode is ListView.SelectMode.SINGLE
keyReleased in interface ComponentKeyListenerkeyReleased in class ComponentSkin
public boolean keyTyped(Component component,
char character)
keyTyped in interface ComponentKeyListenerkeyTyped in class ComponentSkinpublic void enabledChanged(Component component)
ComponentStateListener 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.
enabledChanged in interface ComponentStateListenerenabledChanged in class ComponentSkincomponent - The component whose enabled state is changing.
public void focusedChanged(Component component,
Component obverseComponent)
ComponentStateListener 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.
focusedChanged in interface ComponentStateListenerfocusedChanged in class ComponentSkincomponent - 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.
public void listDataChanged(ListView listView,
List<?> previousListData)
ListViewListener
listDataChanged in interface ListViewListener
public void itemRendererChanged(ListView listView,
ListView.ItemRenderer previousItemRenderer)
ListViewListener
itemRendererChanged in interface ListViewListener
public void itemEditorChanged(ListView listView,
ListView.ItemEditor previousItemEditor)
ListViewListener
itemEditorChanged in interface ListViewListener
public void selectModeChanged(ListView listView,
ListView.SelectMode previousSelectMode)
ListViewListener
selectModeChanged in interface ListViewListenerpublic void checkmarksEnabledChanged(ListView listView)
ListViewListener
checkmarksEnabledChanged in interface ListViewListener
public void disabledItemFilterChanged(ListView listView,
Filter<?> previousDisabledItemFilter)
ListViewListener
disabledItemFilterChanged in interface ListViewListener
public void disabledCheckmarkFilterChanged(ListView listView,
Filter<?> previousDisabledCheckmarkFilter)
ListViewListener
disabledCheckmarkFilterChanged in interface ListViewListener
public void itemInserted(ListView listView,
int index)
ListViewItemListener
itemInserted in interface ListViewItemListenerlistView - The source of the event.index - The index of the item that was inserted.
public void itemsRemoved(ListView listView,
int index,
int count)
ListViewItemListener
itemsRemoved in interface ListViewItemListenerlistView - 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.
public void itemUpdated(ListView listView,
int index)
ListViewItemListener
itemUpdated in interface ListViewItemListenerlistView - The source of the event.index - The first index affected by the event.public void itemsCleared(ListView listView)
ListViewItemListener
itemsCleared in interface ListViewItemListenerpublic void itemsSorted(ListView listView)
ListViewItemListener
itemsSorted in interface ListViewItemListenerlistView - The source of the event.
public void itemCheckedChanged(ListView listView,
int index)
ListViewItemStateListener
itemCheckedChanged in interface ListViewItemStateListener
public void selectedRangeAdded(ListView listView,
int rangeStart,
int rangeEnd)
ListViewSelectionListener
selectedRangeAdded in interface ListViewSelectionListenerlistView - 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.
public void selectedRangeRemoved(ListView listView,
int rangeStart,
int rangeEnd)
ListViewSelectionListener
selectedRangeRemoved in interface ListViewSelectionListenerlistView - 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.
public void selectedRangesChanged(ListView listView,
Sequence<Span> previousSelectedRanges)
ListViewSelectionListener
selectedRangesChanged in interface ListViewSelectionListenerlistView - 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.
public void selectedItemChanged(ListView listView,
Object previousSelectedItem)
ListViewSelectionListener
selectedItemChanged in interface ListViewSelectionListenerlistView - The source of the event.previousSelectedItem - The item that was previously selected.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||