List of usage examples for org.jfree.chart ChartPanel setToolTipText
@BeanProperty(bound = false, preferred = true, description = "The text to display in a tool tip.") public void setToolTipText(String text)
From source file:org.csml.tommo.sugar.modules.heatmap.MappingQualityDialog.java
protected void rebuild() { centerPanel.removeAll();/* w w w . j a va 2 s . c om*/ List<TileCoordinates> tileCoordinateList = table.getTileCoordinateList(row, col); MappingQuality mappingQuality = table.getModel().getMappingQuality(); PaintScale paintScale = MappingQualityCellRenderer.getAveragePaintScale(); for (int i = 0; i < tileCoordinateList.size(); i++) { TileCoordinates tc = tileCoordinateList.get(i); MappingQualityMatrix matrix = mappingQuality.getMeanQualityMatrix(tc); if (matrix != null) { ChartPanel panel = MappingQualityMatrixChart.createChartPanel(matrix, paintScale); panel.setToolTipText("tile=" + tc.getTile()); centerPanel.add(panel); } else { centerPanel.add(new JLabel("Missing data for tile=" + tc.getTile())); } } TileCoordinates first = tileCoordinateList.get(0); String windowTitle = "Average MAPQ for tile=" + first.getTile() + " and neighbors"; setTitle(windowTitle); centerPanel.revalidate(); centerPanel.repaint(); }
From source file:org.csml.tommo.sugar.modules.heatmap.DensityHeatmapDialog.java
protected void rebuild() { centerPanel.removeAll();// w w w .j a v a2 s. co m List<TileBPCoordinates> tileBPCoordinateList = table.getTileBPCoordinateList(row, col); QualityHeatMapsPerTileAndBase heatmap = table.getModel().getQualityHeatMapsPerTileAndBase(); PaintScale paintScale = DensityMatrixCellRenderer.getPaintScale(table.getMaxDensity()); for (int i = 0; i < tileBPCoordinateList.size(); i++) { TileBPCoordinates tc = tileBPCoordinateList.get(i); MeanQualityMatrix matrix = heatmap.getMeanQualityMatrix(tc); if (matrix != null) { ChartPanel panel = MeanQualityMatrixChart.createDensityChartPanel(matrix, paintScale); panel.setToolTipText("tile=" + tc.getTile()); centerPanel.add(panel); } else { centerPanel.add(new JLabel("Missing data for tile=" + tc.getTile())); } } TileBPCoordinates first = tileBPCoordinateList.get(0); String windowTitle = "Density for tile=" + first.getTile() + " and neighbors"; setTitle(windowTitle); centerPanel.revalidate(); centerPanel.repaint(); }
From source file:org.csml.tommo.sugar.modules.heatmap.AverageQualityInteractiveHeatmapDialog.java
protected void rebuild() { centerPanel.removeAll();// w w w .j a v a 2s . co m List<TileBPCoordinates> tileBPCoordinateList = table.getTileBPCoordinateList(row, col); QualityHeatMapsPerTileAndBase heatmap = table.getModel().getQualityHeatMapsPerTileAndBase(); for (int i = 0; i < tileBPCoordinateList.size(); i++) { TileBPCoordinates tc = tileBPCoordinateList.get(i); MeanQualityMatrix matrix = heatmap.getMeanQualityMatrix(tc); if (matrix != null) { ChartPanel panel = MeanQualityMatrixChart.createAverageQualityChartPanel(matrix, LinearPaintScale.AVERAGE_QUALITY_PAINT_SCALE); panel.setToolTipText("tile=" + tc.getTile() + " , bp=" + tc.getBasePosition()); centerPanel.add(panel); } else { centerPanel .add(new JLabel("Missing data for tile=" + tc.getTile() + " , bp=" + tc.getBasePosition())); } } TileBPCoordinates first = tileBPCoordinateList.get(0); String windowTitle = "Mean Quality for tile=" + first.getTile() + " , bp=" + first.getBasePosition() + " and neighbors"; setTitle(windowTitle); centerPanel.revalidate(); centerPanel.repaint(); }
From source file:org.csml.tommo.sugar.modules.heatmap.MappingQualityThresholdDialog.java
protected void rebuild() { centerPanel.removeAll();/*from ww w . j av a 2s .c o m*/ List<TileCoordinates> tileCoordinateList = table.getTileCoordinateList(row, col); MappingQuality mappingQuality = table.getModel().getMappingQuality(); PaintScale paintScale = MappingQualityCellRenderer.getThresholdPaintScale(); for (int i = 0; i < tileCoordinateList.size(); i++) { TileCoordinates tc = tileCoordinateList.get(i); MappingQualityMatrix matrix = mappingQuality.getMeanQualityMatrix(tc); if (matrix != null) { ChartPanel panel = MappingQualityMatrixChart.createChartPanelByThreshold(threshold, matrix, paintScale); panel.setToolTipText("tile=" + tc.getTile()); centerPanel.add(panel); } else { centerPanel.add(new JLabel("Missing data for tile=" + tc.getTile())); } } TileCoordinates first = tileCoordinateList.get(0); String windowTitle = "MAPQ > " + threshold + " for tile=" + first.getTile() + " and neighbors"; setTitle(windowTitle); centerPanel.revalidate(); centerPanel.repaint(); }
From source file:org.csml.tommo.sugar.modules.heatmap.InteractiveHeatmapDialog.java
protected void rebuild() { centerPanel.removeAll();/* w ww . ja v a2 s. c o m*/ List<TileBPCoordinates> tileBPCoordinateList = table.getTileBPCoordinateList(row, col); QualityHeatMapsPerTileAndBase heatmap = table.getModel().getQualityHeatMapsPerTileAndBase(); for (int i = 0; i < tileBPCoordinateList.size(); i++) { TileBPCoordinates tc = tileBPCoordinateList.get(i); MeanQualityMatrix matrix = heatmap.getMeanQualityMatrix(tc); if (matrix != null) { ChartPanel panel = MeanQualityMatrixChart.createChartPanel(matrix, LinearPaintScale.PAINT_SCALE); panel.setToolTipText("tile=" + tc.getTile() + " , bp=" + tc.getBasePosition()); centerPanel.add(panel); } else { centerPanel .add(new JLabel("Missing data for tile=" + tc.getTile() + " , bp=" + tc.getBasePosition())); } } TileBPCoordinates first = tileBPCoordinateList.get(0); String windowTitle = "Mean Quality for tile=" + first.getTile() + " , bp=" + first.getBasePosition() + " and neighbors"; setTitle(windowTitle); centerPanel.revalidate(); centerPanel.repaint(); }
From source file:fi.smaa.jsmaa.gui.views.CriterionView.java
private JPanel buildValueFunctionChartPanel(ScaleCriterion criterion) { UtilityFunctionDataset dataset = new UtilityFunctionDataset(criterion); JFreeChart chart = ChartFactory.createXYLineChart("", "x", "v(x)", dataset, PlotOrientation.VERTICAL, false, true, true);/*from www . j av a 2 s . com*/ final XYPlot plot = chart.getXYPlot(); XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer(); plot.setRenderer(0, renderer); renderer.setSeriesPaint(0, Color.black); renderer.setSeriesShape(0, ShapeUtilities.createDiamond(3.0f)); renderer.setBaseToolTipGenerator(new StandardXYToolTipGenerator()); ValueAxis rAxis = plot.getRangeAxis(); rAxis.setAutoRange(false); rAxis.setRange(new Range(-0.03, 1.03)); ValueAxis dAxis = plot.getDomainAxis(); dAxis.setLowerMargin(0.03); dAxis.setUpperMargin(0.03); ChartPanel chartPanel = new ChartPanel(chart, false, true, true, false, true); chartPanel.addChartMouseListener(new ValueFunctionMouseListener(chartPanel, criterion, parent)); chartPanel.setDomainZoomable(false); chartPanel.setRangeZoomable(false); chartPanel.setDisplayToolTips(true); chartPanel.setToolTipText("Click to add/remove partial value function points"); chartPanel.setMouseWheelEnabled(false); chartPanel.setMouseZoomable(false); plot.setDomainCrosshairLockedOnData(false); plot.setRangeCrosshairLockedOnData(false); plot.setDomainCrosshairVisible(true); plot.setRangeCrosshairVisible(true); FormLayout layout = new FormLayout("left:pref", "p, 3dlu, p"); PanelBuilder builder = new PanelBuilder(layout); CellConstraints cc = new CellConstraints(); builder.add(chartPanel, cc.xy(1, 1)); builder.add(new ValueFunctionPointsPanel(criterion), cc.xy(1, 3)); return builder.getPanel(); }