Example usage for javax.swing JRadioButton getName

List of usage examples for javax.swing JRadioButton getName

Introduction

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

Prototype

public String getName() 

Source Link

Document

Gets the name of the component.

Usage

From source file:it.ventuland.ytd.ui.GUIClient.java

private String getResolutionSelected() {
    String lName = null;//from   w  ww . jav  a2s . c  o  m
    Object[] lSelection = mVideoResolutionBtnGrp.getSelection().getSelectedObjects();
    if (lSelection != null && lSelection.length > 0) {
        JRadioButton lRb = (JRadioButton) lSelection[0];
        lName = lRb.getName();
    }
    return lName;
}

From source file:it.ventuland.ytd.ui.GUIClient.java

private String getFormatSelected() {
    String lName = null;//from w  ww.  j av  a2s  .  c o m
    Object[] lSelection = mVideoQualityBtnGrp.getSelection().getSelectedObjects();
    if (lSelection != null && lSelection.length > 0) {
        JRadioButton lRb = (JRadioButton) lSelection[0];
        lName = lRb.getName();
    }
    return lName;
}

From source file:configuration.Util.java

private static void uspRButSpin(workflow_properties properties, HashMap<JRadioButton, JSpinner> RButSpin) {
    for (JRadioButton cb : RButSpin.keySet()) {
        String s = cb.getName();
        if (properties.isSet(s)) {
            cb.setEnabled(true);//ww  w  . j a v  a 2  s .  c  om
            cb.setSelected(true);
            if (RButSpin.get(cb) != null) {
                RButSpin.get(cb).setEnabled(true);
            }
        }
    }
}

From source file:configuration.Util.java

private static void uspRButText(workflow_properties properties, HashMap<JRadioButton, JTextField> RButText) {
    for (JRadioButton cb : RButText.keySet()) {
        String s = cb.getName();
        if (properties.isSet(s)) {
            cb.setEnabled(true);//  w ww  . j  av a2 s .  co m
            cb.setSelected(true);
            if (RButText.get(cb) != null) {
                RButText.get(cb).setEnabled(true);
            }
        }
    }
}

From source file:configuration.Util.java

private static void uspRButTextVal(workflow_properties properties, HashMap<JRadioButton, JTextField> RButText) {
    for (JRadioButton cb : RButText.keySet()) {
        boolean b = false;
        String k_s = cb.getName();
        if (properties.isSet(k_s)) {
            b = true;/*from w w w .j a v a2 s.co  m*/
        }
        if (RButText.get(cb) != null) {
            String v_s = RButText.get(cb).getName();
            if (properties.isSet(v_s)) {
                String s_bk = properties.get(v_s);
                RButText.get(cb).setText(s_bk);
                RButText.get(cb).setEnabled(false);
                if (b) {
                    properties.put(cb.getName(), s_bk);
                }
            }
        }
    }
}

From source file:configuration.Util.java

private static void uspRButSpinVal(workflow_properties properties, HashMap<JRadioButton, JSpinner> RButSpin) {
    for (JRadioButton cb : RButSpin.keySet()) {
        boolean b = false;
        String k_s = cb.getName();
        if (properties.isSet(k_s)) {
            b = true;//from  w  ww.  j ava 2s.  c om
        }
        if (RButSpin.get(cb) != null) {
            String v_s = RButSpin.get(cb).getName();
            if (properties.isSet(v_s)) {
                String s_bk = properties.get(v_s);
                if (valIsInt(v_s)) {
                    RButSpin.get(cb).setValue(Integer.parseInt(s_bk));
                } else if (valIsDouble(v_s)) {
                    RButSpin.get(cb).setValue(Double.parseDouble(s_bk));
                } else if (valIsFloat(v_s)) {
                    RButSpin.get(cb).setValue(Float.parseFloat(s_bk));
                } else if (valIsByte(v_s)) {
                    RButSpin.get(cb).setValue(Byte.parseByte(s_bk));
                } else if (valIsShort(v_s)) {
                    RButSpin.get(cb).setValue(Short.parseShort(s_bk));
                } else if (valIsLong(v_s)) {
                    RButSpin.get(cb).setValue(Long.parseLong(s_bk));
                }
                RButSpin.get(cb).setEnabled(false);
                if (b) {
                    properties.put(cb.getName(), s_bk);
                }
            }
        }
    }
}

From source file:configuration.Util.java

private static void eao_RButSpin(workflow_properties properties, boolean e,
        HashMap<JRadioButton, JSpinner> RButSpin) {
    for (JRadioButton cb : RButSpin.keySet()) {
        cb.setEnabled(e);//from ww  w  .  ja va 2 s. com
        if (RButSpin.get(cb) != null) {
            String s = cb.getName();
            if (properties.isSet(s) && e == true) {
                RButSpin.get(cb).setEnabled(true);
            } else {
                RButSpin.get(cb).setEnabled(false);
            }
        }
    }
}

From source file:configuration.Util.java

private static void eao_RButText(workflow_properties properties, boolean e,
        HashMap<JRadioButton, JTextField> RButText) {
    for (JRadioButton cb : RButText.keySet()) {
        cb.setEnabled(e);/*  www .  j av  a 2 s.co m*/
        if (RButText.get(cb) != null) {
            String s = cb.getName();
            if (properties.isSet(s) && e == true) {
                RButText.get(cb).setEnabled(true);
            } else {
                RButText.get(cb).setEnabled(false);
            }
        }
    }
}

From source file:configuration.Util.java

public static void buttonEventSpinner(workflow_properties properties, javax.swing.JRadioButton b,
        javax.swing.JSpinner s) {
    if (b == null) {
        properties.put(s.getName(), s.getValue());
    } else {/*from   ww w  .  j ava2 s.  c  o  m*/
        if (b.isSelected() == true) {
            if (s == null) {
                properties.put(b.getName(), b.isSelected());
            } else {
                s.setEnabled(true);
                properties.put(s.getName(), s.getValue());
                properties.put(b.getName(), s.getValue());
            }
        }
    }
}

From source file:configuration.Util.java

public static void buttonEventText(workflow_properties properties, javax.swing.JRadioButton b,
        javax.swing.JTextField t) {
    if (b == null) {
        properties.put(t.getName(), t.getText());
    } else {//w  w  w . j a v  a  2  s. c o m
        if (b.isSelected() == true) {
            if (t == null) {
                properties.put(b.getName(), b.isSelected());
            } else {
                t.setEnabled(true);
                properties.put(t.getName(), t.getText());
                properties.put(b.getName(), t.getText());
            }
        }
    }
}