Package java.awt

Examples of java.awt.Checkbox$AccessibleAWTCheckbox


        add(labMessage);

        CheckboxGroup radioGroup1 = new CheckboxGroup();
        checkboxes1 = new Checkbox[2];

        checkboxes1[0] = new Checkbox(
                Messages.getString("LOSDialog.Mech"), mechInFirst, radioGroup1); //$NON-NLS-1$
        c.gridwidth = 1;
        c.anchor = GridBagConstraints.WEST;
        gridbag.setConstraints(checkboxes1[0], c);
        add(checkboxes1[0]);

        checkboxes1[1] = new Checkbox(
                Messages.getString("LOSDialog.NonMech"), !mechInFirst, radioGroup1); //$NON-NLS-1$
        c.gridwidth = GridBagConstraints.REMAINDER;
        c.anchor = GridBagConstraints.WEST;
        gridbag.setConstraints(checkboxes1[1], c);
        add(checkboxes1[1]);

        labMessage = new Label(
                Messages.getString("LOSDialog.InSecondHex"), Label.LEFT); //$NON-NLS-1$
        c.weightx = 1.0;
        c.weighty = 1.0;
        c.gridwidth = 0;
        c.anchor = GridBagConstraints.WEST;
        gridbag.setConstraints(labMessage, c);
        add(labMessage);

        CheckboxGroup radioGroup2 = new CheckboxGroup();
        checkboxes2 = new Checkbox[2];

        checkboxes2[0] = new Checkbox(
                Messages.getString("LOSDialog.Mech"), mechInSecond, radioGroup2); //$NON-NLS-1$
        c.gridwidth = 1;
        c.anchor = GridBagConstraints.WEST;
        gridbag.setConstraints(checkboxes2[0], c);
        add(checkboxes2[0]);

        checkboxes2[1] = new Checkbox(
                Messages.getString("LOSDialog.NonMech"), !mechInSecond, radioGroup2); //$NON-NLS-1$
        c.gridwidth = GridBagConstraints.REMAINDER;
        c.anchor = GridBagConstraints.WEST;
        gridbag.setConstraints(checkboxes2[1], c);
        add(checkboxes2[1]);
View Full Code Here


    JPanel widgetPanel = new JPanel();
    widgetPanel.setMinimumSize(new Dimension(150,150));
    widgetPanel.setLayout(new BoxLayout(widgetPanel,BoxLayout.Y_AXIS));
    widgetPanel.setBorder(BorderFactory.createTitledBorder(GT._("Select widgets:")));
    for (int i = 0; i<nWidgets;i++){
      widgetCheckboxes[i]=new Checkbox(theWidgets.widgetList[i].name);
      widgetCheckboxes[i].addItemListener(this);
      widgetPanel.add(widgetCheckboxes[i]);
    }
    // Create the overall panel
    JPanel panel = new JPanel();
View Full Code Here

        panelChoice.setLayout(new GridLayout(elemente.size(), 1));

        i = 0;
        it = elemente.iterator();
        while (it.hasNext()) {
            this.choices[i] = new Checkbox(it.next());
            this.choices[i].setState(aktiv.get(i));
           
            panelChoice.add(this.choices[i]);
            i++;
        }
View Full Code Here

        panelChoice.setLayout(new GridLayout(elemente.size(), 1));

        i = 0;
        it = elemente.iterator();
        while (it.hasNext()) {
            this.choices[i] = new Checkbox(it.next());
            this.choices[i].setState(aktiv.get(i));
           
            panelChoice.add(this.choices[i]);
            i++;
        }
View Full Code Here

    panel.setLayout(new BorderLayout());
    panel.setBorder(new EtchedBorder());
    panel.add(new JLabel("Optional:"), BorderLayout.NORTH);
    JPanel checkBoxes = new JPanel();
    checkBoxes.setLayout(new GridLayout(1, 1));
    Checkbox checkbox = new Checkbox("ignore", graph.getModel().isOptional());
    checkBoxes.add(checkbox);
        checkbox.addItemListener(new ItemListener() {

          public void itemStateChanged(ItemEvent e) {
            if (e.getStateChange() == ItemEvent.DESELECTED)
              graph.getModel().setOptional(false);
            else if (e.getStateChange() == ItemEvent.SELECTED)
View Full Code Here

    JPanel checkBoxes = new JPanel();
    checkBoxes.setLayout(new GridLayout(graph.getChildren().size(), 1));
    if (graph.hasChildren()) {
      for (ModelGraph childGraph : graph.getChildren()) {
        final String modelId = childGraph.getModel().getModelId();
        Checkbox checkbox = new Checkbox(modelId, graph.getModel()
            .getExcusedSubProcessorIds().contains(modelId));
        checkBoxes.add(checkbox);
        checkbox.addItemListener(new ItemListener() {

          public void itemStateChanged(ItemEvent e) {
            if (e.getStateChange() == ItemEvent.DESELECTED)
              graph.getModel().getExcusedSubProcessorIds().remove(modelId);
            else if (e.getStateChange() == ItemEvent.SELECTED)
View Full Code Here

    super(owner, strings.get(Strings.ADJUST_HUE_SATURATION_AND_VALUE), true);
    pressedOk = false;
    Panel panel = new Panel();
    panel.setLayout(new GridLayout(0, 2));

    setHue = new Checkbox(strings.get(Strings.SET_HUE), initialSetHue);
    setHue.addItemListener(this);
    panel.add(setHue);
    colorPanel = new Panel();
    panel.add(colorPanel);
View Full Code Here

    paletteType = new CheckboxGroup();
    checkboxes = new Checkbox[PALETTE_STRING_CONSTANTS.length];
    boolean selected = true;
    for (int i = 0; i < NUM_PALETTE_TYPES; i++)
    {
      checkboxes[i] = new Checkbox(strings.get(PALETTE_STRING_CONSTANTS[i]), paletteType, selected);
      selected = false;
      panel.add(checkboxes[i]);
    }
    mainPanel.add(panel);
View Full Code Here

    panel.add(heightLabel);
    panel.add(heightTextField);

    panel.add(new Label(""));
    maintainAspectRatio = new Checkbox(strings.get(Strings.MAINTAIN_ASPECT_RATIO), true);
    panel.add(maintainAspectRatio);

    type = initialType;
    if (pickType)
    {
View Full Code Here

*/
public class CheckboxTester extends ComponentTester {
    /** Programmatically clicks the Checkbox if in AWT mode. */
    public void click(final Component comp, int x, int y, int mask, int count) {
        if (getEventMode() == EM_AWT) {
            final Checkbox box = (Checkbox)comp;
            invokeAction(new Runnable() {
                public void run() {
                    box.setState(!box.getState());
                    ItemEvent e =
                        new ItemEvent(box, ItemEvent.ITEM_STATE_CHANGED,
                                      box, box.getState() ? 1 : 0);
                    postEvent(box, e);
                }
            });
        }
        else {
View Full Code Here

TOP

Related Classes of java.awt.Checkbox$AccessibleAWTCheckbox

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.