Java Code Examples for java.awt.RenderingHints#VALUE_ANTIALIAS_DEFAULT

The following examples show how to use java.awt.RenderingHints#VALUE_ANTIALIAS_DEFAULT . These examples are extracted from open source projects. 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 want to check out the right sidebar which shows the related API usage.
Example 1
Source Project: coming   File: JGenProg2015_000_t.java    License: 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 Project: coming   File: Cardumen_00193_s.java    License: 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 Project: coming   File: Cardumen_00241_t.java    License: 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 Project: coming   File: Cardumen_0077_s.java    License: 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 Project: coming   File: Cardumen_0077_t.java    License: 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 Project: astor   File: JFreeChart.java    License: 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 7
Source Project: coming   File: JGenProg2017_00127_t.java    License: 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 Project: coming   File: Cardumen_003_s.java    License: 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 Project: coming   File: Cardumen_003_t.java    License: 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 Project: coming   File: JGenProg2017_00106_t.java    License: 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 Project: coming   File: JGenProg2017_00106_s.java    License: 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 Project: coming   File: JGenProg2017_00104_s.java    License: 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 13
Source Project: coming   File: JGenProg2017_00104_t.java    License: 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 Project: coming   File: JGenProg2017_003_t.java    License: 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 Project: coming   File: JGenProg2017_003_s.java    License: 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 Project: coming   File: JGenProg2017_00127_s.java    License: 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
/**
 * 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 Project: SIMVA-SoS   File: FXGraphics2D.java    License: 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 19
/**
 * 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
/**
 * 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);
}