Package java.awt

Examples of java.awt.Checkbox$AccessibleAWTCheckbox


   private Panel createLogLevelBoxes()
   {
      Panel container = new Panel();
      container.setLayout(new GridLayout(1, 7));

      Checkbox error = new Checkbox("ERROR", null, true);
      error.addItemListener(new LogLevelListener());
      container.add(error);

      Checkbox warning = new Checkbox("WARN", null, true);
      warning.addItemListener(new LogLevelListener());
      container.add(warning);

      Checkbox info = new Checkbox("INFO", null, true);
      info.addItemListener(new LogLevelListener());
      container.add(info);

      if (true/*log.CALL*/) { // log.CALL=true/false: check for dead code elimination
         Checkbox calls = new Checkbox("CALL", null, false);
         calls.addItemListener(new LogLevelListener());
         container.add(calls);
      }

      if (true/*log.TIME*/) {
         Checkbox time = new Checkbox("TIME", null, false);
         time.addItemListener(new LogLevelListener());
         container.add(time);
      }

      if (true/*log.TRACE*/) {
         Checkbox trace = new Checkbox("TRACE", null, false);
         trace.addItemListener(new LogLevelListener());
         container.add(trace);
      }

      if (true/*log.DUMP*/) {
         Checkbox dump = new Checkbox("DUMP", null, false);
         dump.addItemListener(new LogLevelListener());
         container.add(dump);
      }
      return container;
   }
View Full Code Here


            titlePanel2.setLayout( new BorderLayout() );
            titlePanel2.add( titlePanel, BorderLayout.WEST );
            buildCommand( panel, gridBag, c, getRes().getString( "Set Console Title" ), "console_title", titlePanel2 );
           
            m_childCommand = new TextField( getRes().getString( "(Please enter command)" ) );
            m_childDetached = new Checkbox( getRes().getString( "Detached  (Professional)" ), false);
            Panel childPanel = new Panel();
            childPanel.setLayout( new BorderLayout() );
            childPanel.add( new Label( getRes().getString( "Command: " ) ), BorderLayout.WEST );
            childPanel.add( m_childCommand, BorderLayout.CENTER );
            childPanel.add( m_childDetached, BorderLayout.EAST );
View Full Code Here

            remove.addActionListener(this);
            remove.setToolTipText(Messages.getString("AWTFileSelector.removeSelected")); //$NON-NLS-1$
            z.add(remove);
        }
        if (showHiddenFilesSwitch) {
            showHiddenFiles = new Checkbox(Messages.getString("AWTFileSelector.hiddentFiles"));             //$NON-NLS-1$
            showHiddenFiles.addItemListener(new ItemListener() {

                public void itemStateChanged(ItemEvent e) {
                    refresh();
                }
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

        super(client);
    }

    public Object createComponentInstance(Object parent, DomNode element)
    {
        Checkbox chkbox = new Checkbox();
        return chkbox;
    }
View Full Code Here

        return chkbox;
    }

    public Object updateUI(Object com, DomNode element)
    {
        Checkbox chkbox = (Checkbox) com;
        String label = (String) element.getAttribute("label");
        chkbox.setLabel(label);
        String state = element.getAttribute("state");
        if (state.equalsIgnoreCase("true"))
        {
            chkbox.setState(true);
        } else
        {
            chkbox.setState(false);
        }
        return com;
    }
View Full Code Here

        handleEvent(e);
    }

    public void handleEvent(AWTEvent e)
    {
        Checkbox cb = (Checkbox) e.getSource();
        postEvent(e.getSource(), "true", false); //has event
        postEvent(e.getSource(), "-value", String.valueOf(cb.getState()), true);
    }
View Full Code Here

    public void processInput(BridgeComponentPeer peer, BridgeInputContext context, Map inputForm)
    {
        //the checking
        if (hasEvent(peer, inputForm))
        {
            Checkbox cbox = (Checkbox) peer.getComponent();
            cbox.setState(!cbox.getState()); //toggle the checkbox
            postEvent(context, new ItemEvent(cbox, ItemEvent.ITEM_STATE_CHANGED, cbox, cbox.getState()
                    ? ItemEvent.SELECTED
                    : ItemEvent.DESELECTED));
        } else if (hasGroupEvent(peer, inputForm))
        {
            Checkbox cbox = (Checkbox) peer.getComponentObject();
            CheckboxGroup grp = cbox.getCheckboxGroup();
            /*
             * should not need to fire unselection Checkbox selected = grp.getSelectedCheckbox(); context.getEventQueue().postEvent(
             * new ItemEvent(selected, ItemEvent.ITEM_STATE_CHANGED, selected, ItemEvent.DESELECTED));
             */
            grp.setSelectedCheckbox(cbox);
View Full Code Here

     * @param form the input form
     * @return true if there's group event
     */
    protected boolean hasGroupEvent(BridgePeer peer, Map form)
    {
        Checkbox cbox = (Checkbox) peer.getComponentObject();
        CheckboxGroup grp = cbox.getCheckboxGroup();
        if (grp != null)
        {
            //in a button group
            BridgeCheckboxGroupPeer grppeer = (BridgeCheckboxGroupPeer) peer.getBridgeToolkit().getContext().getPeer(grp);
            if (grppeer != null)
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public boolean hasEvent(BridgePeer peer, Map form)
    {
        Checkbox cbox = (Checkbox) peer.getComponentObject();
        if (super.hasEvent(peer, form))
        {
            Object value = form.get(peer.getId() + "-value");
            boolean b = value != null && (value.equals("1") || value.equals("true"));
            return cbox.getState() != b;
        }
        //if state is not the same - like a toggle
        //(only applies if the form is always submitted)
        return false;
    }
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.