Java Code Examples for java.awt.RenderingHints#VALUE_ANTIALIAS_DEFAULT

The following examples show how to use java.awt.RenderingHints#VALUE_ANTIALIAS_DEFAULT . 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: JGenProg2017_00127_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * Sets a flag that indicates whether or not anti-aliasing is used when the
 * chart is drawn.
 * <P>
 * Anti-aliasing usually improves the appearance of charts, but is slower.
 *
 * @param flag  the new value of the flag.
 * 
 * @see #getAntiAlias()
 */
public void setAntiAlias(boolean flag) {

    Object val = this.renderingHints.get(RenderingHints.KEY_ANTIALIASING);
    if (val == null) {
        val = RenderingHints.VALUE_ANTIALIAS_DEFAULT;
    }
    if (!flag && RenderingHints.VALUE_ANTIALIAS_OFF.equals(val) 
        || flag && RenderingHints.VALUE_ANTIALIAS_ON.equals(val)) {
        // no change, do nothing
        return;
    }
    if (flag) {
        this.renderingHints.put(RenderingHints.KEY_ANTIALIASING, 
                                RenderingHints.VALUE_ANTIALIAS_ON);
    }
    else {
        this.renderingHints.put(RenderingHints.KEY_ANTIALIASING, 
                                RenderingHints.VALUE_ANTIALIAS_OFF);
    }
    fireChartChanged();

}
 
Example 2
Source File: JGenProg2017_00127_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * Sets a flag that indicates whether or not anti-aliasing is used when the
 * chart is drawn.
 * <P>
 * Anti-aliasing usually improves the appearance of charts, but is slower.
 *
 * @param flag  the new value of the flag.
 * 
 * @see #getAntiAlias()
 */
public void setAntiAlias(boolean flag) {

    Object val = this.renderingHints.get(RenderingHints.KEY_ANTIALIASING);
    if (val == null) {
        val = RenderingHints.VALUE_ANTIALIAS_DEFAULT;
    }
    if (!flag && RenderingHints.VALUE_ANTIALIAS_OFF.equals(val) 
        || flag && RenderingHints.VALUE_ANTIALIAS_ON.equals(val)) {
        // no change, do nothing
        return;
    }
    if (flag) {
        this.renderingHints.put(RenderingHints.KEY_ANTIALIASING, 
                                RenderingHints.VALUE_ANTIALIAS_ON);
    }
    else {
        this.renderingHints.put(RenderingHints.KEY_ANTIALIASING, 
                                RenderingHints.VALUE_ANTIALIAS_OFF);
    }
    fireChartChanged();

}
 
Example 3
Source File: JGenProg2017_003_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * Sets a flag that indicates whether or not anti-aliasing is used when the
 * chart is drawn.
 * <P>
 * Anti-aliasing usually improves the appearance of charts, but is slower.
 *
 * @param flag  the new value of the flag.
 * 
 * @see #getAntiAlias()
 */
public void setAntiAlias(boolean flag) {

    Object val = this.renderingHints.get(RenderingHints.KEY_ANTIALIASING);
    if (val == null) {
        val = RenderingHints.VALUE_ANTIALIAS_DEFAULT;
    }
    if (!flag && RenderingHints.VALUE_ANTIALIAS_OFF.equals(val) 
        || flag && RenderingHints.VALUE_ANTIALIAS_ON.equals(val)) {
        // no change, do nothing
        return;
    }
    if (flag) {
        this.renderingHints.put(RenderingHints.KEY_ANTIALIASING, 
                                RenderingHints.VALUE_ANTIALIAS_ON);
    }
    else {
        this.renderingHints.put(RenderingHints.KEY_ANTIALIASING, 
                                RenderingHints.VALUE_ANTIALIAS_OFF);
    }
    fireChartChanged();

}
 
Example 4
Source File: JGenProg2017_003_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * Sets a flag that indicates whether or not anti-aliasing is used when the
 * chart is drawn.
 * <P>
 * Anti-aliasing usually improves the appearance of charts, but is slower.
 *
 * @param flag  the new value of the flag.
 * 
 * @see #getAntiAlias()
 */
public void setAntiAlias(boolean flag) {

    Object val = this.renderingHints.get(RenderingHints.KEY_ANTIALIASING);
    if (val == null) {
        val = RenderingHints.VALUE_ANTIALIAS_DEFAULT;
    }
    if (!flag && RenderingHints.VALUE_ANTIALIAS_OFF.equals(val) 
        || flag && RenderingHints.VALUE_ANTIALIAS_ON.equals(val)) {
        // no change, do nothing
        return;
    }
    if (flag) {
        this.renderingHints.put(RenderingHints.KEY_ANTIALIASING, 
                                RenderingHints.VALUE_ANTIALIAS_ON);
    }
    else {
        this.renderingHints.put(RenderingHints.KEY_ANTIALIASING, 
                                RenderingHints.VALUE_ANTIALIAS_OFF);
    }
    fireChartChanged();

}
 
Example 5
Source File: JGenProg2017_00104_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * Sets a flag that indicates whether or not anti-aliasing is used when the
 * chart is drawn.
 * <P>
 * Anti-aliasing usually improves the appearance of charts, but is slower.
 *
 * @param flag  the new value of the flag.
 * 
 * @see #getAntiAlias()
 */
public void setAntiAlias(boolean flag) {

    Object val = this.renderingHints.get(RenderingHints.KEY_ANTIALIASING);
    if (val == null) {
        val = RenderingHints.VALUE_ANTIALIAS_DEFAULT;
    }
    if (!flag && RenderingHints.VALUE_ANTIALIAS_OFF.equals(val) 
        || flag && RenderingHints.VALUE_ANTIALIAS_ON.equals(val)) {
        // no change, do nothing
        return;
    }
    if (flag) {
        this.renderingHints.put(RenderingHints.KEY_ANTIALIASING, 
                                RenderingHints.VALUE_ANTIALIAS_ON);
    }
    else {
        this.renderingHints.put(RenderingHints.KEY_ANTIALIASING, 
                                RenderingHints.VALUE_ANTIALIAS_OFF);
    }
    fireChartChanged();

}
 
Example 6
Source File: JGenProg2017_00104_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * Sets a flag that indicates whether or not anti-aliasing is used when the
 * chart is drawn.
 * <P>
 * Anti-aliasing usually improves the appearance of charts, but is slower.
 *
 * @param flag  the new value of the flag.
 * 
 * @see #getAntiAlias()
 */
public void setAntiAlias(boolean flag) {

    Object val = this.renderingHints.get(RenderingHints.KEY_ANTIALIASING);
    if (val == null) {
        val = RenderingHints.VALUE_ANTIALIAS_DEFAULT;
    }
    if (!flag && RenderingHints.VALUE_ANTIALIAS_OFF.equals(val) 
        || flag && RenderingHints.VALUE_ANTIALIAS_ON.equals(val)) {
        // no change, do nothing
        return;
    }
    if (flag) {
        this.renderingHints.put(RenderingHints.KEY_ANTIALIASING, 
                                RenderingHints.VALUE_ANTIALIAS_ON);
    }
    else {
        this.renderingHints.put(RenderingHints.KEY_ANTIALIASING, 
                                RenderingHints.VALUE_ANTIALIAS_OFF);
    }
    fireChartChanged();

}
 
Example 7
Source File: JGenProg2017_00106_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * Sets a flag that indicates whether or not anti-aliasing is used when the
 * chart is drawn.
 * <P>
 * Anti-aliasing usually improves the appearance of charts, but is slower.
 *
 * @param flag  the new value of the flag.
 * 
 * @see #getAntiAlias()
 */
public void setAntiAlias(boolean flag) {

    Object val = this.renderingHints.get(RenderingHints.KEY_ANTIALIASING);
    if (val == null) {
        val = RenderingHints.VALUE_ANTIALIAS_DEFAULT;
    }
    if (!flag && RenderingHints.VALUE_ANTIALIAS_OFF.equals(val) 
        || flag && RenderingHints.VALUE_ANTIALIAS_ON.equals(val)) {
        // no change, do nothing
        return;
    }
    if (flag) {
        this.renderingHints.put(RenderingHints.KEY_ANTIALIASING, 
                                RenderingHints.VALUE_ANTIALIAS_ON);
    }
    else {
        this.renderingHints.put(RenderingHints.KEY_ANTIALIASING, 
                                RenderingHints.VALUE_ANTIALIAS_OFF);
    }
    fireChartChanged();

}
 
Example 8
Source File: JGenProg2017_00106_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * Sets a flag that indicates whether or not anti-aliasing is used when the
 * chart is drawn.
 * <P>
 * Anti-aliasing usually improves the appearance of charts, but is slower.
 *
 * @param flag  the new value of the flag.
 * 
 * @see #getAntiAlias()
 */
public void setAntiAlias(boolean flag) {

    Object val = this.renderingHints.get(RenderingHints.KEY_ANTIALIASING);
    if (val == null) {
        val = RenderingHints.VALUE_ANTIALIAS_DEFAULT;
    }
    if (!flag && RenderingHints.VALUE_ANTIALIAS_OFF.equals(val) 
        || flag && RenderingHints.VALUE_ANTIALIAS_ON.equals(val)) {
        // no change, do nothing
        return;
    }
    if (flag) {
        this.renderingHints.put(RenderingHints.KEY_ANTIALIASING, 
                                RenderingHints.VALUE_ANTIALIAS_ON);
    }
    else {
        this.renderingHints.put(RenderingHints.KEY_ANTIALIASING, 
                                RenderingHints.VALUE_ANTIALIAS_OFF);
    }
    fireChartChanged();

}
 
Example 9
Source File: Cardumen_003_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * Sets a flag that indicates whether or not anti-aliasing is used when the
 * chart is drawn.
 * <P>
 * Anti-aliasing usually improves the appearance of charts, but is slower.
 *
 * @param flag  the new value of the flag.
 * 
 * @see #getAntiAlias()
 */
public void setAntiAlias(boolean flag) {

    Object val = this.renderingHints.get(RenderingHints.KEY_ANTIALIASING);
    if (val == null) {
        val = RenderingHints.VALUE_ANTIALIAS_DEFAULT;
    }
    if (!flag && RenderingHints.VALUE_ANTIALIAS_OFF.equals(val) 
        || flag && RenderingHints.VALUE_ANTIALIAS_ON.equals(val)) {
        // no change, do nothing
        return;
    }
    if (flag) {
        this.renderingHints.put(RenderingHints.KEY_ANTIALIASING, 
                                RenderingHints.VALUE_ANTIALIAS_ON);
    }
    else {
        this.renderingHints.put(RenderingHints.KEY_ANTIALIASING, 
                                RenderingHints.VALUE_ANTIALIAS_OFF);
    }
    fireChartChanged();

}
 
Example 10
Source File: Cardumen_003_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * Sets a flag that indicates whether or not anti-aliasing is used when the
 * chart is drawn.
 * <P>
 * Anti-aliasing usually improves the appearance of charts, but is slower.
 *
 * @param flag  the new value of the flag.
 * 
 * @see #getAntiAlias()
 */
public void setAntiAlias(boolean flag) {

    Object val = this.renderingHints.get(RenderingHints.KEY_ANTIALIASING);
    if (val == null) {
        val = RenderingHints.VALUE_ANTIALIAS_DEFAULT;
    }
    if (!flag && RenderingHints.VALUE_ANTIALIAS_OFF.equals(val) 
        || flag && RenderingHints.VALUE_ANTIALIAS_ON.equals(val)) {
        // no change, do nothing
        return;
    }
    if (flag) {
        this.renderingHints.put(RenderingHints.KEY_ANTIALIASING, 
                                RenderingHints.VALUE_ANTIALIAS_ON);
    }
    else {
        this.renderingHints.put(RenderingHints.KEY_ANTIALIASING, 
                                RenderingHints.VALUE_ANTIALIAS_OFF);
    }
    fireChartChanged();

}
 
Example 11
Source File: JGenProg2015_000_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * Sets a flag that indicates whether or not anti-aliasing is used when the
 * chart is drawn.
 * <P>
 * Anti-aliasing usually improves the appearance of charts, but is slower.
 *
 * @param flag  the new value of the flag.
 * 
 * @see #getAntiAlias()
 */
public void setAntiAlias(boolean flag) {

    Object val = this.renderingHints.get(RenderingHints.KEY_ANTIALIASING);
    if (val == null) {
        val = RenderingHints.VALUE_ANTIALIAS_DEFAULT;
    }
    if (!flag && RenderingHints.VALUE_ANTIALIAS_OFF.equals(val) 
        || flag && RenderingHints.VALUE_ANTIALIAS_ON.equals(val)) {
        // no change, do nothing
        return;
    }
    if (flag) {
        this.renderingHints.put(RenderingHints.KEY_ANTIALIASING, 
                                RenderingHints.VALUE_ANTIALIAS_ON);
    }
    else {
        this.renderingHints.put(RenderingHints.KEY_ANTIALIASING, 
                                RenderingHints.VALUE_ANTIALIAS_OFF);
    }
    fireChartChanged();

}
 
Example 12
Source File: JFreeChart.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Sets a flag that indicates whether or not anti-aliasing is used when the
 * chart is drawn.
 * <P>
 * Anti-aliasing usually improves the appearance of charts, but is slower.
 *
 * @param flag  the new value of the flag.
 * 
 * @see #getAntiAlias()
 */
public void setAntiAlias(boolean flag) {

    Object val = this.renderingHints.get(RenderingHints.KEY_ANTIALIASING);
    if (val == null) {
        val = RenderingHints.VALUE_ANTIALIAS_DEFAULT;
    }
    if (!flag && RenderingHints.VALUE_ANTIALIAS_OFF.equals(val) 
        || flag && RenderingHints.VALUE_ANTIALIAS_ON.equals(val)) {
        // no change, do nothing
        return;
    }
    if (flag) {
        this.renderingHints.put(RenderingHints.KEY_ANTIALIASING, 
                                RenderingHints.VALUE_ANTIALIAS_ON);
    }
    else {
        this.renderingHints.put(RenderingHints.KEY_ANTIALIASING, 
                                RenderingHints.VALUE_ANTIALIAS_OFF);
    }
    fireChartChanged();

}
 
Example 13
Source File: Cardumen_0077_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * Sets a flag that indicates whether or not anti-aliasing is used when the
 * chart is drawn.
 * <P>
 * Anti-aliasing usually improves the appearance of charts, but is slower.
 *
 * @param flag  the new value of the flag.
 * 
 * @see #getAntiAlias()
 */
public void setAntiAlias(boolean flag) {

    Object val = this.renderingHints.get(RenderingHints.KEY_ANTIALIASING);
    if (val == null) {
        val = RenderingHints.VALUE_ANTIALIAS_DEFAULT;
    }
    if (!flag && RenderingHints.VALUE_ANTIALIAS_OFF.equals(val) 
        || flag && RenderingHints.VALUE_ANTIALIAS_ON.equals(val)) {
        // no change, do nothing
        return;
    }
    if (flag) {
        this.renderingHints.put(RenderingHints.KEY_ANTIALIASING, 
                                RenderingHints.VALUE_ANTIALIAS_ON);
    }
    else {
        this.renderingHints.put(RenderingHints.KEY_ANTIALIASING, 
                                RenderingHints.VALUE_ANTIALIAS_OFF);
    }
    fireChartChanged();

}
 
Example 14
Source File: Cardumen_0077_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * Sets a flag that indicates whether or not anti-aliasing is used when the
 * chart is drawn.
 * <P>
 * Anti-aliasing usually improves the appearance of charts, but is slower.
 *
 * @param flag  the new value of the flag.
 * 
 * @see #getAntiAlias()
 */
public void setAntiAlias(boolean flag) {

    Object val = this.renderingHints.get(RenderingHints.KEY_ANTIALIASING);
    if (val == null) {
        val = RenderingHints.VALUE_ANTIALIAS_DEFAULT;
    }
    if (!flag && RenderingHints.VALUE_ANTIALIAS_OFF.equals(val) 
        || flag && RenderingHints.VALUE_ANTIALIAS_ON.equals(val)) {
        // no change, do nothing
        return;
    }
    if (flag) {
        this.renderingHints.put(RenderingHints.KEY_ANTIALIASING, 
                                RenderingHints.VALUE_ANTIALIAS_ON);
    }
    else {
        this.renderingHints.put(RenderingHints.KEY_ANTIALIASING, 
                                RenderingHints.VALUE_ANTIALIAS_OFF);
    }
    fireChartChanged();

}
 
Example 15
Source File: Cardumen_00241_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * Sets a flag that indicates whether or not anti-aliasing is used when the
 * chart is drawn.
 * <P>
 * Anti-aliasing usually improves the appearance of charts, but is slower.
 *
 * @param flag  the new value of the flag.
 * 
 * @see #getAntiAlias()
 */
public void setAntiAlias(boolean flag) {

    Object val = this.renderingHints.get(RenderingHints.KEY_ANTIALIASING);
    if (val == null) {
        val = RenderingHints.VALUE_ANTIALIAS_DEFAULT;
    }
    if (!flag && RenderingHints.VALUE_ANTIALIAS_OFF.equals(val) 
        || flag && RenderingHints.VALUE_ANTIALIAS_ON.equals(val)) {
        // no change, do nothing
        return;
    }
    if (flag) {
        this.renderingHints.put(RenderingHints.KEY_ANTIALIASING, 
                                RenderingHints.VALUE_ANTIALIAS_ON);
    }
    else {
        this.renderingHints.put(RenderingHints.KEY_ANTIALIASING, 
                                RenderingHints.VALUE_ANTIALIAS_OFF);
    }
    fireChartChanged();

}
 
Example 16
Source File: Cardumen_00193_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * Sets a flag that indicates whether or not anti-aliasing is used when the
 * chart is drawn.
 * <P>
 * Anti-aliasing usually improves the appearance of charts, but is slower.
 *
 * @param flag  the new value of the flag.
 * 
 * @see #getAntiAlias()
 */
public void setAntiAlias(boolean flag) {

    Object val = this.renderingHints.get(RenderingHints.KEY_ANTIALIASING);
    if (val == null) {
        val = RenderingHints.VALUE_ANTIALIAS_DEFAULT;
    }
    if (!flag && RenderingHints.VALUE_ANTIALIAS_OFF.equals(val) 
        || flag && RenderingHints.VALUE_ANTIALIAS_ON.equals(val)) {
        // no change, do nothing
        return;
    }
    if (flag) {
        this.renderingHints.put(RenderingHints.KEY_ANTIALIASING, 
                                RenderingHints.VALUE_ANTIALIAS_ON);
    }
    else {
        this.renderingHints.put(RenderingHints.KEY_ANTIALIASING, 
                                RenderingHints.VALUE_ANTIALIAS_OFF);
    }
    fireChartChanged();

}
 
Example 17
Source File: FXGraphics2D.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Creates a new instance that will render to the specified JavaFX
 * {@code GraphicsContext}.
 * 
 * @param gc  the graphics context ({@code null} not permitted). 
 */
public FXGraphics2D(GraphicsContext gc) {
    nullNotPermitted(gc, "gc");
    this.gc = gc;
    this.zeroStrokeWidth = 0.5;
    this.hints = new RenderingHints(RenderingHints.KEY_ANTIALIASING, 
            RenderingHints.VALUE_ANTIALIAS_DEFAULT);
}
 
Example 18
Source File: FXGraphics2D.java    From ECG-Viewer with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Creates a new instance that will render to the specified JavaFX
 * {@code GraphicsContext}.
 * 
 * @param gc  the graphics context ({@code null} not permitted). 
 */
public FXGraphics2D(GraphicsContext gc) {
    nullNotPermitted(gc, "gc");
    this.gc = gc;
    this.zeroStrokeWidth = 0.5;
    this.hints = new RenderingHints(RenderingHints.KEY_ANTIALIASING, 
            RenderingHints.VALUE_ANTIALIAS_DEFAULT);
}
 
Example 19
Source File: FXGraphics2D.java    From SIMVA-SoS with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a new instance that will render to the specified JavaFX
 * {@code GraphicsContext}.
 * 
 * @param gc  the graphics context ({@code null} not permitted). 
 */
public FXGraphics2D(GraphicsContext gc) {
    nullNotPermitted(gc, "gc");
    this.gc = gc;
    this.zeroStrokeWidth = 0.5;
    this.hints = new RenderingHints(RenderingHints.KEY_ANTIALIASING, 
            RenderingHints.VALUE_ANTIALIAS_DEFAULT);
}
 
Example 20
Source File: FXGraphics2D.java    From ccu-historian with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Creates a new instance that will render to the specified JavaFX
 * {@code GraphicsContext}.
 * 
 * @param gc  the graphics context ({@code null} not permitted). 
 */
public FXGraphics2D(GraphicsContext gc) {
    nullNotPermitted(gc, "gc");
    this.gc = gc;
    this.zeroStrokeWidth = 0.5;
    this.hints = new RenderingHints(RenderingHints.KEY_ANTIALIASING, 
            RenderingHints.VALUE_ANTIALIAS_DEFAULT);
}