Package com.jidesoft.dialog
Class ButtonEvent
- java.lang.Object
-
- java.util.EventObject
-
- com.jidesoft.dialog.ButtonEvent
-
- All Implemented Interfaces:
java.io.Serializable
public class ButtonEvent extends java.util.EventObject
An EventObject used to change the state of any button.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
BUTTON_EVENT_FIRST
The first number in the range of IDs used forButtonEvent
.static int
BUTTON_EVENT_LAST
The last number in the range of IDs used forDockableFrame
events.static int
CHANGE_BUTTON_FOCUS
This event is fired when you want to set focus to the button.static int
CHANGE_BUTTON_MNEMONIC
This event is fired when you want to change the mnemonic of the button.static int
CHANGE_BUTTON_TEXT
This event is fired when you want to change the text of the button.static int
CHANGE_BUTTON_TOOLTIP
This event is fired when you want to change the tooltip of the button.static int
CLEAR_DEFAULT_BUTTON
This event is fired when you want to clear the default button from a root pane.static int
DISABLE_BUTTON
This event is fired when you want to disable the button.static int
ENABLE_BUTTON
This event is fired when you want to enable the button.static int
HIDE_BUTTON
This event is fired when you want to hide the button.static int
SET_DEFAULT_BUTTON
This event is fired when you want to set the button to the default button in a root pane.static int
SHOW_BUTTON
This event is fired when you want to show the button.
-
Constructor Summary
Constructors Constructor Description ButtonEvent(java.lang.Object source, int id, java.lang.String buttonName)
Creates a ButtonEvent with source, id and the button name.ButtonEvent(java.lang.Object source, int id, java.lang.String buttonName, java.lang.String userObject)
Creates a ButtonEvent with source, id, the button name and a user object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getButtonName()
Gets the button name of this event object.int
getID()
Returns the event id.java.lang.String
getUserObject()
Gets the user object of this event object.java.lang.String
paramString()
Returns a parameter string identifying this event.void
setButtonName(java.lang.String buttonName)
Sets the button name.void
setID(int id)
Sets the event id.void
setUserObject(java.lang.String userObject)
Sets the user object.
-
-
-
Field Detail
-
BUTTON_EVENT_FIRST
public static final int BUTTON_EVENT_FIRST
The first number in the range of IDs used forButtonEvent
.- See Also:
- Constant Field Values
-
BUTTON_EVENT_LAST
public static final int BUTTON_EVENT_LAST
The last number in the range of IDs used forDockableFrame
events.- See Also:
- Constant Field Values
-
SHOW_BUTTON
public static final int SHOW_BUTTON
This event is fired when you want to show the button.- See Also:
- Constant Field Values
-
HIDE_BUTTON
public static final int HIDE_BUTTON
This event is fired when you want to hide the button.- See Also:
- Constant Field Values
-
ENABLE_BUTTON
public static final int ENABLE_BUTTON
This event is fired when you want to enable the button.- See Also:
- Constant Field Values
-
DISABLE_BUTTON
public static final int DISABLE_BUTTON
This event is fired when you want to disable the button.- See Also:
- Constant Field Values
-
CHANGE_BUTTON_TEXT
public static final int CHANGE_BUTTON_TEXT
This event is fired when you want to change the text of the button.- See Also:
- Constant Field Values
-
CHANGE_BUTTON_MNEMONIC
public static final int CHANGE_BUTTON_MNEMONIC
This event is fired when you want to change the mnemonic of the button.- See Also:
- Constant Field Values
-
CHANGE_BUTTON_TOOLTIP
public static final int CHANGE_BUTTON_TOOLTIP
This event is fired when you want to change the tooltip of the button.- See Also:
- Constant Field Values
-
CHANGE_BUTTON_FOCUS
public static final int CHANGE_BUTTON_FOCUS
This event is fired when you want to set focus to the button.- See Also:
- Constant Field Values
-
SET_DEFAULT_BUTTON
public static final int SET_DEFAULT_BUTTON
This event is fired when you want to set the button to the default button in a root pane.- See Also:
- Constant Field Values
-
CLEAR_DEFAULT_BUTTON
public static final int CLEAR_DEFAULT_BUTTON
This event is fired when you want to clear the default button from a root pane.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ButtonEvent
public ButtonEvent(java.lang.Object source, int id, java.lang.String buttonName)
Creates a ButtonEvent with source, id and the button name.- Parameters:
source
-id
-buttonName
-
-
ButtonEvent
public ButtonEvent(java.lang.Object source, int id, java.lang.String buttonName, java.lang.String userObject)
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 Detail
-
getID
public int getID()
Returns the event id.- Returns:
- event id.
-
setID
public void setID(int id)
Sets the event id.- Parameters:
id
-
-
getButtonName
public java.lang.String getButtonName()
Gets the button name of this event object.- Returns:
- the button name.
-
setButtonName
public void setButtonName(java.lang.String buttonName)
Sets the button name.- Parameters:
buttonName
-
-
getUserObject
public java.lang.String getUserObject()
Gets the user object of this event object.- Returns:
- the user object.
-
setUserObject
public void setUserObject(java.lang.String userObject)
Sets the user object.- Parameters:
userObject
-
-
paramString
public java.lang.String 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
-
-