View RSS Feed

Java Swing

Enabling and Disabling of Components Which Share an Action

Rate this Entry
by , 04-26-2012 at 08:50 PM (753 Views)
When “enabled”, the bound property of Action is enabled/disabled, property change event is sent to property change listeners. The AbstractButton consist of “inner-class property change listener” that disables/enables the correspondent component.

In case of ActionDemo applications, actions get initialized in initActions() method. Similar Actions set is shared among popup menu, toolbar, menu and also are used for construction of the UI controls in createPopupMenu(),createToolBar() and createMenu() methods.

Checkbox “enabled all actions” & ItemListener class which is anonymous constructed in method createPanel() enable or disable actions in actual. It will be altering state automatically so that to show off the present state of the action.

Submit "Enabling and Disabling of Components Which Share an Action" to Facebook Submit "Enabling and Disabling of Components Which Share an Action" to Digg Submit "Enabling and Disabling of Components Which Share an Action" to del.icio.us Submit "Enabling and Disabling of Components Which Share an Action" to StumbleUpon Submit "Enabling and Disabling of Components Which Share an Action" to Google

Categories
Actions

Comments