Example usage for javax.swing JMenuItem getClientProperty

List of usage examples for javax.swing JMenuItem getClientProperty

Introduction

In this page you can find the example usage for javax.swing JMenuItem getClientProperty.

Prototype

public final Object getClientProperty(Object key) 

Source Link

Document

Returns the value of the property with the specified key.

Usage

From source file:blue.automation.AutomationManager.java

private AutomationManager() {
    parameterActionListener = new ActionListener() {

        public void actionPerformed(ActionEvent ae) {
            if (data == null || selectedSoundLayer == null) {
                return;
            }//  w  ww  .jav  a2s.  co  m

            JMenuItem menuItem = (JMenuItem) ae.getSource();

            Parameter param = (Parameter) menuItem.getClientProperty("param");

            parameterSelected(selectedSoundLayer, param);

            selectedSoundLayer = null;
        }
    };

    renderTimeListener = new PropertyChangeListener() {

        public void propertyChange(PropertyChangeEvent pce) {
            if (pce.getSource() == data) {
                if (pce.getPropertyName().equals("renderStartTime")) {
                    updateValuesFromAutomations();
                }
            }
        }
    };
}