Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

oracle.ide.controls.customtab
Class AutoRepeatButtonModel

java.lang.Object
  extended by javax.swing.DefaultButtonModel
      extended by oracle.ide.controls.customtab.AutoRepeatButtonModel
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.ItemSelectable, java.io.Serializable, java.util.EventListener, javax.swing.ButtonModel

public class AutoRepeatButtonModel
extends javax.swing.DefaultButtonModel
implements java.awt.event.ActionListener

A button model that fires once when pressed and then repeats firing at a fixed delay

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.DefaultButtonModel
actionCommand, ARMED, changeEvent, ENABLED, group, listenerList, mnemonic, PRESSED, ROLLOVER, SELECTED, stateMask
 
Constructor Summary
AutoRepeatButtonModel()
          Same as AutoRepeatButtonModel(int, int) with default init and repeat delays
AutoRepeatButtonModel(int initDelay, int repeatDelay)
          The repeat mode works like for the keyboard.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 void setEnabled(boolean b)
           
 void setPressed(boolean b)
          In this model, the action is fired as soon as the button is pressed, not when depressed.
 void stopTimer()
           
 
Methods inherited from class javax.swing.DefaultButtonModel
addActionListener, addChangeListener, addItemListener, fireActionPerformed, fireItemStateChanged, fireStateChanged, getActionCommand, getActionListeners, getChangeListeners, getGroup, getItemListeners, getListeners, getMnemonic, getSelectedObjects, isArmed, isEnabled, isPressed, isRollover, isSelected, removeActionListener, removeChangeListener, removeItemListener, setActionCommand, setArmed, setGroup, setMnemonic, setRollover, setSelected
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutoRepeatButtonModel

public AutoRepeatButtonModel()
Same as AutoRepeatButtonModel(int, int) with default init and repeat delays


AutoRepeatButtonModel

public AutoRepeatButtonModel(int initDelay,
                             int repeatDelay)
The repeat mode works like for the keyboard. The action is fired as soon as you press the button, then after the initDelay another action is fired, then every repeatDelay, another action is fired again.

Parameters:
initDelay - The delay in milliseconds between the first and the second actionPressed
repeatDelay - The delay in milliseconds between every actionPressed after the second one.
Method Detail

setPressed

public void setPressed(boolean b)
In this model, the action is fired as soon as the button is pressed, not when depressed.

Specified by:
setPressed in interface javax.swing.ButtonModel
Overrides:
setPressed in class javax.swing.DefaultButtonModel
Parameters:
b -

setEnabled

public void setEnabled(boolean b)
Specified by:
setEnabled in interface javax.swing.ButtonModel
Overrides:
setEnabled in class javax.swing.DefaultButtonModel

stopTimer

public void stopTimer()

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

Copyright © 1997, 2010, Oracle. All rights reserved.