inprise Packages  Class Hierarchy  dbswing Package 

JdbButton component

java.lang.Object
   +----java.awt.Component
           +----java.awt.Container
                   +----javax.swing.JComponent
                           +----javax.swing.AbstractButton
                                   +----javax.swing.JButton
                                           +----com.inprise.dbswing.JdbButton

About the JdbButton component

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:


JdbButton variables

Variables implemented in this class

Variables implemented in java.awt.Component

Variables implemented in javax.swing.AbstractButton

Variables implemented in javax.swing.JComponent

JdbButton constructors

JdbButton properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in java.awt.Component

Properties implemented in java.awt.Container

Properties implemented in java.lang.Object

Properties implemented in javax.swing.AbstractButton

Properties implemented in javax.swing.JButton

Properties implemented in javax.swing.JComponent

JdbButton methods

Methods implemented in this class

Methods implemented in java.awt.Component

Methods implemented in java.awt.Container

Methods implemented in java.lang.Object

Methods implemented in javax.swing.AbstractButton

Methods implemented in javax.swing.JButton

Methods implemented in javax.swing.JComponent

JdbButton event listeners


JdbButton variables

defaultButton

  protected boolean defaultButton
Determines whether this button should be the default button for its container.

focusEventSource

  protected JButton focusEventSource
Contains the JButton for which this JbdButton is a FocusListener.

initialDelay

  protected int initialDelay
Initial delay in milliseconds before repeated ActionEvents.

mouseOverButton

  protected boolean mouseOverButton
Determines whether the mouse is within the JdbButton.

repeat

  protected boolean repeat
Determines whether repeated ActionEvents should be fired when the button is held down.

repeatDelay

  protected int repeatDelay
The delay in milliseconds between repeated ActionEvents.

repeatTimer

  protected Timer repeatTimer
The Timer used to fire repeated ActionEvents.

textWithMnemonic

  protected String textWithMnemonic
Contains the text property value with an embedded mnemonic character.

JdbButton constructors

JdbButton()

  public JdbButton()
Constructs a JdbButton with no specified text or icon.

JdbButton(java.lang.String)

  public JdbButton(String text)
Constructs a JdbButton with a specified text string that appears on the button face.

Parameters:

text
The text string that appears on the button.

JdbButton(java.lang.String, javax.swing.Icon)

  public JdbButton(String text, Icon icon)
Constructs a JdbButton with both a text string and an icon that appear on the button face.

Parameters:

text
The text string that appears on the button face.
icon
The icon that appears on the button face.

JdbButton(javax.swing.Icon)

  public JdbButton(Icon icon)
Constructs a JdbButton with a specified icon that appears on the button face.

Parameters:

icon
The icon that appears on the button face.

JdbButton properties

defaultButton

 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

initialDelay

 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

repeat

 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

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

textWithMnemonic

 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.


JdbButton methods

addNotify()

  public void addNotify()
Sets this button as the default button when the button's peer is created.

Overrides: javax.swing.JComponent.addNotify()

makeDefaultButton()

  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.

processMouseEvent(java.awt.event.MouseEvent)

  protected void processMouseEvent(MouseEvent e)

Overrides: java.awt.Component.processMouseEvent(java.awt.event.MouseEvent)


JdbButton event listeners

This component is a source for the following event sets. For information on the standard AWT event sets, see Standard Java events.

action

 public void addActionListener(java.awt.event.ActionListener )
 public void removeActionListener(java.awt.event.ActionListener )

ancestor

 public void addAncestorListener(javax.swing.event.AncestorListener )
 public void removeAncestorListener(javax.swing.event.AncestorListener )

change

 public void addChangeListener(javax.swing.event.ChangeListener )
 public void removeChangeListener(javax.swing.event.ChangeListener )

component

 public synchronized void addComponentListener(java.awt.event.ComponentListener )
 public synchronized void removeComponentListener(java.awt.event.ComponentListener )

container

 public synchronized void addContainerListener(java.awt.event.ContainerListener )
 public synchronized void removeContainerListener(java.awt.event.ContainerListener )

focus

 public synchronized void addFocusListener(java.awt.event.FocusListener )
 public synchronized void removeFocusListener(java.awt.event.FocusListener )

inputMethod

 public synchronized void addInputMethodListener(java.awt.event.InputMethodListener )
 public synchronized void removeInputMethodListener(java.awt.event.InputMethodListener )

item

 public void addItemListener(java.awt.event.ItemListener )
 public void removeItemListener(java.awt.event.ItemListener )

key

 public synchronized void addKeyListener(java.awt.event.KeyListener )
 public synchronized void removeKeyListener(java.awt.event.KeyListener )

mouse

 public synchronized void addMouseListener(java.awt.event.MouseListener )
 public synchronized void removeMouseListener(java.awt.event.MouseListener )

mouseMotion

 public synchronized void addMouseMotionListener(java.awt.event.MouseMotionListener )
 public synchronized void removeMouseMotionListener(java.awt.event.MouseMotionListener )

propertyChange

 public synchronized void addPropertyChangeListener(java.beans.PropertyChangeListener )
 public synchronized void removePropertyChangeListener(java.beans.PropertyChangeListener )

vetoableChange

 public synchronized void addVetoableChangeListener(java.beans.VetoableChangeListener )
 public synchronized void removeVetoableChangeListener(java.beans.VetoableChangeListener )