Package javax.swing

Examples of javax.swing.JComboBox$AccessibleJComboBox$AccessibleEditor


        // makes arrow head selection
        protected void makeArrowHeadGUI(JComponent parent) {
            JPanel pal;
            pal = PaletteHelper.createVerticalPanel(null);
            final JComboBox jcb = new JComboBox();
            jcb.addItem("None");
            jcb.addItem("Arrow Forward");
            jcb.addItem("Arrow Back");
            jcb.addItem("Arrow Both");
            jcb.setSelectedIndex(arrowtype + 1);
            jcb.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    switch (jcb.getSelectedIndex()) {
                    case 0:
                        System.out.println("TestLayer: no arrows");
                        omline.addArrowHead(false);
                        arrowhead = false;
                        arrowtype = -1;
View Full Code Here


            }

            cards.add(glGui, prettyName);
        }

        JComboBox cb = new JComboBox(comboBoxItems);
        cb.setEditable(false);
        cb.addItemListener(new ItemListener() {
            public void itemStateChanged(ItemEvent evt) {
                CardLayout cl = (CardLayout) (cards.getLayout());
                String active = (String) evt.getItem();
                cl.show(cards, active);
                setActiveGeneratorLoader(active);
View Full Code Here

            if (!(this instanceof Rect))
                makeArrowHeadGUI(pop);

            if (rt == OMGraphic.RENDERTYPE_LATLON) {
                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());
                    }
                });
                pal.add(jcb);
View Full Code Here

            JTextArea ta;
            pop = PaletteHelper.createVerticalPanel(null);

            if (rt == OMGraphic.RENDERTYPE_LATLON) {
                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());
                    }
                });
                pal.add(jcb);
View Full Code Here

            requestFocus();

            final JPanel pop;
            JPanel pal;
            JTextField tf;
            final JComboBox jcb;
            pop = PaletteHelper.createVerticalPanel(null);

            tf = PaletteHelper.createTextEntry("text", data, pop);
            tf.addFocusListener(new FocusAdapter() {
                public void focusLost(FocusEvent e) {
                    data = ((JTextField) (e.getSource())).getText().trim();
                }
            });

            tf = PaletteHelper.createTextEntry("font", font, pop);
            tf.addFocusListener(new FocusAdapter() {
                public void focusLost(FocusEvent e) {
                    font = ((JTextField) (e.getSource())).getText().trim();
                }
            });

            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());
                    repaint();
                }
            });
            pal.add(jcb);
View Full Code Here

            GridBagLayout gridbag = new GridBagLayout();
            GridBagConstraints c = new GridBagConstraints();
            box.setLayout(gridbag);

            jcb = new JComboBox(getActions());
            c.gridx = GridBagConstraints.REMAINDER;
            gridbag.setConstraints(jcb, c);
            box.add(jcb);

            JPanel goPanel = new JPanel();
View Full Code Here

            // The DTED view selector
            JPanel viewPanel = PaletteHelper.createPaletteJPanel("View Type");
            String[] viewStrings = { "None", "Shading", "Elevation Shading",
                    "Elevation Bands (Meters)", "Elevation Bands (Feet)" };

            JComboBox viewList = new JComboBox(viewStrings);
            viewList.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    JComboBox jcb = (JComboBox) e.getSource();
                    int newView = jcb.getSelectedIndex();
                    switch (newView) {
                    case 0:
                        viewType = DTEDFrameSubframe.NOSHADING;
                        break;
                    case 1:
                        viewType = DTEDFrameSubframe.SLOPESHADING;
                        break;
                    case 2:
                        viewType = DTEDFrameSubframe.COLOREDSHADING;
                        break;
                    case 3:
                        viewType = DTEDFrameSubframe.METERSHADING;
                        break;
                    case 4:
                        viewType = DTEDFrameSubframe.FEETSHADING;
                        break;
                    default:
                        viewType = DTEDFrameSubframe.NOSHADING;
                    }
                    if (cache != null) {
                        DTEDFrameSubframeInfo dfsi = cache.getSubframeInfo();
                        dfsi.viewType = viewType;
                        //                      cache.setSubframeInfo(dfsi);
                    }

                }
            });
            int selectedView;
            switch (viewType) {
            case 0:
            case 1:
                selectedView = viewType;
                break;
            case 2:
            case 3:
                selectedView = viewType + 1;
                break;
            case 4:
                // This puts the layer in testing mode, and the menu
                // changes.
                String[] viewStrings2 = { "None", "Shading",
                        "Elevation Bands (Meters)", "Elevation Bands (Feet)",
                        "Subframe Testing", "Elevation Shading" };
                viewList = new JComboBox(viewStrings2);
                viewList.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        JComboBox jcb = (JComboBox) e.getSource();
                        int newView = jcb.getSelectedIndex();
                        if (cache != null) {
                            DTEDFrameSubframeInfo dfsi = cache.getSubframeInfo();
                            dfsi.viewType = newView;
                            //                          cache.setSubframeInfo(dfsi);
                        }
View Full Code Here

     * @param title panel title
     * @return JPanel sub-palette
     */
    protected JPanel getGraphicPalette(final GraphicBase obj, final String title) {

        final JComboBox jcb;
        final JFrame jframe;
        final JRootPane main;
        final JPanel parent;

        parent = PaletteHelper.createVerticalPanel(title);
        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) {
                obj.setRender(jcb);
                switch (obj.rt) {
                case OMGraphic.RENDERTYPE_LATLON:
                    jframe.setTitle(title + " - LatLon");
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)
                        fillColor = jcb.getSelectedIndex();
                    else
                        lineColor = jcb.getSelectedIndex();
                    setList(generateGraphics());
                    repaint();
                }
            });
            pal.add(jcb);
View Full Code Here

    // First the root transformation
    transformTablesPanels = new ArrayList();
   
    JPanel mtransformPanel = new JPanel(new BorderLayout());
    transformTablesPanels.add(mtransformPanel);
    JComboBox mcombo = new JComboBox();
   
    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);
    transformTables.add(mtable);
    mtransformPanel.add(mtable, BorderLayout.CENTER);
    composedTransformPanel.add(mtransformPanel);
   
    // Then the sub transformations
    for(int i=0;i< ((TransformData)dataCopy).getTransformChildren().size(); i++){
   
      TransformData composedDataCopy = ((TransformData)((TransformData)dataCopy).getTransformChildren().get(i));
      JPanel transformPanel = new JPanel(new BorderLayout());   
      transformTablesPanels.add(transformPanel);
     
      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);
      transformTables.add(table);
      transformPanel.add(table, BorderLayout.CENTER);
View Full Code Here

TOP

Related Classes of javax.swing.JComboBox$AccessibleJComboBox$AccessibleEditor

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.