Java Code Examples for org.eclipse.swt.SWT#JOIN_BEVEL

The following examples show how to use org.eclipse.swt.SWT#JOIN_BEVEL . 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 check out the related API usage on the sidebar.
Example 1
/**
 * Returns the AWT line join corresponding to the specified SWT line join.
 *
 * @param swtLineJoin  the SWT line join.
 *
 * @return The AWT line join.
 */
private int toAwtLineJoin(int swtLineJoin) {
    if (swtLineJoin == SWT.JOIN_BEVEL) {
        return BasicStroke.JOIN_BEVEL;
    }
    else if (swtLineJoin == SWT.JOIN_MITER) {
        return BasicStroke.JOIN_MITER;
    }
    else if (swtLineJoin == SWT.JOIN_ROUND) {
        return BasicStroke.JOIN_ROUND;
    }
    else {
        throw new IllegalArgumentException("SWT LineJoin " + swtLineJoin
            + " not recognised");
    }
}
 
Example 2
/**
 * Returns the SWT line join corresponding to the specified AWT line join.
 *
 * @param awtLineJoin  the AWT line join.
 *
 * @return The SWT line join.
 */
private int toSwtLineJoin(int awtLineJoin) {
    if (awtLineJoin == BasicStroke.JOIN_BEVEL) {
        return SWT.JOIN_BEVEL;
    }
    else if (awtLineJoin == BasicStroke.JOIN_MITER) {
        return SWT.JOIN_MITER;
    }
    else if (awtLineJoin == BasicStroke.JOIN_ROUND) {
        return SWT.JOIN_ROUND;
    }
    else {
        throw new IllegalArgumentException("AWT LineJoin " + awtLineJoin
            + " not recognised");
    }
}
 
Example 3
/**
 * Returns the AWT line join corresponding to the specified SWT line join.
 *
 * @param swtLineJoin  the SWT line join.
 *
 * @return The AWT line join.
 */
private int toAwtLineJoin(int swtLineJoin) {
    if (swtLineJoin == SWT.JOIN_BEVEL) {
        return BasicStroke.JOIN_BEVEL;
    }
    else if (swtLineJoin == SWT.JOIN_MITER) {
        return BasicStroke.JOIN_MITER;
    }
    else if (swtLineJoin == SWT.JOIN_ROUND) {
        return BasicStroke.JOIN_ROUND;
    }
    else {
        throw new IllegalArgumentException("SWT LineJoin " + swtLineJoin
            + " not recognised");
    }
}
 
Example 4
/**
 * Returns the SWT line join corresponding to the specified AWT line join.
 *
 * @param awtLineJoin  the AWT line join.
 *
 * @return The SWT line join.
 */
private int toSwtLineJoin(int awtLineJoin) {
    if (awtLineJoin == BasicStroke.JOIN_BEVEL) {
        return SWT.JOIN_BEVEL;
    }
    else if (awtLineJoin == BasicStroke.JOIN_MITER) {
        return SWT.JOIN_MITER;
    }
    else if (awtLineJoin == BasicStroke.JOIN_ROUND) {
        return SWT.JOIN_ROUND;
    }
    else {
        throw new IllegalArgumentException("AWT LineJoin " + awtLineJoin
            + " not recognised");
    }
}
 
Example 5
Source Project: SIMVA-SoS   File: SWTGraphics2D.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * Returns the AWT line join corresponding to the specified SWT line join.
 *
 * @param swtLineJoin  the SWT line join.
 *
 * @return The AWT line join.
 */
private int toAwtLineJoin(int swtLineJoin) {
    if (swtLineJoin == SWT.JOIN_BEVEL) {
        return BasicStroke.JOIN_BEVEL;
    }
    else if (swtLineJoin == SWT.JOIN_MITER) {
        return BasicStroke.JOIN_MITER;
    }
    else if (swtLineJoin == SWT.JOIN_ROUND) {
        return BasicStroke.JOIN_ROUND;
    }
    else {
        throw new IllegalArgumentException("SWT LineJoin " + swtLineJoin
            + " not recognised");
    }
}
 
Example 6
Source Project: SIMVA-SoS   File: SWTGraphics2D.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * Returns the SWT line join corresponding to the specified AWT line join.
 *
 * @param awtLineJoin  the AWT line join.
 *
 * @return The SWT line join.
 */
private int toSwtLineJoin(int awtLineJoin) {
    if (awtLineJoin == BasicStroke.JOIN_BEVEL) {
        return SWT.JOIN_BEVEL;
    }
    else if (awtLineJoin == BasicStroke.JOIN_MITER) {
        return SWT.JOIN_MITER;
    }
    else if (awtLineJoin == BasicStroke.JOIN_ROUND) {
        return SWT.JOIN_ROUND;
    }
    else {
        throw new IllegalArgumentException("AWT LineJoin " + awtLineJoin
            + " not recognised");
    }
}
 
Example 7
/**
 * Returns the AWT line join corresponding to the specified SWT line join.
 *
 * @param swtLineJoin  the SWT line join.
 *
 * @return The AWT line join.
 */
private int toAwtLineJoin(int swtLineJoin) {
    if (swtLineJoin == SWT.JOIN_BEVEL) {
        return BasicStroke.JOIN_BEVEL;
    }
    else if (swtLineJoin == SWT.JOIN_MITER) {
        return BasicStroke.JOIN_MITER;
    }
    else if (swtLineJoin == SWT.JOIN_ROUND) {
        return BasicStroke.JOIN_ROUND;
    }
    else {
        throw new IllegalArgumentException("SWT LineJoin " + swtLineJoin
            + " not recognised");
    }
}
 
Example 8
/**
 * Returns the SWT line join corresponding to the specified AWT line join.
 *
 * @param awtLineJoin  the AWT line join.
 *
 * @return The SWT line join.
 */
private int toSwtLineJoin(int awtLineJoin) {
    if (awtLineJoin == BasicStroke.JOIN_BEVEL) {
        return SWT.JOIN_BEVEL;
    }
    else if (awtLineJoin == BasicStroke.JOIN_MITER) {
        return SWT.JOIN_MITER;
    }
    else if (awtLineJoin == BasicStroke.JOIN_ROUND) {
        return SWT.JOIN_ROUND;
    }
    else {
        throw new IllegalArgumentException("AWT LineJoin " + awtLineJoin
            + " not recognised");
    }
}
 
Example 9
/**
 * Returns the AWT line join corresponding to the specified SWT line join.
 *
 * @param swtLineJoin  the SWT line join.
 *
 * @return The AWT line join.
 */
private int toAwtLineJoin(int swtLineJoin) {
    if (swtLineJoin == SWT.JOIN_BEVEL) {
        return BasicStroke.JOIN_BEVEL;
    }
    else if (swtLineJoin == SWT.JOIN_MITER) {
        return BasicStroke.JOIN_MITER;
    }
    else if (swtLineJoin == SWT.JOIN_ROUND) {
        return BasicStroke.JOIN_ROUND;
    }
    else {
        throw new IllegalArgumentException("SWT LineJoin " + swtLineJoin
            + " not recognised");
    }
}
 
Example 10
/**
 * Returns the SWT line join corresponding to the specified AWT line join.
 *
 * @param awtLineJoin  the AWT line join.
 *
 * @return The SWT line join.
 */
private int toSwtLineJoin(int awtLineJoin) {
    if (awtLineJoin == BasicStroke.JOIN_BEVEL) {
        return SWT.JOIN_BEVEL;
    }
    else if (awtLineJoin == BasicStroke.JOIN_MITER) {
        return SWT.JOIN_MITER;
    }
    else if (awtLineJoin == BasicStroke.JOIN_ROUND) {
        return SWT.JOIN_ROUND;
    }
    else {
        throw new IllegalArgumentException("AWT LineJoin " + awtLineJoin
            + " not recognised");
    }
}
 
Example 11
Source Project: nebula   File: SvgLoader.java    License: Eclipse Public License 2.0 5 votes vote down vote up
private static Integer parseStrokeLineJoin(String s) {
	if(s != null) {
		if("bevel".equals(s)) { //$NON-NLS-1$
			return SWT.JOIN_BEVEL;
		} else if("miter".equals(s)) { //$NON-NLS-1$
			return SWT.JOIN_MITER;
		} else if("round".equals(s)) { //$NON-NLS-1$
			return SWT.JOIN_ROUND;
		}
	}
	return null;
}
 
Example 12
public YAxisDynamicRenderer ( final ChartRenderer chart )
{
    super ( chart );
    this.chart = chart;

    this.lineAttributes = new LineAttributes ( 1.0f, SWT.CAP_FLAT, SWT.JOIN_BEVEL, SWT.LINE_SOLID, new float[0], 0.0f, 0.0f );
}
 
Example 13
public XAxisDynamicRenderer ( final ChartRenderer chart )
{
    super ( chart );
    this.chart = chart;

    this.lineAttributes = new LineAttributes ( 1.0f, SWT.CAP_FLAT, SWT.JOIN_BEVEL, SWT.LINE_SOLID, new float[0], 0.0f, 0.0f );
    this.labelSpacing = 20;
}