Package org.timepedia.chronoscope.client.render

Examples of org.timepedia.chronoscope.client.render.RangeAxisPanel


    }

    // Keeps track of unique axisIds *within the scope of this method*
    Set<String> localRangeAxisIds = new HashSet<String>();

    RangeAxisPanel axisPanel = null;

    for (int i = 0; i < datasets.size(); i++) {
      Dataset dataset = datasets.get(i);

      final String rangeAxisId = dataset.getAxisId(0);
      RangeAxis rangeAxis = id2rangeAxis.get(rangeAxisId);

      // Determine if the rangeAxis should be added to the left or right range panel
      int numLeftAxes = leftPanel.getChildCount();
      int numRightAxes = rightPanel.getChildCount();
      boolean useLeftPanel = (numLeftAxes <= numRightAxes);
      CompositeAxisPanel compositePanel = useLeftPanel || !plot.isMultiaxis() ? leftPanel : rightPanel;

      if (rangeAxis == null) {
        rangeAxis = new RangeAxis(dataset.getRangeLabel(), rangeAxisId);
        rangeAxis.setPlot(plot);
        rangeAxis.setView(view);
        rangeAxis.setAxisIndex(i);
        id2rangeAxis.put(rangeAxisId, rangeAxis);
      }

      if (!localRangeAxisIds.contains(rangeAxisId)) {
        if (axisPanel == null || plot.isMultiaxis()) {
          axisPanel = new RangeAxisPanel();
          axisPanel.setValueAxis(rangeAxis);
          compositePanel.add(axisPanel);
        }
        rangeAxis.setAxisPanel(axisPanel);
        double tickLabelHeight = Math.min(axisPanel.getMaxLabelHeight(), 12);
        rangeAxis.setTickLabelHeight(tickLabelHeight);
        localRangeAxisIds.add(rangeAxisId);
        double h = getBounds().height;
        double rangeAxisHeight = h  < 20 ? view.getHeight()*0.75 : h;
        rangeAxisHeight -= rangeAxisHeight > tickLabelHeight*2 ? tickLabelHeight : 0;
View Full Code Here

TOP

Related Classes of org.timepedia.chronoscope.client.render.RangeAxisPanel

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.