Package com.jidesoft.dialog
Class ButtonEvent
java.lang.Object
java.util.EventObject
com.jidesoft.dialog.ButtonEvent
- All Implemented Interfaces:
Serializable
An EventObject used to change the state of any button.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The first number in the range of IDs used forButtonEvent
.static final int
The last number in the range of IDs used forDockableFrame
events.static final int
This event is fired when you want to set focus to the button.static final int
This event is fired when you want to change the mnemonic of the button.static final int
This event is fired when you want to change the text of the button.static final int
This event is fired when you want to change the tooltip of the button.static final int
This event is fired when you want to clear the default button from a root pane.static final int
This event is fired when you want to disable the button.static final int
This event is fired when you want to enable the button.static final int
This event is fired when you want to hide the button.static final int
This event is fired when you want to set the button to the default button in a root pane.static final int
This event is fired when you want to show the button.Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorsConstructorDescriptionButtonEvent
(Object source, int id, String buttonName) Creates a ButtonEvent with source, id and the button name.ButtonEvent
(Object source, int id, String buttonName, String userObject) Creates a ButtonEvent with source, id, the button name and a user object. -
Method Summary
Modifier and TypeMethodDescriptionGets the button name of this event object.int
getID()
Returns the event id.Gets the user object of this event object.Returns a parameter string identifying this event.void
setButtonName
(String buttonName) Sets the button name.void
setID
(int id) Sets the event id.void
setUserObject
(String userObject) Sets the user object.Methods inherited from class java.util.EventObject
getSource, toString
-
Field Details
-
BUTTON_EVENT_FIRST
public static final int BUTTON_EVENT_FIRSTThe first number in the range of IDs used forButtonEvent
.- See Also:
-
BUTTON_EVENT_LAST
public static final int BUTTON_EVENT_LASTThe last number in the range of IDs used forDockableFrame
events.- See Also:
-
SHOW_BUTTON
public static final int SHOW_BUTTONThis event is fired when you want to show the button.- See Also:
-
HIDE_BUTTON
public static final int HIDE_BUTTONThis event is fired when you want to hide the button.- See Also:
-
ENABLE_BUTTON
public static final int ENABLE_BUTTONThis event is fired when you want to enable the button.- See Also:
-
DISABLE_BUTTON
public static final int DISABLE_BUTTONThis event is fired when you want to disable the button.- See Also:
-
CHANGE_BUTTON_TEXT
public static final int CHANGE_BUTTON_TEXTThis event is fired when you want to change the text of the button.- See Also:
-
CHANGE_BUTTON_MNEMONIC
public static final int CHANGE_BUTTON_MNEMONICThis event is fired when you want to change the mnemonic of the button.- See Also:
-
CHANGE_BUTTON_TOOLTIP
public static final int CHANGE_BUTTON_TOOLTIPThis event is fired when you want to change the tooltip of the button.- See Also:
-
CHANGE_BUTTON_FOCUS
public static final int CHANGE_BUTTON_FOCUSThis event is fired when you want to set focus to the button.- See Also:
-
SET_DEFAULT_BUTTON
public static final int SET_DEFAULT_BUTTONThis event is fired when you want to set the button to the default button in a root pane.- See Also:
-
CLEAR_DEFAULT_BUTTON
public static final int CLEAR_DEFAULT_BUTTONThis event is fired when you want to clear the default button from a root pane.- See Also:
-
-
Constructor Details
-
ButtonEvent
Creates a ButtonEvent with source, id and the button name.- Parameters:
source
-id
-buttonName
-
-
ButtonEvent
Creates a ButtonEvent with source, id, the button name and a user object. User object is required for CHANGE_BUTTON_TEXT and CHANGE_BUTTON_TOOLTIP event.- Parameters:
source
-id
-buttonName
-userObject
-
-
-
Method Details
-
getID
public int getID()Returns the event id.- Returns:
- event id.
-
setID
public void setID(int id) Sets the event id.- Parameters:
id
-
-
getButtonName
Gets the button name of this event object.- Returns:
- the button name.
-
setButtonName
Sets the button name.- Parameters:
buttonName
-
-
getUserObject
Gets the user object of this event object.- Returns:
- the user object.
-
setUserObject
Sets the user object.- Parameters:
userObject
-
-
paramString
Returns a parameter string identifying this event. This method is useful for event logging and for debugging.- Returns:
- a string identifying the event and its attributes
-