|
||||||||||
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.ButtonSkin
org.apache.pivot.wtk.skin.CalendarButtonSkin
public abstract class CalendarButtonSkin
Abstract base class for calendar button skins.
TODO Rather than blindly closing when a mouse down is received, we could instead cache the selection state in the popup's container mouse down event and compare it to the current state in component mouse down. If different, we close the popup. This would also tie this base class less tightly to its concrete subclasses.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.CalendarButtonListener |
---|
CalendarButtonListener.Adapter |
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ButtonListener |
---|
ButtonListener.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 |
Field Summary | |
---|---|
protected Calendar |
calendar
|
protected Window |
calendarPopup
|
protected boolean |
pressed
|
Fields inherited from class org.apache.pivot.wtk.skin.ButtonSkin |
---|
highlighted |
Fields inherited from class org.apache.pivot.wtk.skin.ComponentSkin |
---|
SHOW_TOOLTIP_TIMEOUT |
Constructor Summary | |
---|---|
CalendarButtonSkin()
|
Method Summary | |
---|---|
void |
disabledDateFilterChanged(CalendarButton calendarButton,
Filter<CalendarDate> previousDisabledDateFilter)
Called when a calendar button's disabled date 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. |
void |
install(Component component)
Associates a skin with a component. |
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 |
localeChanged(CalendarButton calendarButton,
Locale previousLocale)
Called when a calendar button's locale 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. |
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. |
void |
selectedDateChanged(CalendarButton calendarButton,
CalendarDate previousSelectedDate)
Called when a calendar button's selected date has changed. |
void |
selectedDateKeyChanged(CalendarButton calendarButton,
String previousSelectedDateKey)
Called when a calendar button's selected date key has changed. |
Methods inherited from class org.apache.pivot.wtk.skin.ButtonSkin |
---|
actionChanged, buttonDataChanged, buttonGroupChanged, buttonPressed, dataRendererChanged, layout, mouseOver, selectedKeyChanged, stateChanged, stateKeyChanged, toggleButtonChanged, triStateChanged |
Methods inherited from class org.apache.pivot.wtk.skin.ComponentSkin |
---|
cursorChanged, decodeFont, dragSourceChanged, dropTargetChanged, getBaseline, getBaseline, getComponent, getHeight, getPreferredSize, getWidth, invalidateComponent, isFocusable, isOpaque, keyTyped, locationChanged, menuHandlerChanged, mouseMove, mouseWheel, parentChanged, preferredHeightLimitsChanged, preferredSizeChanged, preferredWidthLimitsChanged, repaintComponent, 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 |
Methods inherited from interface org.apache.pivot.wtk.ConstrainedVisual |
---|
getPreferredHeight, getPreferredWidth |
Methods inherited from interface org.apache.pivot.wtk.Visual |
---|
paint |
Field Detail |
---|
protected Calendar calendar
protected Window calendarPopup
protected boolean pressed
Constructor Detail |
---|
public CalendarButtonSkin()
Method Detail |
---|
public void install(Component component)
Skin
install
in interface Skin
install
in class ButtonSkin
component
- The component to which the skin is being attached.public void enabledChanged(Component component)
ComponentStateListener
enabledChanged
in interface ComponentStateListener
enabledChanged
in class ButtonSkin
public void focusedChanged(Component component, Component obverseComponent)
ComponentStateListener
focusedChanged
in interface ComponentStateListener
focusedChanged
in class ButtonSkin
public void mouseOut(Component component)
ComponentMouseListener
mouseOut
in interface ComponentMouseListener
mouseOut
in class ButtonSkin
public boolean mouseDown(Component component, Mouse.Button button, int x, int y)
ComponentMouseButtonListener
mouseDown
in interface ComponentMouseButtonListener
mouseDown
in class ComponentSkin
public boolean mouseUp(Component component, Mouse.Button button, int x, int y)
ComponentMouseButtonListener
mouseUp
in interface ComponentMouseButtonListener
mouseUp
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 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 localeChanged(CalendarButton calendarButton, Locale previousLocale)
CalendarButtonListener
localeChanged
in interface CalendarButtonListener
public void disabledDateFilterChanged(CalendarButton calendarButton, Filter<CalendarDate> previousDisabledDateFilter)
CalendarButtonListener
disabledDateFilterChanged
in interface CalendarButtonListener
public void selectedDateKeyChanged(CalendarButton calendarButton, String previousSelectedDateKey)
CalendarButtonListener
selectedDateKeyChanged
in interface CalendarButtonListener
public void selectedDateChanged(CalendarButton calendarButton, CalendarDate previousSelectedDate)
CalendarButtonSelectionListener
selectedDateChanged
in interface CalendarButtonSelectionListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |