inprise Packages Class Hierarchy dbswing Package
java.lang.Object +----java.awt.Component +----java.awt.Container +----javax.swing.JComponent +----javax.swing.AbstractButton +----javax.swing.JButton +----com.inprise.dbswing.JdbButton
Variables Constructors Properties Methods Event Listeners
Implements ActionListener, FocusListener, ImageObserver, ItemSelectable, MenuContainer, PropertyChangeListener, Serializable, EventListener, Accessible, SwingConstants
This component is not available in the Standard edition of JBuilder. It is included in the Professional and Enterprise editions of JBuilder.
JdbButton is a fully-interchangeable subclass of JButton. It adds the following properties:
protected boolean defaultButtonDetermines whether this button should be the default button for its container.
protected JButton focusEventSourceContains the JButton for which this JbdButton is a FocusListener.
protected int initialDelayInitial delay in milliseconds before repeated ActionEvents.
protected boolean mouseOverButtonDetermines whether the mouse is within the JdbButton.
protected boolean repeatDetermines whether repeated ActionEvents should be fired when the button is held down.
protected int repeatDelayThe delay in milliseconds between repeated ActionEvents.
protected Timer repeatTimerThe Timer used to fire repeated ActionEvents.
protected String textWithMnemonicContains the text property value with an embedded mnemonic character.
public JdbButton()Constructs a JdbButton with no specified text or icon.
public JdbButton(String text)Constructs a JdbButton with a specified text string that appears on the button face.
Parameters:
public JdbButton(String text, Icon icon)Constructs a JdbButton with both a text string and an icon that appear on the button face.
Parameters:
public JdbButton(Icon icon)Constructs a JdbButton with a specified icon that appears on the button face.
Parameters:
public void setDefaultButton(boolean defaultButton)Sets whether or not this button should be its container's default button. Note that there can only be one default button within a window. If more than one button in the same container has this property set to true, the button that was most recently set to be the default button takes precedence. Also, note that default button behavior is look-and-feel dependent.
Because default button behavior is implemented by a JRootPane object, this property is only useful when a JdbButton is placed within a Swing container with a JRootPane (for example, JFrame).
defaultButton is a bound property, and therefore fires a property change event when its value is modified.
Setting this property true has the side effect of setting the defaultCapable property to true if it is false.
See also: javax.swing.JButton.isDefaultButton, javax.swing.JRootPane.setDefaultButton
public int getInitialDelay() public void setInitialDelay(int initialDelay)Returns and sets the initial delay interval, in milliseconds, after which repeated ActionEvents are fired. The default initial delay is 400 ms. initialRepeatDelay is a bound property, and therefore fires a property change event when modified.
See also: repeat, repeatDelay
public boolean isRepeat() public void setRepeat(boolean repeat)Determines whether ActionEvents are fired repeatedly when the button is held down. If true, ActionEvents are fired repeatedly; otherwise, they are not repeated. repeat is a bound property, and thus fires a property change event when modified.
See also: repeatDelay
public int getRepeatDelay() public void setRepeatDelay(int repeatDelay)Returns and sets the interval, in milliseconds, at which repeated ActionEvents are fired. The default interval is 200 ms. repeatDelay is a bound property, and therefore fires a property change event when modified.
See also: repeat
public String getTextWithMnemonic() public void setTextWithMnemonic(String text)Returns and sets the text with an embedded mnemonic character. textWithMnemonic is a convenience property for setting the button's text, which interprets an ampersand character (&) within the text as an instruction to make the character following the ampersand the mnemonic character for the button. To put an ampersand in the text but not make the character following it a hot key, put a backslash before the ampersand. To make the ampersand the hot key, put two consecutive ampersands in the text.
This property can be used instead of the usual text property, even if a mnemonic character is not embedded in the text. It is particularly useful for applications that resource strings for internationalization, because the text and mnemonic can be specified in a single string.
Note that the first occurrence of the mnemonic character is always denoted visibly as the mnemonic key, despite the location of the ampersand within the text. Furthermore, only the first occurrence of a hot key is removed from the text.
If both the text and textWithMnemonic properties are set, the most recently set property takes precedence.
textWithMnemonic is a bound property, and therefore a property change event is fired when its value is modified.
public void addNotify()Sets this button as the default button when the button's peer is created.
Overrides: javax.swing.JComponent.addNotify()
protected void makeDefaultButton()Sets this button as the enclosing JRootPane's default button. It does nothing if this button is not enclosed within a JRootPane.
protected void processMouseEvent(MouseEvent e)
Overrides: java.awt.Component.processMouseEvent(java.awt.event.MouseEvent)
public void addActionListener(java.awt.event.ActionListener ) public void removeActionListener(java.awt.event.ActionListener )
public void addAncestorListener(javax.swing.event.AncestorListener ) public void removeAncestorListener(javax.swing.event.AncestorListener )
public void addChangeListener(javax.swing.event.ChangeListener ) public void removeChangeListener(javax.swing.event.ChangeListener )
public synchronized void addComponentListener(java.awt.event.ComponentListener ) public synchronized void removeComponentListener(java.awt.event.ComponentListener )
public synchronized void addContainerListener(java.awt.event.ContainerListener ) public synchronized void removeContainerListener(java.awt.event.ContainerListener )
public synchronized void addFocusListener(java.awt.event.FocusListener ) public synchronized void removeFocusListener(java.awt.event.FocusListener )
public synchronized void addInputMethodListener(java.awt.event.InputMethodListener ) public synchronized void removeInputMethodListener(java.awt.event.InputMethodListener )
public void addItemListener(java.awt.event.ItemListener ) public void removeItemListener(java.awt.event.ItemListener )
public synchronized void addKeyListener(java.awt.event.KeyListener ) public synchronized void removeKeyListener(java.awt.event.KeyListener )
public synchronized void addMouseListener(java.awt.event.MouseListener ) public synchronized void removeMouseListener(java.awt.event.MouseListener )
public synchronized void addMouseMotionListener(java.awt.event.MouseMotionListener ) public synchronized void removeMouseMotionListener(java.awt.event.MouseMotionListener )
public synchronized void addPropertyChangeListener(java.beans.PropertyChangeListener ) public synchronized void removePropertyChangeListener(java.beans.PropertyChangeListener )
public synchronized void addVetoableChangeListener(java.beans.VetoableChangeListener ) public synchronized void removeVetoableChangeListener(java.beans.VetoableChangeListener )