Example usage for javax.swing JToggleButton getName

List of usage examples for javax.swing JToggleButton getName

Introduction

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

Prototype

public String getName() 

Source Link

Document

Gets the name of the component.

Usage

From source file:livecanvas.mesheditor.MeshEditor.java

private JToggleButton findToolButtonByName(String name) {
    List<JToggleButton> toolBtns = Utils.findComponentsOfType(tools, JToggleButton.class);
    for (JToggleButton toolBtn : toolBtns) {
        if (toolBtn.getName().equals(name)) {
            return toolBtn;
        }//  w  w w .j av  a 2s  . c  om
    }
    return null;
}

From source file:com.t3.client.ui.ExportDialog.java

public Map<String, Boolean> getExportSettings() {
    Map<String, Boolean> settings = new HashMap<String, Boolean>(16);
    FormAccessor fa = interactPanel.getFormAccessor();
    Iterator<?> iter = fa.beanIterator(true);
    while (iter.hasNext()) {
        Object obj = iter.next();
        if (obj instanceof JToggleButton) {
            JToggleButton jtb = (JToggleButton) obj;
            settings.put(jtb.getName(), jtb.isSelected());
        }/*from  ww  w .jav a  2  s . c  o m*/
    }
    return settings;
}