Java 类org.jfree.chart.axis.ColorBar 实例源码

项目:parabuild-ci    文件:ColorBarTests.java   
/**
 * Check that the equals() method can distinguish all fields.
 */
public void testEquals() {
    ColorBar c1 = new ColorBar("Test");
    ColorBar c2 = new ColorBar("Test");
    assertEquals(c1, c2);

    c1.setAxis(new NumberAxis("Axis 1"));
    assertTrue(!c1.equals(c2));
    c2.setAxis(new NumberAxis("Axis 1"));
    assertTrue(c1.equals(c2));

    c1.setColorPalette(new GreyPalette());
    assertTrue(!c1.equals(c2));
    c2.setColorPalette(new GreyPalette());
    assertTrue(c1.equals(c2));
}
项目:nabs    文件:ColorBarTests.java   
/**
 * Check that the equals() method can distinguish all fields.
 */
public void testEquals() {
    ColorBar c1 = new ColorBar("Test");
    ColorBar c2 = new ColorBar("Test");
    assertEquals(c1, c2);

    c1.setAxis(new NumberAxis("Axis 1"));
    assertTrue(!c1.equals(c2));
    c2.setAxis(new NumberAxis("Axis 1"));
    assertTrue(c1.equals(c2));

    c1.setColorPalette(new GreyPalette());
    assertTrue(!c1.equals(c2));
    c2.setColorPalette(new GreyPalette());
    assertTrue(c1.equals(c2));
}
项目:parabuild-ci    文件:ContourPlot.java   
/**
 * Constructs a contour plot with the specified axes (other attributes take default values).
 *
 * @param dataset  The dataset.
 * @param domainAxis  The domain axis.
 * @param rangeAxis  The range axis.
 * @param colorBar  The z-axis axis.
*/
public ContourPlot(ContourDataset dataset,
                   ValueAxis domainAxis, ValueAxis rangeAxis, ColorBar colorBar) {

    super();

    this.dataset = dataset;
    if (dataset != null) {
        dataset.addChangeListener(this);
    }

    this.domainAxis = domainAxis;
    if (domainAxis != null) {
        domainAxis.setPlot(this);
        domainAxis.addChangeListener(this);
    }

    this.rangeAxis = rangeAxis;
    if (rangeAxis != null) {
        rangeAxis.setPlot(this);
        rangeAxis.addChangeListener(this);
    }

    this.colorBar = colorBar;
    if (colorBar != null) {
        colorBar.getAxis().setPlot(this);
        colorBar.getAxis().addChangeListener(this);
        colorBar.configure(this);
    }
    this.colorBarLocation = RectangleEdge.LEFT;

    this.toolTipGenerator = new StandardContourToolTipGenerator();

}
项目:parabuild-ci    文件:ContourPlot.java   
/**
 * Receives notification of a change to one of the plot's axes.
 *
 * @param event  information about the event.
 */
public void axisChanged(AxisChangeEvent event) {
    Object source = event.getSource();
    if (source.equals(this.rangeAxis) || source.equals(this.domainAxis)) {
        ColorBar cba = this.colorBar;
        if (this.colorBar.getAxis().isAutoRange()) {
            cba.getAxis().configure();
        }

    }
    super.axisChanged(event);
}
项目:parabuild-ci    文件:ColorBarPropertyEditPanel.java   
/**
 * Sets the properties of the specified axis to match the properties defined on this panel.
 * 
 * @param colorBar  the color bar.
 */
public void setAxisProperties(ColorBar colorBar) {
    super.setAxisProperties(colorBar.getAxis());
    colorBar.setColorPalette(this.currentPalette.getPalette());
    colorBar.getColorPalette().setInverse(this.invertPalette); //dmo added
    colorBar.getColorPalette().setStepped(this.stepPalette); //dmo added
}
项目:parabuild-ci    文件:ColorBarPropertyEditPanel.java   
/**
 * A static method that returns a panel that is appropriate for the axis
 * type.
 *
 * @param colorBar  the color bar.
 *
 * @return a panel or <code>null</code< if axis is <code>null</code>.
 */
public static ColorBarPropertyEditPanel getInstance(ColorBar colorBar) {

    if (colorBar != null) {
        return new ColorBarPropertyEditPanel(colorBar);
    }
    else {
        return null;
    }

}
项目:parabuild-ci    文件:ColorBarTests.java   
/**
 * Two objects that are equal are required to return the same hashCode. 
 */
public void testHashCode() {
    ColorBar c1 = new ColorBar("Test");
    ColorBar c2 = new ColorBar("Test");
    assertTrue(c1.equals(c2));
    int h1 = c1.hashCode();
    int h2 = c2.hashCode();
    assertEquals(h1, h2);
}
项目:parabuild-ci    文件:ContourPlot.java   
/**
 * Constructs a contour plot with the specified axes (other attributes take
 * default values).
 *
 * @param dataset  The dataset.
 * @param domainAxis  The domain axis.
 * @param rangeAxis  The range axis.
 * @param colorBar  The z-axis axis.
*/
public ContourPlot(ContourDataset dataset,
                   ValueAxis domainAxis, ValueAxis rangeAxis, 
                   ColorBar colorBar) {

    super();

    this.dataset = dataset;
    if (dataset != null) {
        dataset.addChangeListener(this);
    }

    this.domainAxis = domainAxis;
    if (domainAxis != null) {
        domainAxis.setPlot(this);
        domainAxis.addChangeListener(this);
    }

    this.rangeAxis = rangeAxis;
    if (rangeAxis != null) {
        rangeAxis.setPlot(this);
        rangeAxis.addChangeListener(this);
    }

    this.colorBar = colorBar;
    if (colorBar != null) {
        colorBar.getAxis().setPlot(this);
        colorBar.getAxis().addChangeListener(this);
        colorBar.configure(this);
    }
    this.colorBarLocation = RectangleEdge.LEFT;

    this.toolTipGenerator = new StandardContourToolTipGenerator();

}
项目:parabuild-ci    文件:ContourPlot.java   
/**
 * Receives notification of a change to one of the plot's axes.
 *
 * @param event  information about the event.
 */
public void axisChanged(AxisChangeEvent event) {
    Object source = event.getSource();
    if (source.equals(this.rangeAxis) || source.equals(this.domainAxis)) {
        ColorBar cba = this.colorBar;
        if (this.colorBar.getAxis().isAutoRange()) {
            cba.getAxis().configure();
        }

    }
    super.axisChanged(event);
}
项目:parabuild-ci    文件:DefaultColorBarEditor.java   
/**
 * Sets the properties of the specified axis to match the properties 
 * defined on this panel.
 * 
 * @param colorBar  the color bar.
 */
public void setAxisProperties(ColorBar colorBar) {
    super.setAxisProperties(colorBar.getAxis());
    colorBar.setColorPalette(this.currentPalette.getPalette());
    colorBar.getColorPalette().setInverse(this.invertPalette); //dmo added
    colorBar.getColorPalette().setStepped(this.stepPalette); //dmo added
}
项目:parabuild-ci    文件:DefaultColorBarEditor.java   
/**
 * A static method that returns a panel that is appropriate for the axis
 * type.
 *
 * @param colorBar  the color bar.
 *
 * @return A panel or <code>null</code< if axis is <code>null</code>.
 */
public static DefaultColorBarEditor getInstance(ColorBar colorBar) {

    if (colorBar != null) {
        return new DefaultColorBarEditor(colorBar);
    }
    else {
        return null;
    }

}
项目:ccu-historian    文件:ContourPlot.java   
/**
 * Constructs a contour plot with the specified axes (other attributes take
 * default values).
 *
 * @param dataset  The dataset.
 * @param domainAxis  The domain axis.
 * @param rangeAxis  The range axis.
 * @param colorBar  The z-axis axis.
*/
public ContourPlot(ContourDataset dataset,
                   ValueAxis domainAxis, ValueAxis rangeAxis,
                   ColorBar colorBar) {

    super();

    this.dataset = dataset;
    if (dataset != null) {
        dataset.addChangeListener(this);
    }

    this.domainAxis = domainAxis;
    if (domainAxis != null) {
        domainAxis.setPlot(this);
        domainAxis.addChangeListener(this);
    }

    this.rangeAxis = rangeAxis;
    if (rangeAxis != null) {
        rangeAxis.setPlot(this);
        rangeAxis.addChangeListener(this);
    }

    this.colorBar = colorBar;
    if (colorBar != null) {
        colorBar.getAxis().setPlot(this);
        colorBar.getAxis().addChangeListener(this);
        colorBar.configure(this);
    }
    this.colorBarLocation = RectangleEdge.LEFT;

    this.toolTipGenerator = new StandardContourToolTipGenerator();

}
项目:ccu-historian    文件:ContourPlot.java   
/**
 * Receives notification of a change to one of the plot's axes.
 *
 * @param event  information about the event.
 */
@Override
public void axisChanged(AxisChangeEvent event) {
    Object source = event.getSource();
    if (source.equals(this.rangeAxis) || source.equals(this.domainAxis)) {
        ColorBar cba = this.colorBar;
        if (this.colorBar.getAxis().isAutoRange()) {
            cba.getAxis().configure();
        }

    }
    super.axisChanged(event);
}
项目:ccu-historian    文件:DefaultColorBarEditor.java   
/**
 * Sets the properties of the specified axis to match the properties
 * defined on this panel.
 *
 * @param colorBar  the color bar.
 */
public void setAxisProperties(ColorBar colorBar) {
    super.setAxisProperties(colorBar.getAxis());
    colorBar.setColorPalette(this.currentPalette.getPalette());
    colorBar.getColorPalette().setInverse(this.invertPalette); //dmo added
    colorBar.getColorPalette().setStepped(this.stepPalette); //dmo added
}
项目:ccu-historian    文件:DefaultColorBarEditor.java   
/**
 * A static method that returns a panel that is appropriate for the axis
 * type.
 *
 * @param colorBar  the color bar.
 *
 * @return A panel or <code>null</code< if axis is <code>null</code>.
 */
public static DefaultColorBarEditor getInstance(ColorBar colorBar) {

    if (colorBar != null) {
        return new DefaultColorBarEditor(colorBar);
    }
    else {
        return null;
    }

}
项目:aya-lang    文件:ContourPlot.java   
/**
 * Constructs a contour plot with the specified axes (other attributes take
 * default values).
 *
 * @param dataset  The dataset.
 * @param domainAxis  The domain axis.
 * @param rangeAxis  The range axis.
 * @param colorBar  The z-axis axis.
*/
public ContourPlot(ContourDataset dataset,
                   ValueAxis domainAxis, ValueAxis rangeAxis,
                   ColorBar colorBar) {

    super();

    this.dataset = dataset;
    if (dataset != null) {
        dataset.addChangeListener(this);
    }

    this.domainAxis = domainAxis;
    if (domainAxis != null) {
        domainAxis.setPlot(this);
        domainAxis.addChangeListener(this);
    }

    this.rangeAxis = rangeAxis;
    if (rangeAxis != null) {
        rangeAxis.setPlot(this);
        rangeAxis.addChangeListener(this);
    }

    this.colorBar = colorBar;
    if (colorBar != null) {
        colorBar.getAxis().setPlot(this);
        colorBar.getAxis().addChangeListener(this);
        colorBar.configure(this);
    }
    this.colorBarLocation = RectangleEdge.LEFT;

    this.toolTipGenerator = new StandardContourToolTipGenerator();

}
项目:aya-lang    文件:ContourPlot.java   
/**
 * Receives notification of a change to one of the plot's axes.
 *
 * @param event  information about the event.
 */
@Override
public void axisChanged(AxisChangeEvent event) {
    Object source = event.getSource();
    if (source.equals(this.rangeAxis) || source.equals(this.domainAxis)) {
        ColorBar cba = this.colorBar;
        if (this.colorBar.getAxis().isAutoRange()) {
            cba.getAxis().configure();
        }

    }
    super.axisChanged(event);
}
项目:aya-lang    文件:DefaultColorBarEditor.java   
/**
 * Sets the properties of the specified axis to match the properties
 * defined on this panel.
 *
 * @param colorBar  the color bar.
 */
public void setAxisProperties(ColorBar colorBar) {
    super.setAxisProperties(colorBar.getAxis());
    colorBar.setColorPalette(this.currentPalette.getPalette());
    colorBar.getColorPalette().setInverse(this.invertPalette); //dmo added
    colorBar.getColorPalette().setStepped(this.stepPalette); //dmo added
}
项目:aya-lang    文件:DefaultColorBarEditor.java   
/**
 * A static method that returns a panel that is appropriate for the axis
 * type.
 *
 * @param colorBar  the color bar.
 *
 * @return A panel or <code>null</code< if axis is <code>null</code>.
 */
public static DefaultColorBarEditor getInstance(ColorBar colorBar) {

    if (colorBar != null) {
        return new DefaultColorBarEditor(colorBar);
    }
    else {
        return null;
    }

}
项目:HTML5_WebSite    文件:ContourPlot.java   
/**
 * Constructs a contour plot with the specified axes (other attributes take
 * default values).
 *
 * @param dataset  The dataset.
 * @param domainAxis  The domain axis.
 * @param rangeAxis  The range axis.
 * @param colorBar  The z-axis axis.
*/
public ContourPlot(ContourDataset dataset,
                   ValueAxis domainAxis, ValueAxis rangeAxis,
                   ColorBar colorBar) {

    super();

    this.dataset = dataset;
    if (dataset != null) {
        dataset.addChangeListener(this);
    }

    this.domainAxis = domainAxis;
    if (domainAxis != null) {
        domainAxis.setPlot(this);
        domainAxis.addChangeListener(this);
    }

    this.rangeAxis = rangeAxis;
    if (rangeAxis != null) {
        rangeAxis.setPlot(this);
        rangeAxis.addChangeListener(this);
    }

    this.colorBar = colorBar;
    if (colorBar != null) {
        colorBar.getAxis().setPlot(this);
        colorBar.getAxis().addChangeListener(this);
        colorBar.configure(this);
    }
    this.colorBarLocation = RectangleEdge.LEFT;

    this.toolTipGenerator = new StandardContourToolTipGenerator();

}
项目:HTML5_WebSite    文件:ContourPlot.java   
/**
 * Receives notification of a change to one of the plot's axes.
 *
 * @param event  information about the event.
 */
public void axisChanged(AxisChangeEvent event) {
    Object source = event.getSource();
    if (source.equals(this.rangeAxis) || source.equals(this.domainAxis)) {
        ColorBar cba = this.colorBar;
        if (this.colorBar.getAxis().isAutoRange()) {
            cba.getAxis().configure();
        }

    }
    super.axisChanged(event);
}
项目:HTML5_WebSite    文件:DefaultColorBarEditor.java   
/**
 * Sets the properties of the specified axis to match the properties
 * defined on this panel.
 *
 * @param colorBar  the color bar.
 */
public void setAxisProperties(ColorBar colorBar) {
    super.setAxisProperties(colorBar.getAxis());
    colorBar.setColorPalette(this.currentPalette.getPalette());
    colorBar.getColorPalette().setInverse(this.invertPalette); //dmo added
    colorBar.getColorPalette().setStepped(this.stepPalette); //dmo added
}
项目:HTML5_WebSite    文件:DefaultColorBarEditor.java   
/**
 * A static method that returns a panel that is appropriate for the axis
 * type.
 *
 * @param colorBar  the color bar.
 *
 * @return A panel or <code>null</code< if axis is <code>null</code>.
 */
public static DefaultColorBarEditor getInstance(ColorBar colorBar) {

    if (colorBar != null) {
        return new DefaultColorBarEditor(colorBar);
    }
    else {
        return null;
    }

}
项目:populus    文件:ContourPlot.java   
/**
 * Constructs a contour plot with the specified axes (other attributes take
 * default values).
 *
 * @param dataset  The dataset.
 * @param domainAxis  The domain axis.
 * @param rangeAxis  The range axis.
 * @param colorBar  The z-axis axis.
*/
public ContourPlot(ContourDataset dataset,
                   ValueAxis domainAxis, ValueAxis rangeAxis,
                   ColorBar colorBar) {

    super();

    this.dataset = dataset;
    if (dataset != null) {
        dataset.addChangeListener(this);
    }

    this.domainAxis = domainAxis;
    if (domainAxis != null) {
        domainAxis.setPlot(this);
        domainAxis.addChangeListener(this);
    }

    this.rangeAxis = rangeAxis;
    if (rangeAxis != null) {
        rangeAxis.setPlot(this);
        rangeAxis.addChangeListener(this);
    }

    this.colorBar = colorBar;
    if (colorBar != null) {
        colorBar.getAxis().setPlot(this);
        colorBar.getAxis().addChangeListener(this);
        colorBar.configure(this);
    }
    this.colorBarLocation = RectangleEdge.LEFT;

    this.toolTipGenerator = new StandardContourToolTipGenerator();

}
项目:populus    文件:ContourPlot.java   
/**
 * Receives notification of a change to one of the plot's axes.
 *
 * @param event  information about the event.
 */
@Override
public void axisChanged(AxisChangeEvent event) {
    Object source = event.getSource();
    if (source.equals(this.rangeAxis) || source.equals(this.domainAxis)) {
        ColorBar cba = this.colorBar;
        if (this.colorBar.getAxis().isAutoRange()) {
            cba.getAxis().configure();
        }

    }
    super.axisChanged(event);
}
项目:populus    文件:DefaultColorBarEditor.java   
/**
 * Sets the properties of the specified axis to match the properties
 * defined on this panel.
 *
 * @param colorBar  the color bar.
 */
public void setAxisProperties(ColorBar colorBar) {
    super.setAxisProperties(colorBar.getAxis());
    colorBar.setColorPalette(this.currentPalette.getPalette());
    colorBar.getColorPalette().setInverse(this.invertPalette); //dmo added
    colorBar.getColorPalette().setStepped(this.stepPalette); //dmo added
}
项目:populus    文件:DefaultColorBarEditor.java   
/**
 * A static method that returns a panel that is appropriate for the axis
 * type.
 *
 * @param colorBar  the color bar.
 *
 * @return A panel or <code>null</code< if axis is <code>null</code>.
 */
public static DefaultColorBarEditor getInstance(ColorBar colorBar) {

    if (colorBar != null) {
        return new DefaultColorBarEditor(colorBar);
    }
    else {
        return null;
    }

}
项目:PI    文件:ContourPlot.java   
/**
 * Constructs a contour plot with the specified axes (other attributes take
 * default values).
 *
 * @param dataset  The dataset.
 * @param domainAxis  The domain axis.
 * @param rangeAxis  The range axis.
 * @param colorBar  The z-axis axis.
*/
public ContourPlot(ContourDataset dataset,
                   ValueAxis domainAxis, ValueAxis rangeAxis,
                   ColorBar colorBar) {

    super();

    this.dataset = dataset;
    if (dataset != null) {
        dataset.addChangeListener(this);
    }

    this.domainAxis = domainAxis;
    if (domainAxis != null) {
        domainAxis.setPlot(this);
        domainAxis.addChangeListener(this);
    }

    this.rangeAxis = rangeAxis;
    if (rangeAxis != null) {
        rangeAxis.setPlot(this);
        rangeAxis.addChangeListener(this);
    }

    this.colorBar = colorBar;
    if (colorBar != null) {
        colorBar.getAxis().setPlot(this);
        colorBar.getAxis().addChangeListener(this);
        colorBar.configure(this);
    }
    this.colorBarLocation = RectangleEdge.LEFT;

    this.toolTipGenerator = new StandardContourToolTipGenerator();

}
项目:PI    文件:ContourPlot.java   
/**
 * Receives notification of a change to one of the plot's axes.
 *
 * @param event  information about the event.
 */
public void axisChanged(AxisChangeEvent event) {
    Object source = event.getSource();
    if (source.equals(this.rangeAxis) || source.equals(this.domainAxis)) {
        ColorBar cba = this.colorBar;
        if (this.colorBar.getAxis().isAutoRange()) {
            cba.getAxis().configure();
        }

    }
    super.axisChanged(event);
}
项目:PI    文件:DefaultColorBarEditor.java   
/**
 * Sets the properties of the specified axis to match the properties
 * defined on this panel.
 *
 * @param colorBar  the color bar.
 */
public void setAxisProperties(ColorBar colorBar) {
    super.setAxisProperties(colorBar.getAxis());
    colorBar.setColorPalette(this.currentPalette.getPalette());
    colorBar.getColorPalette().setInverse(this.invertPalette); //dmo added
    colorBar.getColorPalette().setStepped(this.stepPalette); //dmo added
}
项目:PI    文件:DefaultColorBarEditor.java   
/**
 * A static method that returns a panel that is appropriate for the axis
 * type.
 *
 * @param colorBar  the color bar.
 *
 * @return A panel or <code>null</code< if axis is <code>null</code>.
 */
public static DefaultColorBarEditor getInstance(ColorBar colorBar) {

    if (colorBar != null) {
        return new DefaultColorBarEditor(colorBar);
    }
    else {
        return null;
    }

}
项目:nabs    文件:ColorBarTests.java   
/**
 * Two objects that are equal are required to return the same hashCode. 
 */
public void testHashCode() {
    ColorBar c1 = new ColorBar("Test");
    ColorBar c2 = new ColorBar("Test");
    assertTrue(c1.equals(c2));
    int h1 = c1.hashCode();
    int h2 = c2.hashCode();
    assertEquals(h1, h2);
}
项目:nabs    文件:ContourPlot.java   
/**
 * Constructs a contour plot with the specified axes (other attributes take
 * default values).
 *
 * @param dataset  The dataset.
 * @param domainAxis  The domain axis.
 * @param rangeAxis  The range axis.
 * @param colorBar  The z-axis axis.
*/
public ContourPlot(ContourDataset dataset,
                   ValueAxis domainAxis, ValueAxis rangeAxis, 
                   ColorBar colorBar) {

    super();

    this.dataset = dataset;
    if (dataset != null) {
        dataset.addChangeListener(this);
    }

    this.domainAxis = domainAxis;
    if (domainAxis != null) {
        domainAxis.setPlot(this);
        domainAxis.addChangeListener(this);
    }

    this.rangeAxis = rangeAxis;
    if (rangeAxis != null) {
        rangeAxis.setPlot(this);
        rangeAxis.addChangeListener(this);
    }

    this.colorBar = colorBar;
    if (colorBar != null) {
        colorBar.getAxis().setPlot(this);
        colorBar.getAxis().addChangeListener(this);
        colorBar.configure(this);
    }
    this.colorBarLocation = RectangleEdge.LEFT;

    this.toolTipGenerator = new StandardContourToolTipGenerator();

}
项目:nabs    文件:ContourPlot.java   
/**
 * Receives notification of a change to one of the plot's axes.
 *
 * @param event  information about the event.
 */
public void axisChanged(AxisChangeEvent event) {
    Object source = event.getSource();
    if (source.equals(this.rangeAxis) || source.equals(this.domainAxis)) {
        ColorBar cba = this.colorBar;
        if (this.colorBar.getAxis().isAutoRange()) {
            cba.getAxis().configure();
        }

    }
    super.axisChanged(event);
}
项目:nabs    文件:DefaultColorBarEditor.java   
/**
 * Sets the properties of the specified axis to match the properties 
 * defined on this panel.
 * 
 * @param colorBar  the color bar.
 */
public void setAxisProperties(ColorBar colorBar) {
    super.setAxisProperties(colorBar.getAxis());
    colorBar.setColorPalette(this.currentPalette.getPalette());
    colorBar.getColorPalette().setInverse(this.invertPalette); //dmo added
    colorBar.getColorPalette().setStepped(this.stepPalette); //dmo added
}
项目:nabs    文件:DefaultColorBarEditor.java   
/**
 * A static method that returns a panel that is appropriate for the axis
 * type.
 *
 * @param colorBar  the color bar.
 *
 * @return A panel or <code>null</code< if axis is <code>null</code>.
 */
public static DefaultColorBarEditor getInstance(ColorBar colorBar) {

    if (colorBar != null) {
        return new DefaultColorBarEditor(colorBar);
    }
    else {
        return null;
    }

}
项目:ECG-Viewer    文件:ContourPlot.java   
/**
 * Constructs a contour plot with the specified axes (other attributes take
 * default values).
 *
 * @param dataset  The dataset.
 * @param domainAxis  The domain axis.
 * @param rangeAxis  The range axis.
 * @param colorBar  The z-axis axis.
*/
public ContourPlot(ContourDataset dataset,
                   ValueAxis domainAxis, ValueAxis rangeAxis,
                   ColorBar colorBar) {

    super();

    this.dataset = dataset;
    if (dataset != null) {
        dataset.addChangeListener(this);
    }

    this.domainAxis = domainAxis;
    if (domainAxis != null) {
        domainAxis.setPlot(this);
        domainAxis.addChangeListener(this);
    }

    this.rangeAxis = rangeAxis;
    if (rangeAxis != null) {
        rangeAxis.setPlot(this);
        rangeAxis.addChangeListener(this);
    }

    this.colorBar = colorBar;
    if (colorBar != null) {
        colorBar.getAxis().setPlot(this);
        colorBar.getAxis().addChangeListener(this);
        colorBar.configure(this);
    }
    this.colorBarLocation = RectangleEdge.LEFT;

    this.toolTipGenerator = new StandardContourToolTipGenerator();

}
项目:ECG-Viewer    文件:ContourPlot.java   
/**
 * Receives notification of a change to one of the plot's axes.
 *
 * @param event  information about the event.
 */
@Override
public void axisChanged(AxisChangeEvent event) {
    Object source = event.getSource();
    if (source.equals(this.rangeAxis) || source.equals(this.domainAxis)) {
        ColorBar cba = this.colorBar;
        if (this.colorBar.getAxis().isAutoRange()) {
            cba.getAxis().configure();
        }

    }
    super.axisChanged(event);
}
项目:ECG-Viewer    文件:DefaultColorBarEditor.java   
/**
 * Sets the properties of the specified axis to match the properties
 * defined on this panel.
 *
 * @param colorBar  the color bar.
 */
public void setAxisProperties(ColorBar colorBar) {
    super.setAxisProperties(colorBar.getAxis());
    colorBar.setColorPalette(this.currentPalette.getPalette());
    colorBar.getColorPalette().setInverse(this.invertPalette); //dmo added
    colorBar.getColorPalette().setStepped(this.stepPalette); //dmo added
}
项目:ECG-Viewer    文件:DefaultColorBarEditor.java   
/**
 * A static method that returns a panel that is appropriate for the axis
 * type.
 *
 * @param colorBar  the color bar.
 *
 * @return A panel or <code>null</code< if axis is <code>null</code>.
 */
public static DefaultColorBarEditor getInstance(ColorBar colorBar) {

    if (colorBar != null) {
        return new DefaultColorBarEditor(colorBar);
    }
    else {
        return null;
    }

}