|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpivot.wtk.skin.ComponentSkin
pivot.wtk.skin.terra.TerraListViewSkin
public class TerraListViewSkin
List view skin.
NOTE This skin assumes a fixed renderer height.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface pivot.wtk.ListViewListener |
---|
ListViewListener.Adapter |
Nested classes/interfaces inherited from interface pivot.wtk.ListViewItemListener |
---|
ListViewItemListener.Adapter |
Nested classes/interfaces inherited from interface pivot.wtk.ListViewItemStateListener |
---|
ListViewItemStateListener.Adapter |
Nested classes/interfaces inherited from interface pivot.wtk.ListViewSelectionListener |
---|
ListViewSelectionListener.Adapter |
Nested classes/interfaces inherited from interface pivot.wtk.ComponentListener |
---|
ComponentListener.Adapter |
Nested classes/interfaces inherited from interface pivot.wtk.ComponentStateListener |
---|
ComponentStateListener.Adapter |
Nested classes/interfaces inherited from interface pivot.wtk.ComponentMouseListener |
---|
ComponentMouseListener.Adapter |
Nested classes/interfaces inherited from interface pivot.wtk.ComponentMouseButtonListener |
---|
ComponentMouseButtonListener.Adapter |
Nested classes/interfaces inherited from interface pivot.wtk.ComponentKeyListener |
---|
ComponentKeyListener.Adapter |
Field Summary |
---|
Fields inherited from class pivot.wtk.skin.ComponentSkin |
---|
SHOW_TOOLTIP_TIMEOUT |
Constructor Summary | |
---|---|
TerraListViewSkin()
|
Method Summary | |
---|---|
void |
checkmarksEnabledChanged(ListView listView)
Called when a list view's checkmarks enabled flag has changed. |
void |
enabledChanged(Component component)
Called when a component's enabled state has changed. |
void |
focusedChanged(Component component,
boolean temporary)
Called when a component's focused state has changed. |
Color |
getBackgroundColor()
|
Color |
getColor()
|
Color |
getDisabledColor()
|
Font |
getFont()
|
Color |
getHighlightBackgroundColor()
|
Color |
getHighlightColor()
|
Color |
getInactiveSelectionBackgroundColor()
|
Color |
getInactiveSelectionColor()
|
int |
getItemAt(int y)
|
Bounds |
getItemBounds(int index)
|
int |
getItemHeight()
|
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()
|
void |
install(Component component)
Associates a skin with a component. |
boolean |
isFocusable()
By default, components are focusable. |
void |
itemCheckedChanged(ListView listView,
int index)
Called when an item's checked state has changed. |
void |
itemDisabledChanged(ListView listView,
int index)
Called when an item's disabled 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)
Called when a key has been pressed. |
boolean |
keyReleased(Component component,
int keyCode,
Keyboard.KeyLocation keyLocation)
Called when a key has been released. |
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 |
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 |
selectedItemKeyChanged(ListView listView,
String previousSelectedItemKey)
Called when a list view's selected item key has changed. |
void |
selectedItemsKeyChanged(ListView listView,
String previousSelectedItemsKey)
Called when a list view's selected items key 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 been reset. |
void |
selectModeChanged(ListView listView,
ListView.SelectMode previousSelectMode)
Called when a list view's select mode has changed. |
void |
setBackgroundColor(Color backgroundColor)
|
void |
setBackgroundColor(String backgroundColor)
|
void |
setColor(Color color)
|
void |
setColor(String color)
|
void |
setDisabledColor(Color disabledColor)
|
void |
setDisabledColor(String disabledColor)
|
void |
setFont(Font font)
|
void |
setFont(String font)
|
void |
setHighlightBackgroundColor(Color highlightBackgroundColor)
|
void |
setHighlightBackgroundColor(String highlightBackgroundColor)
|
void |
setHighlightColor(Color highlightColor)
|
void |
setHighlightColor(String highlightColor)
|
void |
setInactiveSelectionBackgroundColor(Color inactiveSelectionBackgroundColor)
|
void |
setInactiveSelectionBackgroundColor(String inactiveSelectionBackgroundColor)
|
void |
setInactiveSelectionColor(Color inactiveSelectionColor)
|
void |
setInactiveSelectionColor(String inactiveSelectionColor)
|
void |
setSelectionBackgroundColor(Color selectionBackgroundColor)
|
void |
setSelectionBackgroundColor(String selectionBackgroundColor)
|
void |
setSelectionColor(Color selectionColor)
|
void |
setSelectionColor(String selectionColor)
|
void |
setShowHighlight(boolean showHighlight)
|
void |
uninstall()
Dissociates a skin from a component. |
Methods inherited from class pivot.wtk.skin.ComponentSkin |
---|
cursorChanged, displayableChanged, getComponent, getHeight, getPreferredSize, getWidth, invalidateComponent, isOpaque, keyTyped, locationChanged, mouseOver, mouseUp, parentChanged, preferredSizeChanged, repaintComponent, repaintComponent, repaintComponent, repaintComponent, setSize, sizeChanged, styleUpdated, tooltipTextChanged, visibleChanged |
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 Skin
install
in class ComponentSkin
component
- The component to which the skin is being attached.public void uninstall()
Skin
uninstall
in interface Skin
uninstall
in class ComponentSkin
public int getPreferredWidth(int height)
ConstrainedVisual
getPreferredWidth
in interface ConstrainedVisual
height
- The height by which to constrain the preferred width, or -1
for no constraint.public int getPreferredHeight(int width)
ConstrainedVisual
getPreferredHeight
in interface ConstrainedVisual
width
- The width by which to constrain the preferred height, or -1
for no constraint.public void layout()
Skin
layout
in interface Skin
public void paint(Graphics2D graphics)
Visual
paint
in interface Visual
graphics
- The graphics context in which to paint the visual.public int getItemAt(int y)
getItemAt
in interface ListView.Skin
public Bounds getItemBounds(int index)
getItemBounds
in interface ListView.Skin
public int getItemIndent()
getItemIndent
in interface ListView.Skin
public int getItemHeight()
public boolean isFocusable()
ComponentSkin
isFocusable
in interface Skin
isFocusable
in class ComponentSkin
public Font getFont()
public void setFont(Font font)
public final void setFont(String font)
public Color getColor()
public void setColor(Color color)
public final void setColor(String color)
public Color getDisabledColor()
public void setDisabledColor(Color disabledColor)
public final void setDisabledColor(String disabledColor)
public Color getBackgroundColor()
public void setBackgroundColor(Color backgroundColor)
public final void setBackgroundColor(String backgroundColor)
public Color getSelectionColor()
public void setSelectionColor(Color selectionColor)
public final void setSelectionColor(String selectionColor)
public Color getSelectionBackgroundColor()
public void setSelectionBackgroundColor(Color selectionBackgroundColor)
public final void setSelectionBackgroundColor(String selectionBackgroundColor)
public Color getInactiveSelectionColor()
public void setInactiveSelectionColor(Color inactiveSelectionColor)
public final void setInactiveSelectionColor(String inactiveSelectionColor)
public Color getInactiveSelectionBackgroundColor()
public void setInactiveSelectionBackgroundColor(Color inactiveSelectionBackgroundColor)
public final void setInactiveSelectionBackgroundColor(String inactiveSelectionBackgroundColor)
public Color getHighlightColor()
public void setHighlightColor(Color highlightColor)
public final void setHighlightColor(String highlightColor)
public Color getHighlightBackgroundColor()
public void setHighlightBackgroundColor(Color highlightBackgroundColor)
public final void setHighlightBackgroundColor(String highlightBackgroundColor)
public boolean getShowHighlight()
public void setShowHighlight(boolean showHighlight)
public boolean mouseMove(Component component, int x, int y)
ComponentMouseListener
mouseMove
in interface ComponentMouseListener
mouseMove
in class ComponentSkin
public void mouseOut(Component component)
ComponentMouseListener
mouseOut
in interface ComponentMouseListener
mouseOut
in class ComponentSkin
public boolean mouseDown(Component component, Mouse.Button button, int x, int y)
ComponentMouseButtonListener
mouseDown
in interface ComponentMouseButtonListener
mouseDown
in class ComponentSkin
public boolean mouseClick(Component component, Mouse.Button button, int x, int y, int count)
ComponentMouseButtonListener
mouseClick
in interface ComponentMouseButtonListener
mouseClick
in class ComponentSkin
public boolean mouseWheel(Component component, Mouse.ScrollType scrollType, int scrollAmount, int wheelRotation, int x, int y)
ComponentMouseWheelListener
mouseWheel
in interface ComponentMouseWheelListener
mouseWheel
in class ComponentSkin
public boolean keyPressed(Component component, int keyCode, Keyboard.KeyLocation keyLocation)
ComponentKeyListener
keyPressed
in interface ComponentKeyListener
keyPressed
in class ComponentSkin
public boolean keyReleased(Component component, int keyCode, Keyboard.KeyLocation keyLocation)
ComponentKeyListener
keyReleased
in interface ComponentKeyListener
keyReleased
in class ComponentSkin
public void enabledChanged(Component component)
ComponentStateListener
enabledChanged
in interface ComponentStateListener
enabledChanged
in class ComponentSkin
public void focusedChanged(Component component, boolean temporary)
ComponentStateListener
focusedChanged
in interface ComponentStateListener
focusedChanged
in class ComponentSkin
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 ListViewListener
public void checkmarksEnabledChanged(ListView listView)
ListViewListener
checkmarksEnabledChanged
in interface ListViewListener
public void selectedItemKeyChanged(ListView listView, String previousSelectedItemKey)
ListViewListener
selectedItemKeyChanged
in interface ListViewListener
public void selectedItemsKeyChanged(ListView listView, String previousSelectedItemsKey)
ListViewListener
selectedItemsKeyChanged
in interface ListViewListener
public void itemInserted(ListView listView, int index)
ListViewItemListener
itemInserted
in interface ListViewItemListener
listView
- 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 ListViewItemListener
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.public void itemUpdated(ListView listView, int index)
ListViewItemListener
itemUpdated
in interface ListViewItemListener
listView
- The source of the event.index
- The first index affected by the event.public void itemsCleared(ListView listView)
ListViewItemListener
itemsCleared
in interface ListViewItemListener
public void itemsSorted(ListView listView)
ListViewItemListener
itemsSorted
in interface ListViewItemListener
listView
- The source of the event.public void itemDisabledChanged(ListView listView, int index)
ListViewItemStateListener
itemDisabledChanged
in interface ListViewItemStateListener
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 ListViewSelectionListener
public void selectedRangeRemoved(ListView listView, int rangeStart, int rangeEnd)
ListViewSelectionListener
selectedRangeRemoved
in interface ListViewSelectionListener
public void selectedRangesChanged(ListView listView, Sequence<Span> previousSelectedRanges)
ListViewSelectionListener
selectedRangesChanged
in interface ListViewSelectionListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |