Package java.awt

Examples of java.awt.FlowLayout


    return box;
  }
 
  protected JComponent createDoublevalueMapperEditionPane(){

    JPanel box = new JPanel(new FlowLayout(FlowLayout.LEFT));
 
    box.add(new JLabel(resources.getString("useAssociation")));
   
   
    cbxmapper = new JComboBox();
View Full Code Here


   
    return box;
  }
 
  protected JComponent createLowerContent() {
    JPanel box = new JPanel(new FlowLayout(FlowLayout.LEFT));
   
    box.add(new JLabel(resources.getString("rotUnit")));
    box.add(Box.createHorizontalGlue());
   
    comboRotUnit = new JComboBox();
View Full Code Here

      // X axis section
      section = new Box(BoxLayout.Y_AXIS);
      section.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),resources.getString("XAxis")));
      panel = new JPanel();
      panel.setLayout(new FlowLayout(FlowLayout.LEFT));
      panel.add(pcbautox = new ActionCheckBox(resources.getString("Auto-update"), plot.getDomainAxis().isAutoRange()) {
        public void actionPerformed(ActionEvent e) {
          pcbfixedautox.setEnabled(isSelected());
          pcbfixedautox.apply();
          plpxmin.setEnabled(!isSelected());
          plpxmax.setEnabled(!isSelected());
          ptfpxmin.setEnabled(!isSelected());
          ptfpxmax.setEnabled(!isSelected());
        }
      });
      double autorange = plot.getDomainAxis().getFixedAutoRange();
      panel.add(pcbfixedautox = new ActionCheckBox(resources.getString("FixedRange"),autorange!=0) {
        public void actionPerformed(ActionEvent e) {
          pnffixedautox.setEnabled(isSelected() && isEnabled());
        }
      });
      panel.add(pnffixedautox = new NumberField(autorange,10));
      section.add(panel);
      panel = new JPanel();
      panel.setLayout(new FlowLayout(FlowLayout.LEFT));
      panel.add(plpxmin = new JLabel(resources.getString("minLabel")));
      panel.add(ptfpxmin = new NumberField(10));
      ptfpxmin.setValue(plot.getDomainAxis().getLowerBound());
      panel.add(plpxmax = new JLabel(resources.getString("maxLabel")));
      panel.add(ptfpxmax = new NumberField(10));
      ptfpxmax.setValue(plot.getDomainAxis().getUpperBound());
      section.add(panel);
      pcbautox.apply();

      content.add(section);

//       X secondary axis section
      if (plot.getSecondaryDomainAxis(0) != null) {
        section = new Box(BoxLayout.Y_AXIS);
        section.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),resources.getString("SecondaryXAxis")));
        panel = new JPanel();
        panel.setLayout(new FlowLayout(FlowLayout.LEFT));
        panel.add(scbautox = new ActionCheckBox(resources.getString("Auto-update"), plot.getSecondaryDomainAxis(0).isAutoRange()) {
          public void actionPerformed(ActionEvent e) {
            scbfixedautox.setEnabled(isSelected());
            scbfixedautox.apply();
            slpxmin.setEnabled(!isSelected());
            slpxmax.setEnabled(!isSelected());
            stfpxmin.setEnabled(!isSelected());
            stfpxmax.setEnabled(!isSelected());
          }
      });
      autorange = plot.getSecondaryDomainAxis(0).getFixedAutoRange();
      panel.add(scbfixedautox = new ActionCheckBox(resources.getString("FixedRange"),autorange!=0) {
        public void actionPerformed(ActionEvent e) {
          snffixedautox.setEnabled(isSelected() && isEnabled());
        }
      });
      panel.add(snffixedautox = new NumberField(autorange,10));
      section.add(panel);
      panel = new JPanel();
      panel.setLayout(new FlowLayout(FlowLayout.LEFT));
      panel.add(slpxmin = new JLabel(resources.getString("minLabel")));
      panel.add(stfpxmin = new NumberField(10));
      stfpxmin.setValue(plot.getSecondaryDomainAxis(0).getLowerBound());
      panel.add(slpxmax = new JLabel(resources.getString("maxLabel")));
      panel.add(stfpxmax = new NumberField(10));
      stfpxmax.setValue(plot.getSecondaryDomainAxis(0).getUpperBound());
      section.add(panel);
      scbautox.apply();

      content.add(section);
      }
      // Now handle Y axis
      section = new Box(BoxLayout.Y_AXIS);
      section.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),resources.getString("YAxis")));
      panel = new JPanel();
      panel.setLayout(new FlowLayout(FlowLayout.LEFT));
      panel.add(pcbautoy = new ActionCheckBox(resources.getString("Auto-update"), plot.getRangeAxis().isAutoRange()) {
        public void actionPerformed(ActionEvent e) {
          pcbfixedautoy.setEnabled(isSelected());
          pcbfixedautoy.apply();
          plpymin.setEnabled(!isSelected());
          plpymax.setEnabled(!isSelected());
          ptfpymin.setEnabled(!isSelected());
          ptfpymax.setEnabled(!isSelected());
        }
      });
      autorange = plot.getRangeAxis().getFixedAutoRange();
      panel.add(pcbfixedautoy = new ActionCheckBox(resources.getString("FixedRange"),autorange!=0) {
        public void actionPerformed(ActionEvent e) {
          pnffixedautoy.setEnabled(isSelected() && isEnabled());
        }
      });
      panel.add(pnffixedautoy = new NumberField(autorange,8));
      panel.add(plpymin = new JLabel(resources.getString("minLabel")));
      panel.add(ptfpymin = new NumberField(8));
      ptfpymin.setValue(plot.getRangeAxis().getLowerBound());
      panel.add(plpymax = new JLabel(resources.getString("maxLabel")));
      panel.add(ptfpymax = new NumberField(8));
      ptfpymax.setValue(plot.getRangeAxis().getUpperBound());
      section.add(panel);
      pcbautoy.apply();

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

      pcbxcurves.setEditable(true);
      noCurveColor = pcurvecolor.getBackground();
      pcurvecolor.setFocusPainted(false);
      SourceXYDataset dst = (SourceXYDataset)plot.getDataset();
      int n = dst.getSeriesCount();
      JSynopticXYItemRenderer renderer = (JSynopticXYItemRenderer)plot.getRenderer();
      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;
        }
        pcbxcurves.addItem(new CbxEntry(i,dst.getSeriesName(i),(Color)renderer.getSeriesPaint(i),ds,renderer.getColorMapper(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);
        }
      });

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

    if (timeZone==null)
      displayTimeZone = TimeZone.getTimeZone(defaultDisplayTimeZone);
    else
      displayTimeZone= timeZone;
   
    setLayout(new FlowLayout(FlowLayout.LEADING, 0, 5));
    GregorianCalendar date = new GregorianCalendar();
    date.setTimeZone(displayTimeZone);
    date.setTimeInMillis(new Double(value).longValue());

    add(_dayField = new DatePartField(date.get(Calendar.DAY_OF_MONTH), date.getActualMinimum(Calendar.DAY_OF_MONTH), date.getActualMaximum(Calendar.DAY_OF_MONTH), 2));
View Full Code Here

    this.id=id;
    setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

    setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),title));

    JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT));
    cbgrid = resources.getCheckBox("grid", this);
    panel.add(cbgrid);

    cbdashedGrid = resources.getCheckBox("dashedGrid", null);
    panel.add(cbdashedGrid);

    //Adding a check box to switch to logarithmic mode.
    cblog = resources.getCheckBox("logarithmic", null);
    panel.add(cblog);
    llabel = new JLabel(resources.getStringValue("labelLabel"));
    panel.add(llabel);
    tflabel = new JTextField(15);
    panel.add(tflabel);
    cbauto = resources.getCheckBox("autoscale", this);
    panel.add(cbauto);


    add(panel);

    panel = new JPanel(new FlowLayout(FlowLayout.LEFT));
    chFloatingAxe = resources.getCheckBox("floatingAxe", null);
    chFloatingAxe.setVisible(showFloatingProperties);
    panel.add(chFloatingAxe);
    lfloatingRange = new JLabel(resources.getStringValue("labelFloatingRange"));
    lfloatingRange.setVisible(showFloatingProperties);
    panel.add(lfloatingRange);
    tffloatingRange = createFloatingRangeField();
    tffloatingRange.setVisible(showFloatingProperties);
    panel.add(tffloatingRange);

    add(panel);

    panel = new JPanel(new FlowLayout(FlowLayout.LEFT));
    lmin = new JLabel(resources.getStringValue("minLabel"));
    panel.add(lmin);
    addMinMaxComponent(true,panel);
    lmax = new JLabel(resources.getStringValue("maxLabel"));
    panel.add(lmax);
View Full Code Here

        super(null);
        this.resources = resources;
        setLayout(new BorderLayout());
        // limit combo
        JPanel title = new JPanel(new GridLayout());
        JPanel combo = new JPanel(new FlowLayout(FlowLayout.LEFT));
        limits = new Vector();
        cblimits = new JComboBox(limits);
        cblimits.setMaximumRowCount(30);
        cblimits.setEditable(true);
        cblimits.addActionListener(this);
        combo.add(cblimits);
        blimitadd = resources.getButton("addLimitButton", this);
        combo.add(blimitadd);
        blimitdelete = resources.getButton("deleteLimitButton", this);
        combo.add(blimitdelete);
        title.add(combo);
        add(title, BorderLayout.NORTH);
        add(Box.createVerticalStrut(25));
        JPanel limitsProperties = new JPanel();
        limitsProperties.setLayout(new BoxLayout(limitsProperties, BoxLayout.Y_AXIS));
        // limit axis
        JPanel axisPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
        ButtonGroup direction = new ButtonGroup();
        horizontal = new JRadioButton(resources.getString("horizontal"), true);
        vertical = new JRadioButton(resources.getString("vertical"), true);
        direction.add(horizontal);
        direction.add(vertical);
        axisPanel.add(horizontal);
        axisPanel.add(vertical);
        horizontal.addActionListener(this);
        vertical.addActionListener(this);
        ButtonGroup axe = new ButtonGroup();
        primary = new JRadioButton(resources.getString("primary"), true);
        secondary = new JRadioButton(resources.getString("secondary"), true);
        axe.add(primary);
        axe.add(secondary);
        axisPanel.add(primary);
        axisPanel.add(secondary);
        primary.addActionListener(this);
        secondary.addActionListener(this);
        limitsProperties.add(axisPanel);
        // value
        JPanel limitValue = new JPanel();
        limitValue.setLayout(new FlowLayout(FlowLayout.LEFT));
        limitValue.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), resources
                .getStringValue("limitValue")));
        value = new JTextField(15);
        lv = new JLabel(resources.getString("limitValue"));
        limitValue.add(lv);
        limitValue.add(value);
        limitsProperties.add(limitValue);
        limitsProperties.add(Box.createVerticalStrut(10));
        // display
        JPanel limitDiplay = new JPanel();
        limitDiplay.setLayout(new FlowLayout(FlowLayout.LEFT));
        limitDiplay.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), resources
                .getStringValue("limitDisplay")));
        blimitcolor = new JButton("    ");
        blimitcolor.addActionListener(this);
        lc = new JLabel(resources.getString("limitColor"));
View Full Code Here

   
    plotPropertiesPane = new JPanel ();
    plotPropertiesPane.setLayout(new BoxLayout(plotPropertiesPane, BoxLayout.Y_AXIS));
    plotPropertiesPane.add(Box.createVerticalStrut(10));
   
    JPanel title = new JPanel(new FlowLayout(FlowLayout.LEFT));
    title.add(new JLabel(resources.getStringValue("titleLabel")));
    tftitle = new JTextField(25);
    title.add(tftitle);
    plotPropertiesPane.add(title);
   
   
    plotPropertiesPane.add(Box.createVerticalStrut(10));
    JPanel legend = new JPanel (new FlowLayout(FlowLayout.LEFT));
    cblegend = resources.getCheckBox("legend", null);
    cbCurveInformation = resources.getCheckBox("curveInformation", null);
    legend.add(cblegend);
    legend.add(cbCurveInformation);
    plotPropertiesPane.add(legend);
View Full Code Here

    JPanel _center;
   
    public PointLightPanel(Frame owner, PointLightEdit editor) {
        super(owner, editor);
       
        _center=new JPanel(new FlowLayout());
       
        // TODO i18n
        PropertyEdit<Light,?> e=editor.getPropertyEdit(PointLightEdit.LightPosition);
        _center.add(new PropertiesPanel<Light>(_owner,e));
       
View Full Code Here

   
    plotPropertiesPane = new JPanel();
    plotPropertiesPane.setLayout(new BoxLayout(plotPropertiesPane, BoxLayout.Y_AXIS));
    plotPropertiesPane.add(Box.createVerticalStrut(10));
   
    JPanel title = new JPanel(new FlowLayout(FlowLayout.LEFT));
    title.add(new JLabel(resources.getStringValue("titleLabel")));
    tftitle = new JTextField(25);
    title.add(tftitle);
    plotPropertiesPane.add(title);
   
   
    plotPropertiesPane.add(Box.createVerticalStrut(10));
    JPanel legend = new JPanel (new FlowLayout(FlowLayout.LEFT));
    cblegend = resources.getCheckBox("legend", null);
    cbCurveInformation = resources.getCheckBox("curveInformation", null);
    legend.add(cblegend);
    legend.add(cbCurveInformation);
    plotPropertiesPane.add(legend);
View Full Code Here

    JPanel _south;
   
    public LightPanel(Frame owner, LightEdit editor) {
        super(owner, editor);
        // TODO i18n
        _south=new JPanel(new FlowLayout());

        PropertyEdit<Light,?> e2=editor.getPropertyEdit(LightEdit.LightState);
        _south.add(new PropertiesPanel<Light>(_owner,e2));

        PropertyEdit<Light,?> e=editor.getPropertyEdit(LightEdit.LightColor);
View Full Code Here

TOP

Related Classes of java.awt.FlowLayout

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.