public final class

PrinterGraphicsDevice

extends GraphicsDevice
java.lang.Object
   ↳ java.awt.GraphicsDevice
     ↳ sun.print.PrinterGraphicsDevice

Summary

[Expand]
Inherited Constants
From class java.awt.GraphicsDevice
Protected Constructors
PrinterGraphicsDevice(GraphicsConfiguration conf, String id)
Public Methods
GraphicsConfiguration[] getConfigurations()
Returns all of the GraphicsConfiguration objects associated with this GraphicsDevice.
GraphicsConfiguration getDefaultConfiguration()
Returns the default GraphicsConfiguration associated with this GraphicsDevice.
Window getFullScreenWindow()
Returns the Window object representing the full-screen window if the device is in full-screen mode.
String getIDstring()
Returns the identification string associated with this GraphicsDevice.
int getType()
Returns the type of this GraphicsDevice.
void setFullScreenWindow(Window w)
Enter full-screen mode, or return to windowed mode.
[Expand]
Inherited Methods
From class java.awt.GraphicsDevice
From class java.lang.Object

Protected Constructors

protected PrinterGraphicsDevice (GraphicsConfiguration conf, String id)

Public Methods

public GraphicsConfiguration[] getConfigurations ()

Returns all of the GraphicsConfiguration objects associated with this GraphicsDevice.

Returns
  • an array of GraphicsConfiguration objects that are associated with this GraphicsDevice.

public GraphicsConfiguration getDefaultConfiguration ()

Returns the default GraphicsConfiguration associated with this GraphicsDevice.

Returns
  • the default GraphicsConfiguration of this GraphicsDevice.

public Window getFullScreenWindow ()

Returns the Window object representing the full-screen window if the device is in full-screen mode.

Returns
  • the full-screen window, or null if the device is not in full-screen mode.

public String getIDstring ()

Returns the identification string associated with this GraphicsDevice.

A particular program might use more than one GraphicsDevice in a GraphicsEnvironment. This method returns a String identifying a particular GraphicsDevice in the local GraphicsEnvironment. Although there is no public method to set this String, a programmer can use the String for debugging purposes. Vendors of the JavaTM Runtime Environment can format the return value of the String. To determine how to interpret the value of the String, contact the vendor of your Java Runtime. To find out who the vendor is, from your program, call the getProperty method of the System class with "java.vendor".

Returns
  • a String that is the identification of this GraphicsDevice.

public int getType ()

Returns the type of this GraphicsDevice.

Returns
  • the type of this GraphicsDevice, which can either be TYPE_RASTER_SCREEN, TYPE_PRINTER or TYPE_IMAGE_BUFFER.

public void setFullScreenWindow (Window w)

Enter full-screen mode, or return to windowed mode. The entered full-screen mode may be either exclusive or simulated. Exclusive mode is only available if isFullScreenSupported returns true.

Exclusive mode implies:

  • Windows cannot overlap the full-screen window. All other application windows will always appear beneath the full-screen window in the Z-order.
  • There can be only one full-screen window on a device at any time, so calling this method while there is an existing full-screen Window will cause the existing full-screen window to return to windowed mode.
  • Input method windows are disabled. It is advisable to call Component.enableInputMethods(false) to make a component a non-client of the input method framework.

Simulated full-screen mode resizes the window to the size of the screen and positions it at (0,0).

When entering full-screen mode, if the window to be used as the full-screen window is not visible, this method will make it visible. It will remain visible when returning to windowed mode.

When returning to windowed mode from an exclusive full-screen window, any display changes made by calling setDisplayMode are automatically restored to their original state.

Parameters
w a window to use as the full-screen window; null if returning to windowed mode. Some platforms expect the fullscreen window to be a top-level component (i.e., a Frame); therefore it is preferable to use a Frame here rather than a Window.