base/common/src/main/com/thesett/common/swing/workpanel/ButtonPanel.java
public void propertyChange(PropertyChangeEvent event)
    {
        /*log.fine("void propertyChange(PropertyChangeEvent): called");*/

        // Check that the property change was sent by a WorkPanelState
        if (event.getSource() instanceof WorkPanelState)
        {
            // Get the state
            String state = ((WorkPanelState) event.getSource()).getState();

            // Check what the state to set is
            if (state.equals(WorkPanelState.NOT_SAVED))
            {
                // Set the Cancel and Apply buttons to enabled
                cancelButton.setEnabled(true);
                applyButton.setEnabled(true);
            }
            else if (state.equals(WorkPanelState.READY))
            {
                // Set the Cancel and Apply buttons to disabled
                cancelButton.setEnabled(false);
                applyButton.setEnabled(false);
            }
            else if (state.equals(WorkPanelState.NOT_INITIALIZED))
            {
                // Disable all the buttons
                okButton.setEnabled(false);
                cancelButton.setEnabled(false);
                applyButton.setEnabled(false);
            }
        }
    }
public void propertyChange(PropertyChangeEvent event)
    {
        /*log.fine("void propertyChange(PropertyChangeEvent): called");*/

        // Check that the property change was sent by a WorkPanelState
        if (event.getSource() instanceof WorkPanelState)
        {
            // Get the state
            String state = ((WorkPanelState) event.getSource()).getState();

            // Check what the state to set is
            if (state.equals(WorkPanelState.NOT_SAVED))
            {
                // Set the Cancel and Apply buttons to enabled
                cancelButton.setEnabled(true);
                applyButton.setEnabled(true);
            }
            else if (state.equals(WorkPanelState.READY))
            {
                // Set the Cancel and Apply buttons to disabled
                cancelButton.setEnabled(false);
                applyButton.setEnabled(false);
            }
            else if (state.equals(WorkPanelState.NOT_INITIALIZED))
            {
                // Disable all the buttons
                okButton.setEnabled(false);
                cancelButton.setEnabled(false);
                applyButton.setEnabled(false);
            }
        }
    }
public void propertyChange ( PropertyChangeEvent event ) { /*log.fine("void propertyChange(PropertyChangeEvent): called");*/ // Check that the property change was sent by a WorkPanelState if ( event . getSource ( ) instanceof WorkPanelState ) { // Get the state String state = ( ( WorkPanelState ) event . getSource ( ) ) . getState ( ) ; // Check what the state to set is if ( state . equals ( WorkPanelState . NOT_SAVED ) ) { // Set the Cancel and Apply buttons to enabled cancelButton . setEnabled ( true ) ; applyButton . setEnabled ( true ) ; } else if ( state . equals ( WorkPanelState . READY ) ) { // Set the Cancel and Apply buttons to disabled cancelButton . setEnabled ( false ) ; applyButton . setEnabled ( false ) ; } else if ( state . equals ( WorkPanelState . NOT_INITIALIZED ) ) { // Disable all the buttons okButton . setEnabled ( false ) ; cancelButton . setEnabled ( false ) ; applyButton . setEnabled ( false ) ; } } }
Called when a property in the WorkPanelState is changed. This method calls initPanels to rebuild the user
interface to reflect the current application state.

@param event The work panel state change event. All other event types are ignored.
Called when a property in the WorkPanelState is changed . This method calls initPanels to rebuild the user interface to reflect the current application state .