Example usage for javax.swing JComboBox getName

List of usage examples for javax.swing JComboBox getName

Introduction

In this page you can find the example usage for javax.swing JComboBox getName.

Prototype

public String getName() 

Source Link

Document

Gets the name of the component.

Usage

From source file:configuration.Util.java

public static void boxEventComboBox(workflow_properties properties, javax.swing.JCheckBox b,
        javax.swing.JComboBox s) {
    if (b == null) {
        properties.put(s.getName(), s);
    } else {/*  w w  w . jav a  2 s . c o m*/
        if (b.isSelected() == true) {
            String i = (String) s.getSelectedItem();
            if (s == null) {
                properties.put(b.getName(), b.isSelected());
            } else {
                s.setEnabled(true);
                properties.put(s.getName(), i);
                properties.put(b.getName(), i);
            }
        } else {
            properties.remove(b.getName());
            if (s != null) {
                s.setEnabled(false);
            }
        }
    }
}