/** * Configures the color bar. * * @param plot the plot. */ public void configure(ContourPlot plot) { double minZ = plot.getDataset().getMinZValue(); double maxZ = plot.getDataset().getMaxZValue(); setMinimumValue(minZ); setMaximumValue(maxZ); }
protected JTabbedPane createPlotTabs(Plot plot) { JTabbedPane tabs = new JTabbedPane(); tabs.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5)); Axis domainAxis = null; if (plot instanceof CategoryPlot) { domainAxis = ((CategoryPlot) plot).getDomainAxis(); } else if (plot instanceof XYPlot) { domainAxis = ((XYPlot) plot).getDomainAxis(); } this.domainAxisPropertyPanel = DefaultAxisEditor.getInstance( domainAxis); if (this.domainAxisPropertyPanel != null) { this.domainAxisPropertyPanel.setBorder( BorderFactory.createEmptyBorder(2, 2, 2, 2)); tabs.add(localizationResources.getString("Domain_Axis"), this.domainAxisPropertyPanel); } Axis rangeAxis = null; if (plot instanceof CategoryPlot) { rangeAxis = ((CategoryPlot) plot).getRangeAxis(); } else if (plot instanceof XYPlot) { rangeAxis = ((XYPlot) plot).getRangeAxis(); } else if (plot instanceof PolarPlot) { rangeAxis = ((PolarPlot) plot).getAxis(); } this.rangeAxisPropertyPanel = DefaultAxisEditor.getInstance(rangeAxis); if (this.rangeAxisPropertyPanel != null) { this.rangeAxisPropertyPanel.setBorder( BorderFactory.createEmptyBorder(2, 2, 2, 2)); tabs.add(localizationResources.getString("Range_Axis"), this.rangeAxisPropertyPanel); } //dmo: added this panel for colorbar control. (start dmo additions) ColorBar colorBar = null; if (plot instanceof ContourPlot) { colorBar = ((ContourPlot) plot).getColorBar(); } this.colorBarAxisPropertyPanel = DefaultColorBarEditor.getInstance( colorBar); if (this.colorBarAxisPropertyPanel != null) { this.colorBarAxisPropertyPanel.setBorder( BorderFactory.createEmptyBorder(2, 2, 2, 2)); tabs.add(localizationResources.getString("Color_Bar"), this.colorBarAxisPropertyPanel); } //dmo: (end dmo additions) return tabs; }