Java Code Examples for java.awt.GraphicsDevice#TYPE_IMAGE_BUFFER

The following examples show how to use java.awt.GraphicsDevice#TYPE_IMAGE_BUFFER . 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: SwingDisplayServer.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public final int getDpiResolution( )
{

	if ( iDpiResolution == 0 )
	{
		switch ( getGraphicsContext( ).getDeviceConfiguration( )
				.getDevice( )
				.getType( ) )
		{
			case GraphicsDevice.TYPE_RASTER_SCREEN :
				// This is the only reliable dpi for the display, the one in
				// g2d.getTransform()
				// will be 72 dpi for the display, even when the OS has a
				// different dpi set.
				iDpiResolution = computeScreenDpi();
				break;
			case GraphicsDevice.TYPE_PRINTER :
				// In that case the g2d already contains a transform with the right dpi of the printer
				// so we set the dpi to 72, since there is no adjustment needed
				iDpiResolution = 72;
				break;
			case GraphicsDevice.TYPE_IMAGE_BUFFER :
				if ( userResolution == 0 )
				{
					// Use value set by user, if none, use screen resolution
					iDpiResolution = computeScreenDpi( );
				}
				else
				{
					iDpiResolution = userResolution;
				}
				break;
		}

		adjustFractionalMetrics( );
	}
	return iDpiResolution;
}
 
Example 2
Source File: BufferedImageDevice.java    From dragonwell8_jdk with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns the type of this <code>GraphicsDevice</code>.
 * @return the type of this <code>GraphicsDevice</code>, which can
 * either be TYPE_RASTER_SCREEN, TYPE_PRINTER or TYPE_IMAGE_BUFFER.
 * @see #TYPE_RASTER_SCREEN
 * @see #TYPE_PRINTER
 * @see #TYPE_IMAGE_BUFFER
 */
public int getType() {
    return GraphicsDevice.TYPE_IMAGE_BUFFER;
}
 
Example 3
Source File: BufferedImageDevice.java    From TencentKona-8 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns the type of this <code>GraphicsDevice</code>.
 * @return the type of this <code>GraphicsDevice</code>, which can
 * either be TYPE_RASTER_SCREEN, TYPE_PRINTER or TYPE_IMAGE_BUFFER.
 * @see #TYPE_RASTER_SCREEN
 * @see #TYPE_PRINTER
 * @see #TYPE_IMAGE_BUFFER
 */
public int getType() {
    return GraphicsDevice.TYPE_IMAGE_BUFFER;
}
 
Example 4
Source File: BufferedImageDevice.java    From jdk8u60 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns the type of this <code>GraphicsDevice</code>.
 * @return the type of this <code>GraphicsDevice</code>, which can
 * either be TYPE_RASTER_SCREEN, TYPE_PRINTER or TYPE_IMAGE_BUFFER.
 * @see #TYPE_RASTER_SCREEN
 * @see #TYPE_PRINTER
 * @see #TYPE_IMAGE_BUFFER
 */
public int getType() {
    return GraphicsDevice.TYPE_IMAGE_BUFFER;
}
 
Example 5
Source File: BufferedImageDevice.java    From openjdk-jdk8u with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns the type of this <code>GraphicsDevice</code>.
 * @return the type of this <code>GraphicsDevice</code>, which can
 * either be TYPE_RASTER_SCREEN, TYPE_PRINTER or TYPE_IMAGE_BUFFER.
 * @see #TYPE_RASTER_SCREEN
 * @see #TYPE_PRINTER
 * @see #TYPE_IMAGE_BUFFER
 */
public int getType() {
    return GraphicsDevice.TYPE_IMAGE_BUFFER;
}
 
Example 6
Source File: BufferedImageDevice.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns the type of this <code>GraphicsDevice</code>.
 * @return the type of this <code>GraphicsDevice</code>, which can
 * either be TYPE_RASTER_SCREEN, TYPE_PRINTER or TYPE_IMAGE_BUFFER.
 * @see #TYPE_RASTER_SCREEN
 * @see #TYPE_PRINTER
 * @see #TYPE_IMAGE_BUFFER
 */
public int getType() {
    return GraphicsDevice.TYPE_IMAGE_BUFFER;
}
 
Example 7
Source File: BufferedImageDevice.java    From Bytecoder with Apache License 2.0 2 votes vote down vote up
/**
 * Returns the type of this {@code GraphicsDevice}.
 * @return the type of this {@code GraphicsDevice}, which can
 * either be TYPE_RASTER_SCREEN, TYPE_PRINTER or TYPE_IMAGE_BUFFER.
 * @see #TYPE_RASTER_SCREEN
 * @see #TYPE_PRINTER
 * @see #TYPE_IMAGE_BUFFER
 */
@Override
public int getType() {
    return GraphicsDevice.TYPE_IMAGE_BUFFER;
}
 
Example 8
Source File: BufferedImageDevice.java    From openjdk-jdk9 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns the type of this {@code GraphicsDevice}.
 * @return the type of this {@code GraphicsDevice}, which can
 * either be TYPE_RASTER_SCREEN, TYPE_PRINTER or TYPE_IMAGE_BUFFER.
 * @see #TYPE_RASTER_SCREEN
 * @see #TYPE_PRINTER
 * @see #TYPE_IMAGE_BUFFER
 */
public int getType() {
    return GraphicsDevice.TYPE_IMAGE_BUFFER;
}
 
Example 9
Source File: BufferedImageDevice.java    From jdk8u-jdk with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns the type of this <code>GraphicsDevice</code>.
 * @return the type of this <code>GraphicsDevice</code>, which can
 * either be TYPE_RASTER_SCREEN, TYPE_PRINTER or TYPE_IMAGE_BUFFER.
 * @see #TYPE_RASTER_SCREEN
 * @see #TYPE_PRINTER
 * @see #TYPE_IMAGE_BUFFER
 */
public int getType() {
    return GraphicsDevice.TYPE_IMAGE_BUFFER;
}
 
Example 10
Source File: BufferedImageDevice.java    From hottub with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns the type of this <code>GraphicsDevice</code>.
 * @return the type of this <code>GraphicsDevice</code>, which can
 * either be TYPE_RASTER_SCREEN, TYPE_PRINTER or TYPE_IMAGE_BUFFER.
 * @see #TYPE_RASTER_SCREEN
 * @see #TYPE_PRINTER
 * @see #TYPE_IMAGE_BUFFER
 */
public int getType() {
    return GraphicsDevice.TYPE_IMAGE_BUFFER;
}
 
Example 11
Source File: BufferedImageDevice.java    From openjdk-8-source with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns the type of this <code>GraphicsDevice</code>.
 * @return the type of this <code>GraphicsDevice</code>, which can
 * either be TYPE_RASTER_SCREEN, TYPE_PRINTER or TYPE_IMAGE_BUFFER.
 * @see #TYPE_RASTER_SCREEN
 * @see #TYPE_PRINTER
 * @see #TYPE_IMAGE_BUFFER
 */
public int getType() {
    return GraphicsDevice.TYPE_IMAGE_BUFFER;
}
 
Example 12
Source File: BufferedImageDevice.java    From openjdk-8 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns the type of this <code>GraphicsDevice</code>.
 * @return the type of this <code>GraphicsDevice</code>, which can
 * either be TYPE_RASTER_SCREEN, TYPE_PRINTER or TYPE_IMAGE_BUFFER.
 * @see #TYPE_RASTER_SCREEN
 * @see #TYPE_PRINTER
 * @see #TYPE_IMAGE_BUFFER
 */
public int getType() {
    return GraphicsDevice.TYPE_IMAGE_BUFFER;
}
 
Example 13
Source File: BufferedImageDevice.java    From jdk8u_jdk with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns the type of this <code>GraphicsDevice</code>.
 * @return the type of this <code>GraphicsDevice</code>, which can
 * either be TYPE_RASTER_SCREEN, TYPE_PRINTER or TYPE_IMAGE_BUFFER.
 * @see #TYPE_RASTER_SCREEN
 * @see #TYPE_PRINTER
 * @see #TYPE_IMAGE_BUFFER
 */
public int getType() {
    return GraphicsDevice.TYPE_IMAGE_BUFFER;
}
 
Example 14
Source File: BufferedImageDevice.java    From jdk8u-jdk with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns the type of this <code>GraphicsDevice</code>.
 * @return the type of this <code>GraphicsDevice</code>, which can
 * either be TYPE_RASTER_SCREEN, TYPE_PRINTER or TYPE_IMAGE_BUFFER.
 * @see #TYPE_RASTER_SCREEN
 * @see #TYPE_PRINTER
 * @see #TYPE_IMAGE_BUFFER
 */
public int getType() {
    return GraphicsDevice.TYPE_IMAGE_BUFFER;
}
 
Example 15
Source File: BufferedImageDevice.java    From jdk8u-dev-jdk with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns the type of this <code>GraphicsDevice</code>.
 * @return the type of this <code>GraphicsDevice</code>, which can
 * either be TYPE_RASTER_SCREEN, TYPE_PRINTER or TYPE_IMAGE_BUFFER.
 * @see #TYPE_RASTER_SCREEN
 * @see #TYPE_PRINTER
 * @see #TYPE_IMAGE_BUFFER
 */
public int getType() {
    return GraphicsDevice.TYPE_IMAGE_BUFFER;
}