org.jfree.chart.event.MarkerChangeEvent Java Examples

The following examples show how to use org.jfree.chart.event.MarkerChangeEvent. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Marker.java    From ccu-historian with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Notifies all registered listeners that the marker has been modified.
 *
 * @param event  information about the change event.
 *
 * @since 1.0.3
 */
public void notifyListeners(MarkerChangeEvent event) {

    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == MarkerChangeListener.class) {
            ((MarkerChangeListener) listeners[i + 1]).markerChanged(event);
        }
    }

}
 
Example #2
Source File: Marker.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Notifies all registered listeners that the marker has been modified.
 *
 * @param event  information about the change event.
 * 
 * @since 1.0.3
 */
public void notifyListeners(MarkerChangeEvent event) {

    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == MarkerChangeListener.class) {
            ((MarkerChangeListener) listeners[i + 1]).markerChanged(event);
        }
    }

}
 
Example #3
Source File: Marker.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Notifies all registered listeners that the marker has been modified.
 *
 * @param event  information about the change event.
 *
 * @since 1.0.3
 */
public void notifyListeners(MarkerChangeEvent event) {

    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == MarkerChangeListener.class) {
            ((MarkerChangeListener) listeners[i + 1]).markerChanged(event);
        }
    }

}
 
Example #4
Source File: Marker.java    From SIMVA-SoS with Apache License 2.0 5 votes vote down vote up
/**
 * Notifies all registered listeners that the marker has been modified.
 *
 * @param event  information about the change event.
 *
 * @since 1.0.3
 */
public void notifyListeners(MarkerChangeEvent event) {

    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == MarkerChangeListener.class) {
            ((MarkerChangeListener) listeners[i + 1]).markerChanged(event);
        }
    }

}
 
Example #5
Source File: Marker.java    From opensim-gui with Apache License 2.0 3 votes vote down vote up
/**
 * Sets the label paint and sends a {@link MarkerChangeEvent} to all
 * registered listeners.
 *
 * @param paint  the paint (<code>null</code> not permitted).
 * 
 * @see #getLabelPaint()
 */
public void setLabelPaint(Paint paint) {
    if (paint == null) {
        throw new IllegalArgumentException("Null 'paint' argument.");
    }
    this.labelPaint = paint;
    notifyListeners(new MarkerChangeEvent(this));
}
 
Example #6
Source File: Marker.java    From astor with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Sets the label text anchor and sends a {@link MarkerChangeEvent} to
 * all registered listeners.
 *
 * @param anchor  the label text anchor (<code>null</code> not permitted).
 *
 * @see #getLabelTextAnchor()
 */
public void setLabelTextAnchor(TextAnchor anchor) {
    if (anchor == null) {
        throw new IllegalArgumentException("Null 'anchor' argument.");
    }
    this.labelTextAnchor = anchor;
    notifyListeners(new MarkerChangeEvent(this));
}
 
Example #7
Source File: Marker.java    From opensim-gui with Apache License 2.0 3 votes vote down vote up
/**
 * Sets the stroke and sends a {@link MarkerChangeEvent} to all registered
 * listeners.
 * 
 * @param stroke  the stroke (<code>null</code> not permitted).
 * 
 * @see #getStroke()
 */
public void setStroke(Stroke stroke) {
    if (stroke == null) {
        throw new IllegalArgumentException("Null 'stroke' argument.");
    }
    this.stroke = stroke;
    notifyListeners(new MarkerChangeEvent(this));
}
 
Example #8
Source File: Marker.java    From astor with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Sets the paint and sends a {@link MarkerChangeEvent} to all registered
 * listeners.
 *
 * @param paint  the paint (<code>null</code> not permitted).
 *
 * @see #getPaint()
 */
public void setPaint(Paint paint) {
    if (paint == null) {
        throw new IllegalArgumentException("Null 'paint' argument.");
    }
    this.paint = paint;
    notifyListeners(new MarkerChangeEvent(this));
}
 
Example #9
Source File: CategoryMarker.java    From astor with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Sets the key and sends a {@link MarkerChangeEvent} to all registered
 * listeners.
 *
 * @param key  the key (<code>null</code> not permitted).
 *
 * @since 1.0.3
 */
public void setKey(Comparable key) {
    if (key == null) {
        throw new IllegalArgumentException("Null 'key' argument.");
    }
    this.key = key;
    notifyListeners(new MarkerChangeEvent(this));
}
 
Example #10
Source File: Marker.java    From astor with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Sets the stroke and sends a {@link MarkerChangeEvent} to all registered
 * listeners.
 * 
 * @param stroke  the stroke (<code>null</code> not permitted).
 * 
 * @see #getStroke()
 */
public void setStroke(Stroke stroke) {
    if (stroke == null) {
        throw new IllegalArgumentException("Null 'stroke' argument.");
    }
    this.stroke = stroke;
    notifyListeners(new MarkerChangeEvent(this));
}
 
Example #11
Source File: Marker.java    From opensim-gui with Apache License 2.0 3 votes vote down vote up
/**
 * Sets the label offset type and sends a {@link MarkerChangeEvent} to all
 * registered listeners.
 * 
 * @param adj  the type (<code>null</code> not permitted).
 * 
 * @see #getLabelOffsetType()
 */
public void setLabelOffsetType(LengthAdjustmentType adj) {
    if (adj == null) {
        throw new IllegalArgumentException("Null 'adj' argument.");
    }
    this.labelOffsetType = adj;    
    notifyListeners(new MarkerChangeEvent(this));
}
 
Example #12
Source File: CategoryMarker.java    From astor with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Sets the key and sends a {@link MarkerChangeEvent} to all registered
 * listeners.
 * 
 * @param key  the key (<code>null</code> not permitted).
 * 
 * @since 1.0.3
 */
public void setKey(Comparable key) {
    if (key == null) {
        throw new IllegalArgumentException("Null 'key' argument.");
    }
    this.key = key;
    notifyListeners(new MarkerChangeEvent(this));
}
 
Example #13
Source File: Marker.java    From openstock with GNU General Public License v3.0 3 votes vote down vote up
/**
 * Sets the alpha transparency that should be used when drawing the
 * marker, and sends a {@link MarkerChangeEvent} to all registered
 * listeners.  The alpha transparency is a value in the range 0.0f
 * (completely transparent) to 1.0f (completely opaque).
 *
 * @param alpha  the alpha transparency (must be in the range 0.0f to
 *     1.0f).
 *
 * @throws IllegalArgumentException if {@code alpha} is not in the
 *     specified range.
 *
 * @see #getAlpha()
 */
public void setAlpha(float alpha) {
    if (alpha < 0.0f || alpha > 1.0f) {
        throw new IllegalArgumentException(
                "The 'alpha' value must be in the range 0.0f to 1.0f");
    }
    this.alpha = alpha;
    notifyListeners(new MarkerChangeEvent(this));
}
 
Example #14
Source File: Marker.java    From astor with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Sets the label paint and sends a {@link MarkerChangeEvent} to all
 * registered listeners.
 *
 * @param paint  the paint (<code>null</code> not permitted).
 *
 * @see #getLabelPaint()
 */
public void setLabelPaint(Paint paint) {
    if (paint == null) {
        throw new IllegalArgumentException("Null 'paint' argument.");
    }
    this.labelPaint = paint;
    notifyListeners(new MarkerChangeEvent(this));
}
 
Example #15
Source File: Marker.java    From astor with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Sets the label offset and sends a {@link MarkerChangeEvent} to all
 * registered listeners.
 *
 * @param offset  the label offset (<code>null</code> not permitted).
 *
 * @see #getLabelOffset()
 */
public void setLabelOffset(RectangleInsets offset) {
    if (offset == null) {
        throw new IllegalArgumentException("Null 'offset' argument.");
    }
    this.labelOffset = offset;
    notifyListeners(new MarkerChangeEvent(this));
}
 
Example #16
Source File: Marker.java    From opensim-gui with Apache License 2.0 3 votes vote down vote up
/**
 * Sets the paint and sends a {@link MarkerChangeEvent} to all registered
 * listeners.
 * 
 * @param paint  the paint (<code>null</code> not permitted).
 * 
 * @see #getPaint()
 */
public void setPaint(Paint paint) {
    if (paint == null) {
        throw new IllegalArgumentException("Null 'paint' argument.");
    }
    this.paint = paint;
    notifyListeners(new MarkerChangeEvent(this));
}
 
Example #17
Source File: Marker.java    From astor with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Sets the label offset type and sends a {@link MarkerChangeEvent} to all
 * registered listeners.
 *
 * @param adj  the type (<code>null</code> not permitted).
 *
 * @see #getLabelOffsetType()
 */
public void setLabelOffsetType(LengthAdjustmentType adj) {
    if (adj == null) {
        throw new IllegalArgumentException("Null 'adj' argument.");
    }
    this.labelOffsetType = adj;
    notifyListeners(new MarkerChangeEvent(this));
}
 
Example #18
Source File: Marker.java    From SIMVA-SoS with Apache License 2.0 3 votes vote down vote up
/**
 * Sets the alpha transparency that should be used when drawing the
 * marker, and sends a {@link MarkerChangeEvent} to all registered
 * listeners.  The alpha transparency is a value in the range 0.0f
 * (completely transparent) to 1.0f (completely opaque).
 *
 * @param alpha  the alpha transparency (must be in the range 0.0f to
 *     1.0f).
 *
 * @throws IllegalArgumentException if {@code alpha} is not in the
 *     specified range.
 *
 * @see #getAlpha()
 */
public void setAlpha(float alpha) {
    if (alpha < 0.0f || alpha > 1.0f) {
        throw new IllegalArgumentException(
                "The 'alpha' value must be in the range 0.0f to 1.0f");
    }
    this.alpha = alpha;
    notifyListeners(new MarkerChangeEvent(this));
}
 
Example #19
Source File: Marker.java    From astor with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Sets the alpha transparency that should be used when drawing the 
 * marker, and sends a {@link MarkerChangeEvent} to all registered 
 * listeners.  The alpha transparency is a value in the range 0.0f 
 * (completely transparent) to 1.0f (completely opaque).
 * 
 * @param alpha  the alpha transparency (must be in the range 0.0f to 
 *     1.0f).
 *     
 * @throws IllegalArgumentException if <code>alpha</code> is not in the
 *     specified range.
 *     
 * @see #getAlpha()
 */
public void setAlpha(float alpha) {
    if (alpha < 0.0f || alpha > 1.0f)
        throw new IllegalArgumentException(
                "The 'alpha' value must be in the range 0.0f to 1.0f");
    this.alpha = alpha;
    notifyListeners(new MarkerChangeEvent(this));
}
 
Example #20
Source File: Marker.java    From opensim-gui with Apache License 2.0 3 votes vote down vote up
/**
 * Sets the alpha transparency that should be used when drawing the 
 * marker, and sends a {@link MarkerChangeEvent} to all registered 
 * listeners.  The alpha transparency is a value in the range 0.0f 
 * (completely transparent) to 1.0f (completely opaque).
 * 
 * @param alpha  the alpha transparency (must be in the range 0.0f to 
 *     1.0f).
 *     
 * @throws IllegalArgumentException if <code>alpha</code> is not in the
 *     specified range.
 *     
 * @see #getAlpha()
 */
public void setAlpha(float alpha) {
    if (alpha < 0.0f || alpha > 1.0f)
        throw new IllegalArgumentException(
                "The 'alpha' value must be in the range 0.0f to 1.0f");
    this.alpha = alpha;
    notifyListeners(new MarkerChangeEvent(this));
}
 
Example #21
Source File: Marker.java    From opensim-gui with Apache License 2.0 3 votes vote down vote up
/**
 * Sets the label offset and sends a {@link MarkerChangeEvent} to all
 * registered listeners.
 * 
 * @param offset  the label offset (<code>null</code> not permitted).
 * 
 * @see #getLabelOffset()
 */
public void setLabelOffset(RectangleInsets offset) {
    if (offset == null) {
        throw new IllegalArgumentException("Null 'offset' argument.");
    }
    this.labelOffset = offset;
    notifyListeners(new MarkerChangeEvent(this));
}
 
Example #22
Source File: ValueMarkerTest.java    From ECG-Viewer with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Records the last event.
 *
 * @param event  the last event.
 */
@Override
public void markerChanged(MarkerChangeEvent event) {
    this.lastEvent = event;
}
 
Example #23
Source File: ValueMarkerTest.java    From SIMVA-SoS with Apache License 2.0 2 votes vote down vote up
/**
 * Records the last event.
 *
 * @param event  the last event.
 */
@Override
public void markerChanged(MarkerChangeEvent event) {
    this.lastEvent = event;
}
 
Example #24
Source File: Chart_20_ValueMarker_t.java    From coming with MIT License 2 votes vote down vote up
/**
 * Sets the value for the marker and sends a {@link MarkerChangeEvent} to 
 * all registered listeners.
 * 
 * @param value  the value.
 * 
 * @see #getValue()
 * 
 * @since 1.0.3
 */
public void setValue(double value) { 
    this.value = value;
    notifyListeners(new MarkerChangeEvent(this));
}
 
Example #25
Source File: ValueMarker.java    From astor with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Sets the value for the marker and sends a {@link MarkerChangeEvent} to 
 * all registered listeners.
 * 
 * @param value  the value.
 * 
 * @see #getValue()
 * 
 * @since 1.0.3
 */
public void setValue(double value) { 
    this.value = value;
    notifyListeners(new MarkerChangeEvent(this));
}
 
Example #26
Source File: Marker.java    From ccu-historian with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Sets the label anchor and sends a {@link MarkerChangeEvent} to all
 * registered listeners.  The anchor defines the position of the label
 * anchor, relative to the bounds of the marker.
 *
 * @param anchor  the anchor ({@code null} not permitted).
 *
 * @see #getLabelAnchor()
 */
public void setLabelAnchor(RectangleAnchor anchor) {
    ParamChecks.nullNotPermitted(anchor, "anchor");
    this.labelAnchor = anchor;
    notifyListeners(new MarkerChangeEvent(this));
}
 
Example #27
Source File: CategoryMarker.java    From ECG-Viewer with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Sets the flag that controls whether the marker is drawn as a region or
 * as a line, and sends a {@link MarkerChangeEvent} to all registered
 * listeners.
 *
 * @param drawAsLine  the flag.
 */
public void setDrawAsLine(boolean drawAsLine) {
    this.drawAsLine = drawAsLine;
    notifyListeners(new MarkerChangeEvent(this));
}
 
Example #28
Source File: Marker.java    From SIMVA-SoS with Apache License 2.0 2 votes vote down vote up
/**
 * Sets the stroke and sends a {@link MarkerChangeEvent} to all registered
 * listeners.
 *
 * @param stroke  the stroke ({@code null}not permitted).
 *
 * @see #getStroke()
 */
public void setStroke(Stroke stroke) {
    ParamChecks.nullNotPermitted(stroke, "stroke");
    this.stroke = stroke;
    notifyListeners(new MarkerChangeEvent(this));
}
 
Example #29
Source File: Marker.java    From ECG-Viewer with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Sets the label offset type and sends a {@link MarkerChangeEvent} to all
 * registered listeners.
 *
 * @param adj  the type ({@code null} not permitted).
 *
 * @see #getLabelOffsetType()
 */
public void setLabelOffsetType(LengthAdjustmentType adj) {
    ParamChecks.nullNotPermitted(adj, "adj");
    this.labelOffsetType = adj;
    notifyListeners(new MarkerChangeEvent(this));
}
 
Example #30
Source File: IntervalMarker.java    From ccu-historian with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Sets the start value for the marker and sends a
 * {@link MarkerChangeEvent} to all registered listeners.
 *
 * @param value  the value.
 *
 * @since 1.0.3
 */
public void setStartValue(double value) {
    this.startValue = value;
    notifyListeners(new MarkerChangeEvent(this));
}