Example usage for org.jfree.chart.event AxisChangeEvent AxisChangeEvent

List of usage examples for org.jfree.chart.event AxisChangeEvent AxisChangeEvent

Introduction

In this page you can find the example usage for org.jfree.chart.event AxisChangeEvent AxisChangeEvent.

Prototype

public AxisChangeEvent(Axis axis) 

Source Link

Document

Creates a new AxisChangeEvent.

Usage

From source file:edu.gmu.cs.sim.util.media.chart.BarChartGenerator.java

/** Sets the name of the Y Axis label. */
public void setYAxisLabel(String val) {
    CategoryPlot xyplot = (CategoryPlot) (chart.getPlot());
    xyplot.getRangeAxis().setLabel(val);
    xyplot.axisChanged(new AxisChangeEvent(xyplot.getRangeAxis()));
    yLabel.setValue(val);
}

From source file:edu.gmu.cs.sim.util.media.chart.BarChartGenerator.java

/** Sets the name of the X Axis label. */
public void setXAxisLabel(String val) {
    CategoryPlot xyplot = (CategoryPlot) (chart.getPlot());
    xyplot.getDomainAxis().setLabel(val);
    xyplot.axisChanged(new AxisChangeEvent(xyplot.getDomainAxis()));
    xLabel.setValue(val);
}

From source file:edu.gmu.cs.sim.util.media.chart.XYChartGenerator.java

/** Sets the name of the Y Axis label. */
public void setYAxisLabel(String val) {
    XYPlot xyplot = (XYPlot) (chart.getPlot());
    xyplot.getRangeAxis().setLabel(val);
    xyplot.axisChanged(new AxisChangeEvent(xyplot.getRangeAxis()));
    yLabel.setValue(val);
}

From source file:edu.gmu.cs.sim.util.media.chart.XYChartGenerator.java

/** Sets the name of the X Axis label. */
public void setXAxisLabel(String val) {
    XYPlot xyplot = (XYPlot) (chart.getPlot());
    xyplot.getDomainAxis().setLabel(val);
    xyplot.axisChanged(new AxisChangeEvent(xyplot.getDomainAxis()));
    xLabel.setValue(val);
}

From source file:gda.plots.SimpleNumberAxis.java

/**
 * Overrides the superclass method so that an AxisChangeEvent is sent when data is added (needed to make
 * dependentXAxis work)./* www.jav  a 2  s .co m*/
 */
@Override
protected void autoAdjustRange() {
    super.autoAdjustRange();
    notifyListeners(new AxisChangeEvent(this));
}

From source file:org.jfree.experimental.chart.axis.LogAxis.java

/**
 * Sets the base for the logarithm calculation and sends an 
 * {@link AxisChangeEvent} to all registered listeners.
 * //from w  ww .  j av  a  2 s.c  o m
 * @param base  the base value (must be > 1.0).
 */
public void setBase(double base) {
    if (base <= 1.0) {
        throw new IllegalArgumentException("Requires 'base' > 1.0.");
    }
    this.base = base;
    this.baseLog = Math.log(base);
    notifyListeners(new AxisChangeEvent(this));
}

From source file:org.jfree.experimental.chart.axis.LogAxis.java

/**
 * Sets the tick unit for the axis and, if requested, sends an 
 * {@link AxisChangeEvent} to all registered listeners.  In addition, an 
 * option is provided to turn off the "auto-select" feature for tick units 
 * (you can restore it using the //  w  w  w  .  ja  v a2s  .co m
 * {@link ValueAxis#setAutoTickUnitSelection(boolean)} method).
 *
 * @param unit  the new tick unit (<code>null</code> not permitted).
 * @param notify  notify listeners?
 * @param turnOffAutoSelect  turn off the auto-tick selection?
 */
public void setTickUnit(NumberTickUnit unit, boolean notify, boolean turnOffAutoSelect) {

    if (unit == null) {
        throw new IllegalArgumentException("Null 'unit' argument.");
    }
    this.tickUnit = unit;
    if (turnOffAutoSelect) {
        setAutoTickUnitSelection(false, false);
    }
    if (notify) {
        notifyListeners(new AxisChangeEvent(this));
    }

}

From source file:org.jfree.experimental.chart.axis.LogAxis.java

/**
 * Sets the number format override.  If this is non-null, then it will be 
 * used to format the numbers on the axis.
 *
 * @param formatter  the number formatter (<code>null</code> permitted).
 *///from   ww w  . ja  v  a  2 s  .  c om
public void setNumberFormatOverride(NumberFormat formatter) {
    this.numberFormatOverride = formatter;
    notifyListeners(new AxisChangeEvent(this));
}

From source file:org.jfree.experimental.chart.axis.LogAxis.java

/**
 * Sets the number of minor tick marks to display.
 * //from  ww w .j a  va  2s  .  co m
 * @param count  the count.
 */
public void setMinorTickCount(int count) {
    if (count <= 0) {
        throw new IllegalArgumentException("Requires 'count' > 0.");
    }
    this.minorTickCount = count;
    notifyListeners(new AxisChangeEvent(this));
}

From source file:org.gumtree.vis.plot1d.LogarithmizableAxis.java

@Override
protected void setAutoRange(boolean auto, boolean notify) {
    if (isAutoRange() == auto) {
        if (auto) {
            autoAdjustRange();//from  w  ww .j a va 2 s. c om
        }
        if (notify) {
            notifyListeners(new AxisChangeEvent(this));
        }
    } else {
        super.setAutoRange(auto, notify);
    }
}