Package java.awt

Examples of java.awt.List$AccessibleAWTList$AccessibleAWTListChild


        toggleFullscreen();
      }
    });
    selectionPanel.add(fullScreen, BorderLayout.SOUTH);

    final List demos = new List();
    for (Enumeration e = selectableDemos.keys(); e.hasMoreElements();) {
      demos.add(e.nextElement().toString());
    }
    selectionPanel.add(demos, BorderLayout.CENTER);

    demos.addItemListener(new ItemListener() {

      public void itemStateChanged(ItemEvent event) {
        demoSelected(event.getItemSelectable().getSelectedObjects()[0].toString());
      }
    });
View Full Code Here


           
            buildCommand( panel, gridBag, c, getRes().getString( "Dump Configuration" ), "configuration",
                    getRes().getString( "Dumps all Wrapper Configuration Properties to the console." ) );
           
           
            m_listenerFlags = new List( 2, true );
            m_listenerFlags.add( "Service" );
            m_listenerFlags.add( "Control" );
            m_listenerFlags.add( "Logging" );
            m_listenerFlags.add( "Core" );
           
View Full Code Here

    public void processInput(BridgeComponentPeer peer, BridgeInputContext context, Map inputForm) throws InputException
    {
        if (hasEvent(peer, inputForm))
        {
            Object indicesObj = inputForm.get(peer.getId());
            List l = (List) peer.getComponentObject();
            BitSet selected = new BitSet(l.getItemCount());
            if (indicesObj instanceof String)
            {
                int i = Integer.parseInt((String) indicesObj);
                selected.set(i, true);
            } else if (indicesObj instanceof Object[])
            {
                Object[] indicesStr = (Object[]) indicesObj;
                for (int i = 0; i < indicesStr.length; i++)
                {
                    int set = Integer.parseInt(indicesStr[i].toString());
                    selected.set(set, true);
                }
            }
            try
            {
                int event = 0;
                for (int i = 0; i < l.getItemCount(); i++)
                {
                    if (selected.get(i))
                    {
                        if (!l.isIndexSelected(i))
                        {
                            event = 1;
                            l.select(i);
                            _logger.finest("made " + i + " selected" + l.isIndexSelected(i));
                        } //else ignore
                    } else //not selected
                    if (l.isIndexSelected(i))
                    {
                        event = -1;
                        l.deselect(i);
                        _logger.finest("made " + i + " deselected " + l.isIndexSelected(i));
                    }
                }
                //the firing of event could be random
                //when there's no listener to this list component
                //because the user could do several selection/deselection
View Full Code Here

    Panel numbersPanel= createCounterPanel();

    //---- fourth section
    Label failureLabel= new Label("Errors and Failures:");

    fFailureList= new List(5);
    fFailureList.addItemListener(
      new ItemListener() {
        public void itemStateChanged(ItemEvent e) {
          failureSelected();
        }
View Full Code Here

  List list;
  boolean refill;

  public ResourceViewer() {
    super("ResourceViewer");
    list = new List();

    setLayout(new BorderLayout());
    add("Center", list);

    Button clearCashButton = new Button("clear the cache");
View Full Code Here

     * @return java.awt.List
     */
    private List getTargetList() {
        if (iTargetList == null) {
            try {
                iTargetList = new List();
                iTargetList.setName("TargetList");
                iTargetList.setEnabled(true);
            } catch (Throwable iExc) {
                handleException(iExc);
            }
View Full Code Here

     * @return java.awt.List
     */
    private List getTargetList() {
        if (iTargetList == null) {
            try {
                iTargetList = new List();
                iTargetList.setName("TargetList");
                iTargetList.setEnabled(true);
            } catch (Throwable iExc) {
                handleException(iExc);
            }
View Full Code Here

            initted = true;

            Panel p = new Panel();
            p.setLayout(new GridLayout(3, 1));

            List l = new List(5, true);
            for (int i = 0; i < 10; i++)
                l.add("List item " + i);

            p.add(l);

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

                            d.setVisible(false);
                        }
                    });
                    d.add(b);

                    List ch = new List();
                    ch.add("Ding");
                    ch.add("September");
                    ch.add("Red");
                    ch.add("Quassia");
                    ch.add("Pterodactyl");
                    d.add(ch);

                    d.pack();
                    d.setVisible(true);
                }
            });

            wb.addMouseListener(new MouseAdapter() {
                public void mousePressed(MouseEvent e) {
                    xs++;
                    ys++;
                    ch.repaint();
                }
            });

            add(wb, "West");
View Full Code Here

        setSize(600, 400);
        setLayout(new BorderLayout());
        //wnd.setLocation(75, 50);
        setBackground(Color.GREEN);

        final List l = new List();
        l.add("Item 1");
        l.add("Item 2");
        l.add("Item 3");
        //wnd.add(l, BorderLayout.NORTH);

        final Button b = new Button("Hello world");
        b.addActionListener(new ActionListener() {
            int i = 0;
View Full Code Here

TOP

Related Classes of java.awt.List$AccessibleAWTList$AccessibleAWTListChild

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.