Package java.awt

Examples of java.awt.Checkbox


          runSuite();
        }
      }
    );
    boolean useLoader= useReloadingTestSuiteLoader();
    fUseLoadingRunner= new Checkbox("Reload classes every run", useLoader);
    if (inVAJava())
      fUseLoadingRunner.setVisible(false);

    //---- second section
    fProgressIndicator= new ProgressBar();
View Full Code Here


  buildConstraints(_constraints, 0, 1, 2, 1, 1, 1);
  _constraints.fill = GridBagConstraints.HORIZONTAL;
  _interval_gbl.setConstraints(m_interval_tf, _constraints);
  _interval_panel.add(m_interval_tf);

  m_disable_box = new Checkbox("Disable automatic refresh");
  m_disable_box.setState(m_model.m_refresh_disabled);
  buildConstraints(_constraints, 0, 2, 2, 1, 1, 1);
  _constraints.fill = GridBagConstraints.HORIZONTAL;
  _interval_gbl.setConstraints(m_disable_box, _constraints);
  _interval_panel.add(m_disable_box);
View Full Code Here

            ((GridLayout) p.getLayout()).setVgap(5);

            final CheckboxGroup cg = new CheckboxGroup();
            final Checkbox[] boxes = new Checkbox[3];
            for (int i = 0; i < 3; ++i) {
                boxes[i] = new Checkbox("button" + i, cg, i == 0);
                p.add(boxes[i]);
            }

            add(p, "North");
View Full Code Here

            Panel east_panel = new Panel();
            east_panel.setLayout(new GridLayout(0, 1));

            CheckboxGroup group = new CheckboxGroup();
            Checkbox cb = new Checkbox("one", group, true);
            east_panel.add(cb);
            cb = new Checkbox("two", group, false);
            east_panel.add(cb);

            add(east_panel, "East");

            final Button wb = new Button();
View Full Code Here

        add(b, BorderLayout.CENTER);
        b.setBackground(Color.YELLOW);

        final Button b2 = new Button("Left");
        final Scrollbar sb = new Scrollbar(Scrollbar.HORIZONTAL);
        final Checkbox cb1 = new Checkbox("Right");

        add(b2, BorderLayout.WEST);
        b2.setBackground(Color.RED);
        b2.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                System.out.println("Action on b2");
                if (sb.getValue() + sb.getBlockIncrement() <= sb.getMaximum()) {
                    sb.setValue(sb.getValue() + sb.getBlockIncrement());
                } else {
                    Frame f2 = new Frame("New frame");
                    f2.setSize(200, 100);
                    f2.setVisible(true);
                }
            }
        });

        add(cb1, BorderLayout.EAST);
        cb1.setBackground(Color.WHITE);

        final TextField tf = new TextField();
        tf.setText("Let's type here");
        add(tf, BorderLayout.SOUTH);
View Full Code Here

            Panel p = new Panel();
            p.setLayout(new GridLayout(3, 1));
            ((GridLayout) p.getLayout()).setHgap(5);
            ((GridLayout) p.getLayout()).setVgap(5);

            editable = new Checkbox("Editable", true);
            p.add(editable);
            editable.addItemListener(this);

            visible = new Checkbox("Visible", true);
            p.add(visible);
            visible.addItemListener(this);

            sensitive = new Checkbox("Sensitive", true);
            p.add(sensitive);
            sensitive.addItemListener(this);

            add(p, "Center");
View Full Code Here

   */
  public void test(TestHarness harness)
  {
    Robot r = harness.createRobot ();
    Frame frame = new Frame();
    Checkbox checkbox = new Checkbox("Checkbox");
    frame.add(checkbox);
    frame.setBounds(0, 0, 100, 100);
   
    harness.check(checkbox.getCheckboxGroup(), null);
    CheckboxGroup group = new CheckboxGroup();
    checkbox.setCheckboxGroup(group);
    harness.check(group, checkbox.getCheckboxGroup());
    frame.setVisible(true);
   
    r.waitForIdle ();
    r.delay(1000);
   
    checkbox.setCheckboxGroup(null);
   
    r.delay(1000);
   
    harness.check(checkbox.getCheckboxGroup(), null);
  }
View Full Code Here

   */
  public void test(TestHarness harness)
  {
    setBackground(Color.red);
    Frame f = new Frame();
    Checkbox c = new Checkbox("check!");
    c.setBackground(Color.blue);
    add(c);
    f.add(this);
    f.pack();
    f.show();
    Point loc = f.getLocationOnScreen();
    Rectangle bounds = c.getBounds();
    Insets i = f.getInsets();
    bounds.x += i.left + loc.x;
    bounds.y += i.top + loc.y;
   
    Robot r = harness.createRobot();
View Full Code Here

        tDestAlter = new TextField();

        tDestAlter.addActionListener(this);

        cTransfer = new Checkbox("Transfer to destination table", true);

        cTransfer.addItemListener(this);

        cDrop = new Checkbox("Drop destination table (ignore error)", true);

        cDrop.addItemListener(this);

        cCreate = new Checkbox("Create destination table", true);

        cCreate.addItemListener(this);

        cDropIndex = new Checkbox("Drop destination index (ignore error)",
                                  true);

        cDropIndex.addItemListener(this);

        cIdxForced = new Checkbox("force Idx_ prefix for indexes names",
                                  false);

        cIdxForced.addItemListener(this);

        cCreateIndex = new Checkbox("Create destination index", true);

        cCreateIndex.addItemListener(this);

        cDelete = new Checkbox("Delete rows in destination table", true);

        cDelete.addItemListener(this);

        cInsert = new Checkbox("Insert into destination", true);

        cInsert.addItemListener(this);

        cFKForced = new Checkbox("force FK_ prefix for foreign key names",
                                 false);

        cFKForced.addItemListener(this);

        cAlter = new Checkbox("Alter destination table", true);

        cAlter.addItemListener(this);
        p.add(createLabel("Source table"));
        p.add(tSourceTable);
        p.add(cTransfer);
View Full Code Here

        goalL = new Label(Messages.getString("MegaMek.goalL"), Label.RIGHT); //$NON-NLS-1$
        goalF = new TextField(Integer.toString(goalNumber), 2);
        goalL.setEnabled(register);
        goalF.setEnabled(register);

        registerC = new Checkbox(Messages.getString("MegaMek.registerC")); //$NON-NLS-1$
        register = false;
        registerC.setState(register);
        registerC.addItemListener(new ItemListener() {
            public void itemStateChanged(ItemEvent event) {
                boolean state = false;
View Full Code Here

TOP

Related Classes of java.awt.Checkbox

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.