Package javax.swing

Examples of javax.swing.JComboBox$AccessibleJComboBox$EditorAccessibleContext


      TransformData newTransform = ((TransformData)dataCopy).addComposedTransformation();
      newTransform.setEditable(dataCopy.isEditable());
      JPanel mtransformPanel = new JPanel(new BorderLayout());
      transformTablesPanels.add(mtransformPanel);
     
      JComboBox mcombo = new JComboBox();
      mcombo.addItemListener(this);
      transformCombos.add(mcombo);
      mtransformPanel.add(mcombo, BorderLayout.NORTH);
      for(int j=0;j<TransformData.FULL;j++){
        mcombo.addItem(items[j]);
      }
      mcombo.setSelectedItem(items[newTransform.getKind()-1]);
     
      JTable mtable = createTableDataPanel(newTransform);
     
      transformTables.add(mtable);
      mtransformPanel.add(mtable, BorderLayout.CENTER);
View Full Code Here


      pb.add(namePanel, BorderLayout.NORTH);
     
      // Color properties can be set by canals RGB or by a color mapper
      if (propertyData[i].getName().startsWith(propertyDataResources.getString("ColorPropriety"))){
       
        colorCombo=new JComboBox();
        colorCombo.addItem(propertyDataResources.getString("RGBcanals"));
        colorCombo.addItem(propertyDataResources.getString("ColorMapper"));
        colorCombo.setSelectedIndex(colorTransformType);
        colorCombo.addItemListener(this);
       
View Full Code Here

      section=Box.createVerticalBox();
      section.setBorder(BorderFactory.createTitledBorder(resources.getString("Series")));

      Box box = Box.createHorizontalBox();
      box.add(pcbxcurves = new JComboBox());
      box.add(pcurvecolor = new JButton("    "));
      box.add(pcurvedelete = new JButton(resources.getString("Delete")));
      section.add(box);
     
      box = Box.createHorizontalBox();
      box.add(new JLabel(resources.getString("Orientation")));
      box.add(Box.createHorizontalGlue());
      box.add(hSeriesOrientation = new JRadioButton(resources.getString("Horizontal")));
      box.add(vSeriesOrientation = new JRadioButton(resources.getString("Vertical")));
      hSeriesOrientation.setSelected(plot.getOrientation() == PlotOrientation.HORIZONTAL);
      vSeriesOrientation.setSelected(plot.getOrientation() == PlotOrientation.VERTICAL);
      ButtonGroup bg = new ButtonGroup();
      bg.add(hSeriesOrientation);
      bg.add(vSeriesOrientation);
      section.add(box);
     
      content.add(section);

      pcbxcurves.setEditable(true);
      Color noCurveColor = pcurvecolor.getBackground();
      pcurvecolor.setFocusPainted(false);

      CategoryItemRenderer renderer = plot.getRenderer();
      int n = dst.getRowCount();
      for (int i=0; i<n; ++i) {
        DataSource ds = (DataSource)mapperSources.get(i);
        if (ds==null) ds = dst.getSource(i); // take the datasource associated with this series by default
        pcbxcurves.addItem(new CbxEntry(i,dst.getName(i),(Color)renderer.getSeriesPaint(i),ds,(ColorMapper)mappers.get(i)));
      }
      pcbxeditortf = (JTextField)pcbxcurves.getEditor().getEditorComponent();
      pupdateForEntry(pcbxcurves.getSelectedItem());
     
      pcbxcurves.addPopupMenuListener(new PopupMenuListener() {
        public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
          peditLocked = true;
        }
        public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
          peditLocked = false;
        }
        public void popupMenuCanceled(PopupMenuEvent e) {
          peditLocked = false;
        }
      });

      pcbxcurves.addItemListener(new ItemListener() {
        public void itemStateChanged(ItemEvent e) {
          if (e.getStateChange()==ItemEvent.DESELECTED) pactiveEntry = null;
          else pupdateForEntry(e.getItem());
        }
      });

      pcbxeditortf.getDocument().addDocumentListener(new DocumentListener() {
        public void insertUpdate(DocumentEvent e) {
          updateName();
        }
        public void removeUpdate(DocumentEvent e) {
          updateName();
        }
        public void changedUpdate(DocumentEvent e) {
          updateName();
        }
        public void updateName() {
          if ((peditLocked) || (pactiveEntry == null)) return;
          pactiveEntry.name = pcbxeditortf.getText();
        }
      });

      pcurvecolor.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            if (pactiveEntry==null) return;

            DynamicColorChooser dialog = new DynamicColorChooser(
                    null, resources.getString("ChooseAColor"),null ,pactiveEntry.color,pactiveEntry.source,pactiveEntry.mapper);


            dialog.pack();
            dialog.setVisible(true);

            if (dialog.isOk()){
                pactiveEntry.color = dialog.getColor();
                pactiveEntry.source = dialog.getSource();
                pactiveEntry.mapper = dialog.getMapper();
                pupdateForEntry(pactiveEntry);
            }
        }
      });

      pcurvedelete.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          if (pactiveEntry==null) return;
          pcbxcurves.removeItem(pactiveEntry);
        }
      });

     
      section=Box.createVerticalBox();
      section.setBorder(BorderFactory.createTitledBorder(resources.getString("Categories")));

      box = Box.createHorizontalBox();
      box.add(new JLabel(resources.getString("LabelsOrientation")));
      box.add(Box.createHorizontalGlue());
      box.add(hLabelOrientation = new JRadioButton(resources.getString("Horizontal")));
      box.add(vLabelOrientation = new JRadioButton(resources.getString("Vertical")));
      CategoryLabelPosition clp = vSeriesOrientation.isSelected() ? plot.getDomainAxis().getCategoryLabelPositions().getLabelPosition(RectangleEdge.BOTTOM) : plot.getDomainAxis().getCategoryLabelPositions().getLabelPosition(RectangleEdge.LEFT);
      boolean vertical = clp.getAngle() != 0;
      hLabelOrientation.setSelected(!vertical);
      vLabelOrientation.setSelected(vertical);
      bg = new ButtonGroup();
      bg.add(hLabelOrientation);
      bg.add(vLabelOrientation);
      section.add(box);

      mapper = (dst.getClassifier()==null) ? null : dst.getClassifier().getMapper();
     
      box = Box.createHorizontalBox();
      box.add(new JLabel(resources.getString("Mapper")));
      box.add(Box.createHorizontalGlue());
      box.add(cbxmapper = new JComboBox());
      cbxmapper.addItem(resources.getString("=======NONE======="));
      int idx = 0;
      if (TextMapper.textMappers!=null) for (int i =0; i<TextMapper.textMappers.size(); ++i) {
        TextMapper tm = (TextMapper)TextMapper.textMappers.get(i);
        if (tm.equals(mapper)) idx = i +1;
View Full Code Here

    public static void main(String args[]){
        // model for test
        DefaultPageListModel model = new DefaultPageListModel();

        model.addPage("test1", new JLabel("Ronan 1"));
        model.addPage("test2", new JComboBox());
        model.setSelectedPage("test2");

        JDialog test = new JDialog();
        test.getContentPane().add(new StackPanel(model));
View Full Code Here

      section.add(panel);

      Box box = Box.createHorizontalBox();

      box.add(new JLabel(resources.getString("Curves:")));
      box.add(pcbxcurves = new JComboBox());
      box.add(pcurvecolor = new JButton("    "));
      box.add(pcurvedelete = new JButton(resources.getString("Delete")));
      section.add(box);
      content.add(section);
View Full Code Here

 
       
        tabbedPane = new JTabbedPane(JTabbedPane.TOP, JTabbedPane.SCROLL_TAB_LAYOUT);
       
        GridBagPanel predefinedSources = new GridBagPanel();
        predefinedSources.addOnCurrentRow(cbxPredefined = new JComboBox(), 5, true, false, true);
        tabbedPane.add(predefinedSources, resources.getString("predefinedSources"));
       
        GridBagPanel mathExpression= new GridBagPanel();
        mathExpression.addOnCurrentRow(tfExpression = new JTextField(), 5, true, false, true);
View Full Code Here

      section=Box.createVerticalBox();
      section.setBorder(BorderFactory.createTitledBorder(resources.getString("Series")));

      Box box = Box.createHorizontalBox();
      box.add(pcbxcurves = new JComboBox());
      box.add(pcurvecolor = new JButton("    "));
      box.add(pcurvedelete = new JButton(resources.getString("Delete")));
      section.add(box);
     
      box = Box.createHorizontalBox();
View Full Code Here

   
    public GatesPropertiesPanel() {
        super(null);
        gates = new Vector();

        cbGates = new JComboBox(gates);
        cbGates.setMaximumRowCount(30);
        cbGates.setEditable(true);
        cbGates.addActionListener(this);
       
        bGateAdd = resources.getButton("addGateButton", this);
View Full Code Here

        GridBagPanel copiesPanel = new GridBagPanel(resources.getStringValue("copies") );
        GridBagPanel paperSizePanel = new GridBagPanel( resources.getStringValue("paperSize"));
        GridBagPanel paperOrientationPanel = new GridBagPanel( resources.getStringValue("paperOrientation"));
       
        // printer
        printerList = new JComboBox(printServices);
        printerPropertiesButton = resources.getButton("propertiesButton", this);
       
       
        // TODO fix the bug when editing printer properties  on Linux OS
        printerPropertiesButton.setEnabled(false);
       
       
        printerList.addActionListener(this);
        JLabel lname  = resources.getLabel("name");
    
        printerPanel.addOnCurrentRow(lname);
        printerPanel.addOnCurrentRow(printerList, 2);
        printerPanel.addOnCurrentRow(printerPropertiesButton);
        printerPanel.carriageReturn();
       
        // Selection
        printAllButton = resources.getRadioButton("printAll", null);
        printSelectedButton = resources.getRadioButton("printSelected", null);
        ButtonGroup printButtonGroup = new ButtonGroup();
        printButtonGroup.add(printAllButton);
        printButtonGroup.add(printSelectedButton);

        selectionPanel.addOnCurrentRow(printAllButton);
        selectionPanel.carriageReturn();
        selectionPanel.addOnCurrentRow(printSelectedButton);
        selectionPanel.carriageReturn();


        // Number of copies    
        JLabel lnbCopies = resources.getLabel("nbCopies");
        SpinnerNumberModel spiNbCopies = new SpinnerNumberModel();

        spiNbCopies.setStepSize(new Integer(1));
        spiNbCopies.setMinimum(new Integer(1));
        spiNbCopies.setMaximum(new Integer(100));
        spiNbCopies.setValue(new Integer(1));
        nbCopies = new JSpinner(spiNbCopies);

        copiesPanel.addOnCurrentRow(lnbCopies);
        copiesPanel.addOnCurrentRow(nbCopies, 1, true, false, true);
        copiesPanel.carriageReturn();


        // Paper size     
        paperNameList = new JComboBox(paperNames);
        paperNameList.setSelectedIndex(0);
       
        JLabel lpaper =  resources.getLabel("paper");
        paperSizePanel.addOnCurrentRow(lpaper);
        paperSizePanel.addOnCurrentRow(paperNameList,1, true, false, true);
View Full Code Here

        this.owner = owner;
        tfpreview = preview;
        currentFont = null;
        String[] fonts = names != null ? names : GraphicsEnvironment.getLocalGraphicsEnvironment()
                .getAvailableFontFamilyNames();
        cbName = new JComboBox(fonts);
        cbName.addActionListener(this);
        cbSize = new JComboBox(SIZES);
        cbSize.addActionListener(this);
        cbSize.setEditable(true);
        cBold = new JCheckBox(resources.getString("Bold"));
        cBold.addActionListener(this);
        cItalic = new JCheckBox(resources.getString("Italic"));
View Full Code Here

TOP

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

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.