Examples of ChartPanel


Examples of net.datacrow.console.components.panels.ChartPanel

        } else if (searchView.getGroupingPane() != null && searchView.getGroupingPane().isEnabled()) {
          searchView.getCurrent().clear();
          searchView.getGroupingPane().updateView();
        }
       
        ChartPanel chartPanel = DcModules.getCurrent().getChartPanel(true);
       
        if (chartPanel != null) {
            if (chartPanel.isSupported() && !DcModules.getCurrent().isAbstract())
                tabbedPane.addTab(chartPanel.getTitle(), chartPanel.getIcon(), chartPanel);
            else
                chartPanel.clear();
        }
    }
View Full Code Here

Examples of net.datacrow.console.components.panels.ChartPanel

                    tabbedPane.addTab(view.getTitle(), view.getIcon(), view);
                    view.applyViewDividerLocation();
                }
            }

            ChartPanel chartPanel = DcModules.getCurrent().isAbstract() ? null : DcModules.getCurrent().getChartPanel(true);
            if (chartPanel != null) {
                if (chartPanel.isSupported())
                    tabbedPane.addTab(chartPanel.getTitle(), chartPanel.getIcon(), chartPanel);
                else
                    chartPanel.clear();
            }
           
        } catch (Exception e) {
            logger.error("An error occurred while appending items to the view(s)", e);
        }
View Full Code Here

Examples of net.datacrow.console.components.panels.ChartPanel

     * @param create Indicates if the panel should be created when it does not yet exist.
     * @return The panel or null if not available.
     */
    public ChartPanel getChartPanel(boolean create) {
        if (create)
            chartPanel = chartPanel == null && isTopModule() ? new ChartPanel(getIndex()) : chartPanel;
           
        return chartPanel;
    }
View Full Code Here

Examples of org.jfree.chart.ChartPanel

    meterplot.setInsets(new Insets( 2, 2, 2, 2 ));
   
    meterchart = new JFreeChart(title+" Meter",
      JFreeChart.DEFAULT_TITLE_FONT, meterplot, false);
    meterchart.setBackgroundPaint(bgColor);
    panelMeter = new ChartPanel(meterchart);
    setLayout(new BorderLayout());
    add(panelMeter, BorderLayout.CENTER);
  }
View Full Code Here

Examples of org.jfree.chart.ChartPanel

        stopThread = false;
        new MyThread().start();
    }

    public void start(){
        final ChartPanel chartPanel = new ChartPanel(chart);
        this.setContentPane(chartPanel);
    }
View Full Code Here

Examples of org.jfree.chart.ChartPanel

      plot.setDrawingSupplier(new DCDrawingSupplier(WidgetUtils.ADDITIONAL_COLOR_GREEN_BRIGHT,
          WidgetUtils.ADDITIONAL_COLOR_RED_BRIGHT, WidgetUtils.BG_COLOR_BLUE_BRIGHT));
    }

    final ChartPanel chartPanel = new ChartPanel(chart);

    chartPanel.addChartMouseListener(new ChartMouseListener() {
      @Override
      public void chartMouseMoved(ChartMouseEvent event) {
        Cursor cursor = Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR);
        ChartEntity entity = event.getEntity();
        if (entity instanceof PlotEntity) {
          cursor = Cursor.getPredefinedCursor(Cursor.E_RESIZE_CURSOR);
        }
        chartPanel.setCursor(cursor);
      }

      @Override
      public void chartMouseClicked(ChartMouseEvent event) {
        // do nothing
      }
    });

    final int visibleLines = Math.min(GROUPS_VISIBLE, groupNames.size());

    chartPanel.setPreferredSize(new Dimension(0, visibleLines * 50 + 200));

    final JComponent decoratedChartPanel;

    StringBuilder chartDescription = new StringBuilder();
    chartDescription.append("<html><p>The chart displays the recorded timeline based on FROM and TO dates.<br/><br/>");
    chartDescription
        .append("The <b>red items</b> represent gaps in the timeline and the <b>green items</b> represent points in the timeline where more than one record show activity.<br/><br/>");
    chartDescription
        .append("You can <b>zoom in</b> by clicking and dragging the area that you want to examine in further detail.");

    if (groupNames.size() > GROUPS_VISIBLE) {
      final JScrollBar scroll = new JScrollBar(JScrollBar.VERTICAL);
      scroll.setMinimum(0);
      scroll.setMaximum(groupNames.size());
      scroll.addAdjustmentListener(new AdjustmentListener() {

        @Override
        public void adjustmentValueChanged(AdjustmentEvent e) {
          int value = e.getAdjustable().getValue();
          slidingDataset.setFirstCategoryIndex(value);
        }
      });

      chartPanel.addMouseWheelListener(new MouseWheelListener() {

        @Override
        public void mouseWheelMoved(MouseWheelEvent e) {
          int scrollType = e.getScrollType();
          if (scrollType == MouseWheelEvent.WHEEL_UNIT_SCROLL) {
View Full Code Here

Examples of org.jfree.chart.ChartPanel

              meanMarker.setLabel("Mean");
              meanMarker.setLabelOffset(new RectangleInsets(70d, 25d, 0d, 0d));
              meanMarker.setLabelFont(WidgetUtils.FONT_SMALL);
              chart.getXYPlot().addDomainMarker(meanMarker);

              final ChartPanel chartPanel = new ChartPanel(chart);
              displayChartCallback.displayChart(chartPanel);
            }
          };

          DCPanel panel = AbstractCrosstabResultSwingRenderer.createActionableValuePanel(standardDeviation,
View Full Code Here

Examples of org.jfree.chart.ChartPanel

    }

    JFreeChart chart = ChartFactory.createBarChart("", "", "Match count", dataset, PlotOrientation.VERTICAL, true, true,
        false);
    ChartUtils.applyStyles(chart);
    displayChartCallback.displayChart(new ChartPanel(chart));
  }
View Full Code Here

Examples of org.jfree.chart.ChartPanel

      }
      plot.setSectionPaint(LabelUtils.UNIQUE_LABEL, WidgetUtils.BG_COLOR_BRIGHT);
      plot.setSectionPaint(LabelUtils.NULL_LABEL, WidgetUtils.BG_COLOR_DARKEST);
    }

    final ChartPanel chartPanel = new ChartPanel(chart);
    int chartHeight = 450;
    if (_dataset.getItemCount() > 32) {
      chartHeight += 200;
    } else if (_dataset.getItemCount() > 25) {
      chartHeight += 100;
    }

    chartPanel.setPreferredSize(new Dimension(0, chartHeight));
    chartPanel.addChartMouseListener(new ChartMouseListener() {

      @Override
      public void chartMouseMoved(ChartMouseEvent event) {
        ChartEntity entity = event.getEntity();
        if (entity instanceof PieSectionEntity) {
          PieSectionEntity pieSectionEntity = (PieSectionEntity) entity;
          String sectionKey = (String) pieSectionEntity.getSectionKey();
          if (_groups.containsKey(sectionKey)) {
            chartPanel.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
          } else {
            chartPanel.setCursor(Cursor.getDefaultCursor());
          }
        } else {
          chartPanel.setCursor(Cursor.getDefaultCursor());
        }
      }

      @Override
      public void chartMouseClicked(ChartMouseEvent event) {
View Full Code Here

Examples of org.jfree.chart.ChartPanel

        }

        final JFreeChart chart = ChartFactory.createBarChart("", "", measureName, dataset, PlotOrientation.VERTICAL,
            true, true, false);
        ChartUtils.applyStyles(chart);
        final ChartPanel chartPanel = new ChartPanel(chart);
        displayChartCallback.displayChart(chartPanel);
      }
    };

    final DCPanel panel = createActionableValuePanel(measureName, Alignment.LEFT, action, "images/chart-types/bar.png");
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.