Package javax.swing

Examples of javax.swing.JComboBox.addItem()


                pal = PaletteHelper.createVerticalPanel(null);
                JComboBox jcb = new JComboBox();
                jcb.addItem("Straight");// indices correspond to
                                        // LineType.java
                jcb.addItem("Rhumb");
                jcb.addItem("Great Circle");
                jcb.setSelectedIndex(type - 1);
                jcb.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        setType((JComboBox) e.getSource());
                    }
View Full Code Here


                }
            });

            pal = PaletteHelper.createVerticalPanel(null);
            jcb = new JComboBox();
            jcb.addItem("right");// indices correspond to values in
                                 // OMText
            jcb.addItem("center");
            jcb.addItem("left");
            jcb.setSelectedIndex(just);
            jcb.addActionListener(new ActionListener() {
View Full Code Here

            pal = PaletteHelper.createVerticalPanel(null);
            jcb = new JComboBox();
            jcb.addItem("right");// indices correspond to values in
                                 // OMText
            jcb.addItem("center");
            jcb.addItem("left");
            jcb.setSelectedIndex(just);
            jcb.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    just = jcb.getSelectedIndex();
View Full Code Here

            pal = PaletteHelper.createVerticalPanel(null);
            jcb = new JComboBox();
            jcb.addItem("right");// indices correspond to values in
                                 // OMText
            jcb.addItem("center");
            jcb.addItem("left");
            jcb.setSelectedIndex(just);
            jcb.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    just = jcb.getSelectedIndex();
                    setList(generateGraphics());
View Full Code Here

        jframe = new JFrame();
        main = jframe.getRootPane();

        // different controls for different render types
        jcb = new JComboBox();
        jcb.addItem("LatLon");// indices correspond to LineType.java
        jcb.addItem("XY");
        jcb.addItem("Offset");
        jcb.setSelectedIndex(obj.rt - 1);
        jcb.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
View Full Code Here

        main = jframe.getRootPane();

        // different controls for different render types
        jcb = new JComboBox();
        jcb.addItem("LatLon");// indices correspond to LineType.java
        jcb.addItem("XY");
        jcb.addItem("Offset");
        jcb.setSelectedIndex(obj.rt - 1);
        jcb.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                obj.setRender(jcb);
View Full Code Here

        // different controls for different render types
        jcb = new JComboBox();
        jcb.addItem("LatLon");// indices correspond to LineType.java
        jcb.addItem("XY");
        jcb.addItem("Offset");
        jcb.setSelectedIndex(obj.rt - 1);
        jcb.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                obj.setRender(jcb);
                switch (obj.rt) {
View Full Code Here

        protected void makeColorBox(JComponent parent, String title,
                                    final boolean isFill) {
            JPanel pal = PaletteHelper.createVerticalPanel(title);
            final JComboBox jcb = new JComboBox();
            for (int i = 0; i < NCOLORS; i++) {
                jcb.addItem(colorNames[i]);
            }
            jcb.setSelectedIndex(isFill ? fillColor : lineColor);
            jcb.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    if (isFill)
View Full Code Here

   
    transformCombos.add(mcombo);
    mtransformPanel.add(mcombo, BorderLayout.NORTH);

    for(int j=0;j<TransformData.FULL;j++){
      mcombo.addItem(items[j]);
    }
    mcombo.addItemListener(this);
    mcombo.setSelectedItem(items[((TransformData)dataCopy).getKind()-1]);
   
    JTable mtable = createTableDataPanel(dataCopy);
View Full Code Here

      JComboBox combo = new JComboBox();
     
      transformCombos.add(combo);
      transformPanel.add(combo, BorderLayout.NORTH);
      for(int j=0;j<TransformData.FULL;j++){
        combo.addItem(items[j]);
      }
      combo.addItemListener(this);
      combo.setSelectedItem(items[composedDataCopy.getKind()-1]);
     
      JTable table = createTableDataPanel(composedDataCopy);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.