Examples of DocumentListener


Examples of javax.swing.event.DocumentListener

        sourcePane.addOnCurrentRow(lAlias);
        sourcePane.addOnCurrentRow(tfAlias, 4, true, false, true);
        sourcePane.addOnCurrentRow(new ExpressionPanel(filteredSourceTree.getSourceTree()), 5, true, false, true);

    
        tfAlias.getDocument().addDocumentListener(new DocumentListener() {
            public void changedUpdate(DocumentEvent e) {
                updateAlias();
            }

            public void insertUpdate(DocumentEvent e) {
View Full Code Here

Examples of javax.swing.event.DocumentListener

          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();
View Full Code Here

Examples of javax.swing.event.DocumentListener

                }
            }
        });
        //delExp.setEnabled(false); // wait for a selection in the source tree
       
        tfNewSourceName.getDocument().addDocumentListener(new DocumentListener() {
            public void changedUpdate(DocumentEvent e) {
                updateAddExpState();
            }
            public void insertUpdate(DocumentEvent e) {
                updateAddExpState();
            }
            public void removeUpdate(DocumentEvent e) {
                updateAddExpState();
            }
        } );
        tfExpression.getDocument().addDocumentListener(new DocumentListener() {
            public void changedUpdate(DocumentEvent e) {
                updateAddExpState();
            }
            public void insertUpdate(DocumentEvent e) {
                updateAddExpState();
View Full Code Here

Examples of javax.swing.event.DocumentListener

          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();
        }
      });

      tfRatio.getDocument().addDocumentListener(new DocumentListener() {
        public void insertUpdate(DocumentEvent e) {
          updateValue();
        }
        public void removeUpdate(DocumentEvent e) {
          updateValue();
View Full Code Here

Examples of javax.swing.event.DocumentListener

          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();
View Full Code Here

Examples of javax.swing.event.DocumentListener

    del.setEnabled(false);
    up.setEnabled(false);
    down.setEnabled(false);

   
    if (listener!=null) tfName.getDocument().addDocumentListener(new DocumentListener() {
      public void insertUpdate(DocumentEvent e) {
        updateName();
      }
      public void removeUpdate(DocumentEvent e) {
        updateName();
View Full Code Here

Examples of javax.swing.event.DocumentListener

          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);
        }
      });

      // Now handle Secondary Y axis
      if (plot.getSecondaryRangeAxis(0) != null) {
        section = new Box(BoxLayout.Y_AXIS);
        section.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),resources.getString("SecondaryYAxis")));
        panel = new JPanel();
        panel.setLayout(new FlowLayout(FlowLayout.LEFT));
        panel.add(scbautoy = new ActionCheckBox(resources.getString("Auto-update"), plot.getSecondaryRangeAxis(0).isAutoRange()) {
          public void actionPerformed(ActionEvent e) {
            scbfixedautoy.setEnabled(isSelected());
            scbfixedautoy.apply();
            slpymin.setEnabled(!isSelected());
            slpymax.setEnabled(!isSelected());
            stfpymin.setEnabled(!isSelected());
            stfpymax.setEnabled(!isSelected());
          }
        });
        autorange = plot.getSecondaryRangeAxis(0).getFixedAutoRange();
        panel.add(scbfixedautoy = new ActionCheckBox(resources.getString("FixedRange"),autorange!=0) {
          public void actionPerformed(ActionEvent e) {
            snffixedautoy.setEnabled(isSelected() && isEnabled());
          }
        });
        panel.add(snffixedautoy = new NumberField(autorange,8));
        panel.add(slpymin = new JLabel(resources.getString("minLabel")));
        panel.add(stfpymin = new NumberField(8));
        stfpymin.setValue(plot.getSecondaryRangeAxis(0).getLowerBound());
        panel.add(slpymax = new JLabel(resources.getString("maxLabel")));
        panel.add(stfpymax = new NumberField(8));
        stfpymax.setValue(plot.getSecondaryRangeAxis(0).getUpperBound());
        section.add(panel);
        scbautoy.apply();
 
        section.add(panel);
 
        box = Box.createHorizontalBox();
 
        box.add(new JLabel(resources.getString("Curves:")));
        box.add(scbxcurves = new JComboBox());
        box.add(scurvecolor = new JButton("    "));
        box.add(scurvedelete = new JButton(resources.getString("Delete")));
        section.add(box);
        content.add(section);
 
        scbxcurves.setEditable(true);
        //noCurveColor = scurvecolor.getBackground();
        scurvecolor.setFocusPainted(false);
        dst = (SourceXYDataset)plot.getSecondaryDataset(0);
        n = dst.getSeriesCount();
        renderer = (JSynopticXYItemRenderer)plot.getSecondaryRenderer(0);
        for (int i=0; i<n; ++i) {
          DataSource ds = renderer.getDataSource(i);
          if (ds==null) {
            ds = dst.getYSource(i); // take the datasource associated with this curve by default
            DataSource linked = DataInfo.getLinkedSource(ds); // and follow link if necessary
            if (linked!=null) ds = linked;
          }
          scbxcurves.addItem(new CbxEntry(i,dst.getSeriesName(i),(Color)renderer.getSeriesPaint(i),ds,renderer.getColorMapper(i)));
        }
        scbxeditortf = (JTextField)scbxcurves.getEditor().getEditorComponent();
        supdateForEntry(scbxcurves.getSelectedItem());
       
        scbxcurves.addPopupMenuListener(new PopupMenuListener() {
          public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
            seditLocked = true;
          }
          public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
            seditLocked = false;
          }
          public void popupMenuCanceled(PopupMenuEvent e) {
            seditLocked = false;
          }
        });
 
        scbxcurves.addItemListener(new ItemListener() {
          public void itemStateChanged(ItemEvent e) {
            if (e.getStateChange()==ItemEvent.DESELECTED) sactiveEntry = null;
            else supdateForEntry(e.getItem());
          }
        });
 
        scbxeditortf.getDocument().addDocumentListener(new DocumentListener() {
          public void insertUpdate(DocumentEvent e) {
            updateName();
          }
          public void removeUpdate(DocumentEvent e) {
            updateName();
View Full Code Here

Examples of javax.swing.event.DocumentListener

            setActionProperties();
          }
        });
        box.add(Box.createHorizontalGlue());
        box.add(tfFixedText = new JTextField());
        tfFixedText.getDocument().addDocumentListener(new DocumentListener() {
          public void insertUpdate(DocumentEvent e) {
            currentAction.option = new Object[] {new Integer(6), tfFixedText.getText()};
            setActionProperties();
          }
          public void removeUpdate(DocumentEvent e) {
View Full Code Here

Examples of javax.swing.event.DocumentListener

          minValue.setEnabled(isSelected());
          minInc.setEnabled(isSelected());
        }
      });
      box.add(minValue = new JTextField(10));
      minValue.getDocument().addDocumentListener(new DocumentListener() {
        public void insertUpdate(DocumentEvent e) {
          updateType();
        }
        public void removeUpdate(DocumentEvent e) {
          updateType();
        }
        public void changedUpdate(DocumentEvent e) {
          updateType();
        }
      });
      box.add(minInc = new JCheckBox(resources.getString("BoundIncluded"), true));
      intervalPanel.add(box);

      box = Box.createHorizontalBox();
      box.add(maxcb = new ActionCheckBox(resources.getString("Max"), true) {
        public void actionPerformed(ActionEvent e) {
          maxValue.setEnabled(isSelected());
          maxInc.setEnabled(isSelected());
        }
      });
      box.add(maxValue = new JTextField(10));
      maxValue.getDocument().addDocumentListener(new DocumentListener() {
        public void insertUpdate(DocumentEvent e) {
          updateType();
        }
        public void removeUpdate(DocumentEvent e) {
          updateType();
View Full Code Here

Examples of javax.swing.event.DocumentListener

        if (cbxformat.getSelectedIndex() == TextShape.FORMAT_MAPPER) {
            cl.show(cards, "mapper");
        } else {
            cl.show(cards, "bounds");
        }
        tfText.getDocument().addDocumentListener(new DocumentListener() {
            public void insertUpdate(DocumentEvent e) {
                updateName();
            }

            public void removeUpdate(DocumentEvent e) {
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.