Java 类org.jfree.chart.annotations.CategoryAnnotation 实例源码

项目:astor    文件:AbstractCategoryItemRenderer.java   
/**
 * Adds an annotation to the specified layer.
 *
 * @param annotation  the annotation (<code>null</code> not permitted).
 * @param layer  the layer (<code>null</code> not permitted).
 *
 * @since 1.2.0
 */
public void addAnnotation(CategoryAnnotation annotation, Layer layer) {
    if (annotation == null) {
        throw new IllegalArgumentException("Null 'annotation' argument.");
    }
    if (layer.equals(Layer.FOREGROUND)) {
        this.foregroundAnnotations.add(annotation);
        notifyListeners(new RendererChangeEvent(this));
    }
    else if (layer.equals(Layer.BACKGROUND)) {
        this.backgroundAnnotations.add(annotation);
        notifyListeners(new RendererChangeEvent(this));
    }
    else {
        // should never get here
        throw new RuntimeException("Unknown layer.");
    }
}
项目:astor    文件:AbstractCategoryItemRenderer.java   
/**
 * Draws all the annotations for the specified layer.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param domainAxis  the domain axis.
 * @param rangeAxis  the range axis.
 * @param layer  the layer.
 * @param info  the plot rendering info.
 *
 * @since 1.2.0
 */
public void drawAnnotations(Graphics2D g2, Rectangle2D dataArea,
        CategoryAxis domainAxis, ValueAxis rangeAxis, Layer layer,
        PlotRenderingInfo info) {

    Iterator iterator = null;
    if (layer.equals(Layer.FOREGROUND)) {
        iterator = this.foregroundAnnotations.iterator();
    }
    else if (layer.equals(Layer.BACKGROUND)) {
        iterator = this.backgroundAnnotations.iterator();
    }
    else {
        // should not get here
        throw new RuntimeException("Unknown layer.");
    }
    while (iterator.hasNext()) {
        CategoryAnnotation annotation = (CategoryAnnotation) iterator.next();
        annotation.draw(g2, this.plot, dataArea, domainAxis, rangeAxis,
                0, info);
    }

}
项目:parabuild-ci    文件:CategoryPlot.java   
/**
 * Adds an annotation to the plot.
 *
 * @param annotation  the annotation.
 */
public void addAnnotation(CategoryAnnotation annotation) {

    if (this.annotations == null) {
        this.annotations = new java.util.ArrayList();
    }
    this.annotations.add(annotation);
    notifyListeners(new PlotChangeEvent(this));

}
项目:parabuild-ci    文件:CategoryPlot.java   
/**
 * Draws the annotations...
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 */
protected void drawAnnotations(Graphics2D g2, Rectangle2D dataArea) {

    if (getAnnotations() != null) {
        Iterator iterator = getAnnotations().iterator();
        while (iterator.hasNext()) {
            CategoryAnnotation annotation = (CategoryAnnotation) iterator.next();
            annotation.draw(g2, this, dataArea, getDomainAxis(), getRangeAxis());
        }
    }

}
项目:parabuild-ci    文件:CategoryPlot.java   
/**
 * Removes an annotation from the plot and sends a {@link PlotChangeEvent}
 * to all registered listeners.
 *
 * @param annotation  the annotation (<code>null</code> not permitted).
 *
 * @return A boolean (indicates whether or not the annotation was removed).
 * 
 * @see #addAnnotation(CategoryAnnotation)
 */
public boolean removeAnnotation(CategoryAnnotation annotation) {
    if (annotation == null) {
        throw new IllegalArgumentException("Null 'annotation' argument.");
    }
    boolean removed = this.annotations.remove(annotation);
    if (removed) {
        notifyListeners(new PlotChangeEvent(this));
    }
    return removed;
}
项目:parabuild-ci    文件:CategoryPlot.java   
/**
 * Draws the annotations...
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 */
protected void drawAnnotations(Graphics2D g2, Rectangle2D dataArea) {

    if (getAnnotations() != null) {
        Iterator iterator = getAnnotations().iterator();
        while (iterator.hasNext()) {
            CategoryAnnotation annotation 
                    = (CategoryAnnotation) iterator.next();
            annotation.draw(g2, this, dataArea, getDomainAxis(), 
                    getRangeAxis());
        }
    }

}
项目:ccu-historian    文件:CategoryPlot.java   
/**
 * Clears all the annotations and sends a {@link PlotChangeEvent} to all
 * registered listeners.
 */
public void clearAnnotations() {
    for (int i = 0; i < this.annotations.size(); i++) {
        CategoryAnnotation annotation
                = (CategoryAnnotation) this.annotations.get(i);
        annotation.removeChangeListener(this);
    }
    this.annotations.clear();
    fireChangeEvent();
}
项目:ccu-historian    文件:CategoryPlot.java   
/**
 * Draws the annotations.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 */
protected void drawAnnotations(Graphics2D g2, Rectangle2D dataArea) {

    if (getAnnotations() != null) {
        Iterator iterator = getAnnotations().iterator();
        while (iterator.hasNext()) {
            CategoryAnnotation annotation
                    = (CategoryAnnotation) iterator.next();
            annotation.draw(g2, this, dataArea, getDomainAxis(),
                    getRangeAxis());
        }
    }

}
项目:jfreechart    文件:CategoryPlot.java   
/**
 * Clears all the annotations and sends a {@link PlotChangeEvent} to all
 * registered listeners.
 */
public void clearAnnotations() {
    for (int i = 0; i < this.annotations.size(); i++) {
        CategoryAnnotation annotation
                = (CategoryAnnotation) this.annotations.get(i);
        annotation.removeChangeListener(this);
    }
    this.annotations.clear();
    fireChangeEvent();
}
项目:jfreechart    文件:CategoryPlot.java   
/**
 * Draws the annotations.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 */
protected void drawAnnotations(Graphics2D g2, Rectangle2D dataArea) {

    if (getAnnotations() != null) {
        Iterator iterator = getAnnotations().iterator();
        while (iterator.hasNext()) {
            CategoryAnnotation annotation
                    = (CategoryAnnotation) iterator.next();
            annotation.draw(g2, this, dataArea, getDomainAxis(),
                    getRangeAxis());
        }
    }

}
项目:aya-lang    文件:CategoryPlot.java   
/**
 * Clears all the annotations and sends a {@link PlotChangeEvent} to all
 * registered listeners.
 */
public void clearAnnotations() {
    for (int i = 0; i < this.annotations.size(); i++) {
        CategoryAnnotation annotation
                = (CategoryAnnotation) this.annotations.get(i);
        annotation.removeChangeListener(this);
    }
    this.annotations.clear();
    fireChangeEvent();
}
项目:aya-lang    文件:CategoryPlot.java   
/**
 * Draws the annotations.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 */
protected void drawAnnotations(Graphics2D g2, Rectangle2D dataArea) {

    if (getAnnotations() != null) {
        Iterator iterator = getAnnotations().iterator();
        while (iterator.hasNext()) {
            CategoryAnnotation annotation
                    = (CategoryAnnotation) iterator.next();
            annotation.draw(g2, this, dataArea, getDomainAxis(),
                    getRangeAxis());
        }
    }

}
项目:HTML5_WebSite    文件:CategoryPlot.java   
/**
 * Adds an annotation to the plot and, if requested, sends a
 * {@link PlotChangeEvent} to all registered listeners.
 *
 * @param annotation  the annotation (<code>null</code> not permitted).
 * @param notify  notify listeners?
 *
 * @since 1.0.10
 */
public void addAnnotation(CategoryAnnotation annotation, boolean notify) {
    if (annotation == null) {
        throw new IllegalArgumentException("Null 'annotation' argument.");
    }
    this.annotations.add(annotation);
    if (notify) {
        fireChangeEvent();
    }
}
项目:HTML5_WebSite    文件:CategoryPlot.java   
/**
 * Removes an annotation from the plot and, if requested, sends a
 * {@link PlotChangeEvent} to all registered listeners.
 *
 * @param annotation  the annotation (<code>null</code> not permitted).
 * @param notify  notify listeners?
 *
 * @return A boolean (indicates whether or not the annotation was removed).
 *
 * @since 1.0.10
 */
public boolean removeAnnotation(CategoryAnnotation annotation,
        boolean notify) {
    if (annotation == null) {
        throw new IllegalArgumentException("Null 'annotation' argument.");
    }
    boolean removed = this.annotations.remove(annotation);
    if (removed && notify) {
        fireChangeEvent();
    }
    return removed;
}
项目:HTML5_WebSite    文件:CategoryPlot.java   
/**
 * Draws the annotations.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 */
protected void drawAnnotations(Graphics2D g2, Rectangle2D dataArea) {

    if (getAnnotations() != null) {
        Iterator iterator = getAnnotations().iterator();
        while (iterator.hasNext()) {
            CategoryAnnotation annotation
                    = (CategoryAnnotation) iterator.next();
            annotation.draw(g2, this, dataArea, getDomainAxis(),
                    getRangeAxis());
        }
    }

}
项目:populus    文件:CategoryPlot.java   
/**
 * Clears all the annotations and sends a {@link PlotChangeEvent} to all
 * registered listeners.
 */
public void clearAnnotations() {
    for (int i = 0; i < this.annotations.size(); i++) {
        CategoryAnnotation annotation
                = (CategoryAnnotation) this.annotations.get(i);
        annotation.removeChangeListener(this);
    }
    this.annotations.clear();
    fireChangeEvent();
}
项目:populus    文件:CategoryPlot.java   
/**
 * Draws the annotations.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 */
protected void drawAnnotations(Graphics2D g2, Rectangle2D dataArea) {

    if (getAnnotations() != null) {
        Iterator iterator = getAnnotations().iterator();
        while (iterator.hasNext()) {
            CategoryAnnotation annotation
                    = (CategoryAnnotation) iterator.next();
            annotation.draw(g2, this, dataArea, getDomainAxis(),
                    getRangeAxis());
        }
    }

}
项目:PI    文件:CategoryPlot.java   
/**
 * Adds an annotation to the plot and, if requested, sends a
 * {@link PlotChangeEvent} to all registered listeners.
 *
 * @param annotation  the annotation (<code>null</code> not permitted).
 * @param notify  notify listeners?
 *
 * @since 1.0.10
 */
public void addAnnotation(CategoryAnnotation annotation, boolean notify) {
    if (annotation == null) {
        throw new IllegalArgumentException("Null 'annotation' argument.");
    }
    this.annotations.add(annotation);
    if (notify) {
        fireChangeEvent();
    }
}
项目:PI    文件:CategoryPlot.java   
/**
 * Removes an annotation from the plot and, if requested, sends a
 * {@link PlotChangeEvent} to all registered listeners.
 *
 * @param annotation  the annotation (<code>null</code> not permitted).
 * @param notify  notify listeners?
 *
 * @return A boolean (indicates whether or not the annotation was removed).
 *
 * @since 1.0.10
 */
public boolean removeAnnotation(CategoryAnnotation annotation,
        boolean notify) {
    if (annotation == null) {
        throw new IllegalArgumentException("Null 'annotation' argument.");
    }
    boolean removed = this.annotations.remove(annotation);
    if (removed && notify) {
        fireChangeEvent();
    }
    return removed;
}
项目:PI    文件:CategoryPlot.java   
/**
 * Draws the annotations.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 */
protected void drawAnnotations(Graphics2D g2, Rectangle2D dataArea) {

    if (getAnnotations() != null) {
        Iterator iterator = getAnnotations().iterator();
        while (iterator.hasNext()) {
            CategoryAnnotation annotation
                    = (CategoryAnnotation) iterator.next();
            annotation.draw(g2, this, dataArea, getDomainAxis(),
                    getRangeAxis());
        }
    }

}
项目:nabs    文件:CategoryPlot.java   
/**
 * Removes an annotation from the plot and sends a {@link PlotChangeEvent}
 * to all registered listeners.
 *
 * @param annotation  the annotation (<code>null</code> not permitted).
 *
 * @return A boolean (indicates whether or not the annotation was removed).
 * 
 * @see #addAnnotation(CategoryAnnotation)
 */
public boolean removeAnnotation(CategoryAnnotation annotation) {
    if (annotation == null) {
        throw new IllegalArgumentException("Null 'annotation' argument.");
    }
    boolean removed = this.annotations.remove(annotation);
    if (removed) {
        notifyListeners(new PlotChangeEvent(this));
    }
    return removed;
}
项目:nabs    文件:CategoryPlot.java   
/**
 * Draws the annotations...
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 */
protected void drawAnnotations(Graphics2D g2, Rectangle2D dataArea) {

    if (getAnnotations() != null) {
        Iterator iterator = getAnnotations().iterator();
        while (iterator.hasNext()) {
            CategoryAnnotation annotation 
                    = (CategoryAnnotation) iterator.next();
            annotation.draw(g2, this, dataArea, getDomainAxis(), 
                    getRangeAxis());
        }
    }

}
项目:ECG-Viewer    文件:CategoryPlot.java   
/**
 * Clears all the annotations and sends a {@link PlotChangeEvent} to all
 * registered listeners.
 */
public void clearAnnotations() {
    for (int i = 0; i < this.annotations.size(); i++) {
        CategoryAnnotation annotation
                = (CategoryAnnotation) this.annotations.get(i);
        annotation.removeChangeListener(this);
    }
    this.annotations.clear();
    fireChangeEvent();
}
项目:ECG-Viewer    文件:CategoryPlot.java   
/**
 * Draws the annotations.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 */
protected void drawAnnotations(Graphics2D g2, Rectangle2D dataArea) {

    if (getAnnotations() != null) {
        Iterator iterator = getAnnotations().iterator();
        while (iterator.hasNext()) {
            CategoryAnnotation annotation
                    = (CategoryAnnotation) iterator.next();
            annotation.draw(g2, this, dataArea, getDomainAxis(),
                    getRangeAxis());
        }
    }

}
项目:astor    文件:CategoryPlot.java   
/**
 * Adds an annotation to the plot and, if requested, sends a
 * {@link PlotChangeEvent} to all registered listeners.
 *
 * @param annotation  the annotation (<code>null</code> not permitted).
 * @param notify  notify listeners?
 *
 * @since 1.0.10
 */
public void addAnnotation(CategoryAnnotation annotation, boolean notify) {
    if (annotation == null) {
        throw new IllegalArgumentException("Null 'annotation' argument.");
    }
    this.annotations.add(annotation);
    annotation.addChangeListener(this);
    if (notify) {
        fireChangeEvent();
    }
}
项目:astor    文件:CategoryPlot.java   
/**
 * Removes an annotation from the plot and, if requested, sends a
 * {@link PlotChangeEvent} to all registered listeners.
 *
 * @param annotation  the annotation (<code>null</code> not permitted).
 * @param notify  notify listeners?
 *
 * @return A boolean (indicates whether or not the annotation was removed).
 *
 * @since 1.0.10
 */
public boolean removeAnnotation(CategoryAnnotation annotation,
        boolean notify) {
    if (annotation == null) {
        throw new IllegalArgumentException("Null 'annotation' argument.");
    }
    boolean removed = this.annotations.remove(annotation);
    annotation.removeChangeListener(this);
    if (removed && notify) {
        fireChangeEvent();
    }
    return removed;
}
项目:astor    文件:CategoryPlot.java   
/**
 * Clears all the annotations and sends a {@link PlotChangeEvent} to all
 * registered listeners.
 */
public void clearAnnotations() {
    for(int i = 0; i < this.annotations.size(); i++) {
        CategoryAnnotation annotation
                = (CategoryAnnotation) this.annotations.get(i);
        annotation.removeChangeListener(this);
    }
    this.annotations.clear();
    fireChangeEvent();
}
项目:astor    文件:CategoryPlot.java   
/**
 * Draws the annotations.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param info  the plot rendering info (<code>null</code> permitted).
 */
protected void drawAnnotations(Graphics2D g2, Rectangle2D dataArea,
        PlotRenderingInfo info) {

    Iterator iterator = getAnnotations().iterator();
    while (iterator.hasNext()) {
        CategoryAnnotation annotation
                = (CategoryAnnotation) iterator.next();
        annotation.draw(g2, this, dataArea, getDomainAxis(),
                getRangeAxis(), 0, info);
    }

}
项目:opensim-gui    文件:CategoryPlot.java   
/**
 * Adds an annotation to the plot and sends a {@link PlotChangeEvent} to all
 * registered listeners.
 *
 * @param annotation  the annotation (<code>null</code> not permitted).
 */
public void addAnnotation(CategoryAnnotation annotation) {
    if (annotation == null) {
        throw new IllegalArgumentException("Null 'annotation' argument.");   
    }
    this.annotations.add(annotation);
    notifyListeners(new PlotChangeEvent(this));
}
项目:opensim-gui    文件:CategoryPlot.java   
/**
 * Removes an annotation from the plot and sends a {@link PlotChangeEvent}
 * to all registered listeners.
 *
 * @param annotation  the annotation (<code>null</code> not permitted).
 *
 * @return A boolean (indicates whether or not the annotation was removed).
 */
public boolean removeAnnotation(CategoryAnnotation annotation) {
    if (annotation == null) {
        throw new IllegalArgumentException("Null 'annotation' argument.");
    }
    boolean removed = this.annotations.remove(annotation);
    if (removed) {
        notifyListeners(new PlotChangeEvent(this));
    }
    return removed;
}
项目:opensim-gui    文件:CategoryPlot.java   
/**
 * Draws the annotations...
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 */
protected void drawAnnotations(Graphics2D g2, Rectangle2D dataArea) {

    if (getAnnotations() != null) {
        Iterator iterator = getAnnotations().iterator();
        while (iterator.hasNext()) {
            CategoryAnnotation annotation 
                = (CategoryAnnotation) iterator.next();
            annotation.draw(g2, this, dataArea, getDomainAxis(), 
                    getRangeAxis());
        }
    }

}
项目:group-five    文件:CategoryPlot.java   
/**
 * Clears all the annotations and sends a {@link PlotChangeEvent} to all
 * registered listeners.
 */
public void clearAnnotations() {
    for (int i = 0; i < this.annotations.size(); i++) {
        CategoryAnnotation annotation
                = (CategoryAnnotation) this.annotations.get(i);
        annotation.removeChangeListener(this);
    }
    this.annotations.clear();
    fireChangeEvent();
}
项目:group-five    文件:CategoryPlot.java   
/**
 * Draws the annotations.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 */
protected void drawAnnotations(Graphics2D g2, Rectangle2D dataArea) {

    if (getAnnotations() != null) {
        Iterator iterator = getAnnotations().iterator();
        while (iterator.hasNext()) {
            CategoryAnnotation annotation
                    = (CategoryAnnotation) iterator.next();
            annotation.draw(g2, this, dataArea, getDomainAxis(),
                    getRangeAxis());
        }
    }

}
项目:manydesigns.cn    文件:CategoryPlot.java   
/**
 * Clears all the annotations and sends a {@link PlotChangeEvent} to all
 * registered listeners.
 */
public void clearAnnotations() {
    for(int i = 0; i < this.annotations.size(); i++) {
        CategoryAnnotation annotation
                = (CategoryAnnotation) this.annotations.get(i);
        annotation.removeChangeListener(this);
    }
    this.annotations.clear();
    fireChangeEvent();
}
项目:manydesigns.cn    文件:CategoryPlot.java   
/**
 * Draws the annotations.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 */
protected void drawAnnotations(Graphics2D g2, Rectangle2D dataArea) {

    if (getAnnotations() != null) {
        Iterator iterator = getAnnotations().iterator();
        while (iterator.hasNext()) {
            CategoryAnnotation annotation
                    = (CategoryAnnotation) iterator.next();
            annotation.draw(g2, this, dataArea, getDomainAxis(),
                    getRangeAxis());
        }
    }

}
项目:buffer_bci    文件:CategoryPlot.java   
/**
 * Clears all the annotations and sends a {@link PlotChangeEvent} to all
 * registered listeners.
 */
public void clearAnnotations() {
    for (int i = 0; i < this.annotations.size(); i++) {
        CategoryAnnotation annotation
                = (CategoryAnnotation) this.annotations.get(i);
        annotation.removeChangeListener(this);
    }
    this.annotations.clear();
    fireChangeEvent();
}
项目:buffer_bci    文件:CategoryPlot.java   
/**
 * Draws the annotations.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 */
protected void drawAnnotations(Graphics2D g2, Rectangle2D dataArea) {

    if (getAnnotations() != null) {
        Iterator iterator = getAnnotations().iterator();
        while (iterator.hasNext()) {
            CategoryAnnotation annotation
                    = (CategoryAnnotation) iterator.next();
            annotation.draw(g2, this, dataArea, getDomainAxis(),
                    getRangeAxis());
        }
    }

}
项目:buffer_bci    文件:CategoryPlot.java   
/**
 * Clears all the annotations and sends a {@link PlotChangeEvent} to all
 * registered listeners.
 */
public void clearAnnotations() {
    for (int i = 0; i < this.annotations.size(); i++) {
        CategoryAnnotation annotation
                = (CategoryAnnotation) this.annotations.get(i);
        annotation.removeChangeListener(this);
    }
    this.annotations.clear();
    fireChangeEvent();
}
项目:buffer_bci    文件:CategoryPlot.java   
/**
 * Draws the annotations.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 */
protected void drawAnnotations(Graphics2D g2, Rectangle2D dataArea) {

    if (getAnnotations() != null) {
        Iterator iterator = getAnnotations().iterator();
        while (iterator.hasNext()) {
            CategoryAnnotation annotation
                    = (CategoryAnnotation) iterator.next();
            annotation.draw(g2, this, dataArea, getDomainAxis(),
                    getRangeAxis());
        }
    }

}
项目:proyecto-teoria-control-utn-frro    文件:CategoryPlot.java   
/**
 * Clears all the annotations and sends a {@link PlotChangeEvent} to all
 * registered listeners.
 */
public void clearAnnotations() {
    for(int i = 0; i < this.annotations.size(); i++) {
        CategoryAnnotation annotation
                = (CategoryAnnotation) this.annotations.get(i);
        annotation.removeChangeListener(this);
    }
    this.annotations.clear();
    fireChangeEvent();
}