Liking cljdoc? Tell your friends :D

javax.swing.DefaultButtonModel

The default implementation of a Button component's data model.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.

The default implementation of a Button component's data model.

Warning:
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Swing. As of 1.4, support for long term storage
of all JavaBeans™
has been added to the java.beans package.
Please see XMLEncoder.
raw docstring

*-armedclj

Static Constant.

Identifies the "armed" bit in the bitmask, which indicates partial commitment towards choosing/triggering the button.

type: int

Static Constant.

Identifies the "armed" bit in the bitmask, which
 indicates partial commitment towards choosing/triggering
 the button.

type: int
raw docstring

*-enabledclj

Static Constant.

Identifies the "enabled" bit in the bitmask, which indicates that the button can be selected by an input device (such as a mouse pointer).

type: int

Static Constant.

Identifies the "enabled" bit in the bitmask, which
 indicates that the button can be selected by
 an input device (such as a mouse pointer).

type: int
raw docstring

*-pressedclj

Static Constant.

Identifies the "pressed" bit in the bitmask, which indicates that the button is pressed.

type: int

Static Constant.

Identifies the "pressed" bit in the bitmask, which
 indicates that the button is pressed.

type: int
raw docstring

*-rolloverclj

Static Constant.

Identifies the "rollover" bit in the bitmask, which indicates that the mouse is over the button.

type: int

Static Constant.

Identifies the "rollover" bit in the bitmask, which
 indicates that the mouse is over the button.

type: int
raw docstring

*-selectedclj

Static Constant.

Identifies the "selected" bit in the bitmask, which indicates that the button has been selected. Only needed for certain types of buttons - such as radio button or check box.

type: int

Static Constant.

Identifies the "selected" bit in the bitmask, which
 indicates that the button has been selected. Only needed for
 certain types of buttons - such as radio button or check box.

type: int
raw docstring

->default-button-modelclj

(->default-button-model)

Constructor.

Constructs a DefaultButtonModel.

Constructor.

Constructs a DefaultButtonModel.
raw docstring

add-action-listenerclj

(add-action-listener this l)

Adds an ActionListener to the model.

l - the listener to add - java.awt.event.ActionListener

Adds an ActionListener to the model.

l - the listener to add - `java.awt.event.ActionListener`
raw docstring

add-change-listenerclj

(add-change-listener this l)

Adds a ChangeListener to the model.

l - the listener to add - javax.swing.event.ChangeListener

Adds a ChangeListener to the model.

l - the listener to add - `javax.swing.event.ChangeListener`
raw docstring

add-item-listenerclj

(add-item-listener this l)

Adds an ItemListener to the model.

l - the listener to add - java.awt.event.ItemListener

Adds an ItemListener to the model.

l - the listener to add - `java.awt.event.ItemListener`
raw docstring

armed?clj

(armed? this)

Indicates partial commitment towards triggering the button.

returns: true if the button is armed, and ready to be triggered - boolean

Indicates partial commitment towards triggering the
 button.

returns: true if the button is armed,
         and ready to be triggered - `boolean`
raw docstring

enabled?clj

(enabled? this)

Indicates if the button can be selected or triggered by an input device, such as a mouse pointer.

returns: true if the button is enabled - boolean

Indicates if the button can be selected or triggered by
 an input device, such as a mouse pointer.

returns: true if the button is enabled - `boolean`
raw docstring

get-action-commandclj

(get-action-command this)

Returns the action command string for the button.

returns: the String that identifies the generated event - java.lang.String

Returns the action command string for the button.

returns: the String that identifies the generated event - `java.lang.String`
raw docstring

get-action-listenersclj

(get-action-listeners this)

Returns an array of all the action listeners registered on this DefaultButtonModel.

returns: all of this model's ActionListeners or an empty array if no action listeners are currently registered - java.awt.event.ActionListener[]

Returns an array of all the action listeners
 registered on this DefaultButtonModel.

returns: all of this model's ActionListeners
         or an empty
         array if no action listeners are currently registered - `java.awt.event.ActionListener[]`
raw docstring

get-change-listenersclj

(get-change-listeners this)

Returns an array of all the change listeners registered on this DefaultButtonModel.

returns: all of this model's ChangeListeners or an empty array if no change listeners are currently registered - javax.swing.event.ChangeListener[]

Returns an array of all the change listeners
 registered on this DefaultButtonModel.

returns: all of this model's ChangeListeners
         or an empty
         array if no change listeners are currently registered - `javax.swing.event.ChangeListener[]`
raw docstring

get-groupclj

(get-group this)

Returns the group that the button belongs to. Normally used with radio buttons, which are mutually exclusive within their group.

returns: the ButtonGroup that the button belongs to - javax.swing.ButtonGroup

Returns the group that the button belongs to.
 Normally used with radio buttons, which are mutually
 exclusive within their group.

returns: the ButtonGroup that the button belongs to - `javax.swing.ButtonGroup`
raw docstring

get-item-listenersclj

(get-item-listeners this)

Returns an array of all the item listeners registered on this DefaultButtonModel.

returns: all of this model's ItemListeners or an empty array if no item listeners are currently registered - java.awt.event.ItemListener[]

Returns an array of all the item listeners
 registered on this DefaultButtonModel.

returns: all of this model's ItemListeners
         or an empty
         array if no item listeners are currently registered - `java.awt.event.ItemListener[]`
raw docstring

get-listenersclj

(get-listeners this listener-type)

Returns an array of all the objects currently registered as FooListeners upon this model. FooListeners are registered using the addFooListener method.

You can specify the listenerType argument with a class literal, such as FooListener.class. For example, you can query a DefaultButtonModel instance m for its action listeners with the following code:

ActionListener[] als = (ActionListener[])(m.getListeners(ActionListener.class));

If no such listeners exist, this method returns an empty array.

listener-type - the type of listeners requested; this parameter should specify an interface that descends from java.util.EventListener - java.lang.Class

returns: an array of all objects registered as FooListeners on this model, or an empty array if no such listeners have been added - <T extends java.util.EventListener> T[]

throws: java.lang.ClassCastException - if listenerType doesn't specify a class or interface that implements java.util.EventListener

Returns an array of all the objects currently registered as
 FooListeners
 upon this model.
 FooListeners
 are registered using the addFooListener method.

 You can specify the listenerType argument
 with a class literal, such as FooListener.class.
 For example, you can query a DefaultButtonModel
 instance m
 for its action listeners
 with the following code:



ActionListener[] als = (ActionListener[])(m.getListeners(ActionListener.class));

 If no such listeners exist,
 this method returns an empty array.

listener-type - the type of listeners requested; this parameter should specify an interface that descends from java.util.EventListener - `java.lang.Class`

returns: an array of all objects registered as
          FooListeners
          on this model,
          or an empty array if no such
          listeners have been added - `<T extends java.util.EventListener> T[]`

throws: java.lang.ClassCastException - if listenerType doesn't specify a class or interface that implements java.util.EventListener
raw docstring

get-mnemonicclj

(get-mnemonic this)

Gets the keyboard mnemonic for the button.

returns: an int specifying the accelerator key - int

Gets the keyboard mnemonic for the button.

returns: an int specifying the accelerator key - `int`
raw docstring

get-selected-objectsclj

(get-selected-objects this)

Overridden to return null.

returns: java.lang.Object[]

Overridden to return null.

returns: `java.lang.Object[]`
raw docstring

pressed?clj

(pressed? this)

Indicates if the button is pressed.

returns: true if the button is pressed - boolean

Indicates if the button is pressed.

returns: true if the button is pressed - `boolean`
raw docstring

remove-action-listenerclj

(remove-action-listener this l)

Removes an ActionListener from the model.

l - the listener to remove - java.awt.event.ActionListener

Removes an ActionListener from the model.

l - the listener to remove - `java.awt.event.ActionListener`
raw docstring

remove-change-listenerclj

(remove-change-listener this l)

Removes a ChangeListener from the model.

l - the listener to remove - javax.swing.event.ChangeListener

Removes a ChangeListener from the model.

l - the listener to remove - `javax.swing.event.ChangeListener`
raw docstring

remove-item-listenerclj

(remove-item-listener this l)

Removes an ItemListener from the model.

l - the listener to remove - java.awt.event.ItemListener

Removes an ItemListener from the model.

l - the listener to remove - `java.awt.event.ItemListener`
raw docstring

rollover?clj

(rollover? this)

Indicates that the mouse is over the button.

returns: true if the mouse is over the button - boolean

Indicates that the mouse is over the button.

returns: true if the mouse is over the button - `boolean`
raw docstring

selected?clj

(selected? this)

Indicates if the button has been selected. Only needed for certain types of buttons - such as radio buttons and check boxes.

returns: true if the button is selected - boolean

Indicates if the button has been selected. Only needed for
 certain types of buttons - such as radio buttons and check boxes.

returns: true if the button is selected - `boolean`
raw docstring

set-action-commandclj

(set-action-command this action-command)

Sets the action command string that gets sent as part of the ActionEvent when the button is triggered.

action-command - the String that identifies the generated event - java.lang.String

Sets the action command string that gets sent as part of the
 ActionEvent when the button is triggered.

action-command - the String that identifies the generated event - `java.lang.String`
raw docstring

set-armedclj

(set-armed this b)

Marks the button as armed or unarmed.

b - whether or not the button should be armed - boolean

Marks the button as armed or unarmed.

b - whether or not the button should be armed - `boolean`
raw docstring

set-enabledclj

(set-enabled this b)

Enables or disables the button.

b - whether or not the button should be enabled - boolean

Enables or disables the button.

b - whether or not the button should be enabled - `boolean`
raw docstring

set-groupclj

(set-group this group)

Identifies the group the button belongs to -- needed for radio buttons, which are mutually exclusive within their group.

group - the ButtonGroup the button belongs to - javax.swing.ButtonGroup

Identifies the group the button belongs to --
 needed for radio buttons, which are mutually
 exclusive within their group.

group - the ButtonGroup the button belongs to - `javax.swing.ButtonGroup`
raw docstring

set-mnemonicclj

(set-mnemonic this key)

Sets the keyboard mnemonic (shortcut key or accelerator key) for the button.

key - an int specifying the accelerator key - int

Sets the keyboard mnemonic (shortcut key or
 accelerator key) for the button.

key - an int specifying the accelerator key - `int`
raw docstring

set-pressedclj

(set-pressed this b)

Sets the button to pressed or unpressed.

b - whether or not the button should be pressed - boolean

Sets the button to pressed or unpressed.

b - whether or not the button should be pressed - `boolean`
raw docstring

set-rolloverclj

(set-rollover this b)

Sets or clears the button's rollover state

b - whether or not the button is in the rollover state - boolean

Sets or clears the button's rollover state

b - whether or not the button is in the rollover state - `boolean`
raw docstring

set-selectedclj

(set-selected this b)

Selects or deselects the button.

b - true selects the button, false deselects the button - boolean

Selects or deselects the button.

b - true selects the button, false deselects the button - `boolean`
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close