|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.AbstractButton | +--javax.swing.JButton | +--kiwi.ui.KButton | +--kiwi.ui.RepeaterButton
A trivial extension of KButton
that repeatedly fires action
events when the mouse button is held down within its bounds. The initial
and repeat delays are configurable. All other functionality is identical to
that of KButton
.
KButton
, Serialized FormInner classes inherited from class javax.swing.JButton |
JButton.AccessibleJButton |
Inner classes inherited from class javax.swing.AbstractButton |
AbstractButton.AccessibleAbstractButton,
AbstractButton.ButtonChangeListener |
Inner classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Field Summary | |
static int |
DEFAULT_INITIAL_DELAY
The default initial delay. |
Fields inherited from class javax.swing.JComponent |
accessibleContext,
listenerList,
TOOL_TIP_TEXT_KEY,
ui,
UNDEFINED_CONDITION,
WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,
WHEN_FOCUSED,
WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
RepeaterButton(Icon icon)
Construct a new RepeaterButton with the specified icon. |
|
RepeaterButton(String text)
Construct a new RepeaterButton with the specified text. |
|
RepeaterButton(String text,
Icon icon)
Construct a new RepeaterButton with the specified text and
icon. |
Method Summary | |
void |
addActionListener(ActionListener listener)
Add an ActionListener to this component's list of listeners. |
int |
getInitialDelay()
Get the initial delay. |
int |
getRepeatDelay()
Get the repeat delay. |
protected void |
processMouseEvent(MouseEvent evt)
Process mouse events. |
void |
removeActionListener(ActionListener listener)
Remove an ActionListener from this component's list of
listeners. |
void |
setInitialDelay(int msec)
Set the initial delay on this button. |
void |
setRepeatDelay(int msec)
Set the repeat delay. |
Methods inherited from class javax.swing.JButton |
getAccessibleContext,
getUIClassID,
isDefaultButton,
isDefaultCapable,
paramString,
setDefaultCapable,
updateUI |
Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
addImpl,
countComponents,
deliverEvent,
doLayout,
findComponentAt,
findComponentAt,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents,
getLayout,
insets,
invalidate,
isAncestorOf,
layout,
list,
list,
locate,
minimumSize,
paintComponents,
preferredSize,
print,
printComponents,
processContainerEvent,
processEvent,
remove,
remove,
removeAll,
removeContainerListener,
setLayout,
validate,
validateTree |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static final int DEFAULT_INITIAL_DELAY
Constructor Detail |
public RepeaterButton(Icon icon)
RepeaterButton
with the specified icon.icon
- The icon for the button.public RepeaterButton(String text)
RepeaterButton
with the specified text.text
- The text for the button.public RepeaterButton(String text, Icon icon)
RepeaterButton
with the specified text and
icon.text
- The text for the button.icon
- The icon for the button.Method Detail |
public void setInitialDelay(int msec)
msec
- The number of milliseconds to wait after the initial mouse
press to begin generating action events.public int getInitialDelay()
public void setRepeatDelay(int msec)
msec
- The number of milliseconds to wait between the firing of
successive action events.public int getRepeatDelay()
public void addActionListener(ActionListener listener)
ActionListener
to this component's list of listeners.listener
- The listener to add.public void removeActionListener(ActionListener listener)
ActionListener
from this component's list of
listeners.listener
- The listener to remove.protected void processMouseEvent(MouseEvent evt)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |