GraphicsDevice, GraphicsConfiguration
| Modifier and Type | Field and Description |
|---|---|
| private static final double | |
| private final Font | defaultFont
Establish the default font to be used by SG2D. |
| protected SunDisplayChanger | |
| protected GraphicsDevice[] | |
| private static final boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addDisplayChangedListener(DisplayChangedListener client)
Add a DisplayChangeListener to be notified when the display settings are changed. |
| public Graphics2D | createGraphics(BufferedImage img)
Implements abstract java. Returns a Graphics2D object for rendering into the given BufferedImage. |
| public void | displayChanged()
Implements sun. From the DisplayChangedListener interface; called when the display mode has been changed. |
| public Font[] | getAllFonts()
Implements abstract java. Returns all fonts available in this environment. |
| public String[] | getAvailableFontFamilyNames(Locale requestedLocale)
Implements abstract java. Returns an array containing the names of all font families in this
|
| public String[] | getAvailableFontFamilyNames()
Implements abstract java. Returns an array containing the names of all font families in this
|
| public static double | |
| public GraphicsDevice | getDefaultScreenDevice()
Implements abstract java. Returns the default screen graphics device. |
| public static FontManagerForSGE | |
| public static Rectangle | Returns: the bounds of the area covered by thisGraphicsConfiguration in device space (pixels)the graphics configuration which bounds are requested config)Returns the bounds of the graphics configuration in device space. |
| public static GraphicsConfiguration | Returns: the graphics configurationthe default configuration which is checked in the first
place current, double the x coordinate of the given point x, double the y coordinate of the given point y)Returns the graphics configuration which bounds contain the given point. |
| protected abstract int | Returns: the number of screen devices of this graphics environmentReturns the number of screen devices of this graphics environment. |
| public static double | |
| public synchronized GraphicsDevice[] | getScreenDevices()
Implements abstract java. Returns an array of all of the screen devices. |
| public static Rectangle | |
| public abstract boolean | Returns: true when the display is local, false for remote displaysReturns true when the display is local, false for remote displays. |
| public boolean | Returns: true if flip strategy should be used, false otherwiseReturns true if FlipBufferStrategy with COPIED buffer contents is preferred for this peer's GraphicsConfiguration over BlitBufferStrategy, false otherwise. |
| public static boolean | |
| protected abstract GraphicsDevice | Returns: the created screen devicethe number of the screen to create screennum)Create and return the screen device with the specified number. |
| public void | paletteChanged()
Implements sun. Part of the DisplayChangedListener interface: propagate this event to listeners |
| public void | removeDisplayChangedListener(DisplayChangedListener client)
Remove a DisplayChangeListener from Win32GraphicsEnvironment |
| public static Point | Returns: the point which uses device space (pixels)coordinate in the user's space x, int coordinate in the user's space y)Converts coordinates from the user's space to the device space using appropriate device transformation. |
| public static Rectangle | Returns: the rectangle which uses device space (pixels)the graphics configuration to be used for transformation gc, int coordinate in the user's space x, int coordinate in the user's space y, int the width in the user's space w, int the height in the user's space h)Converts coordinates (x, y) and the size (w, h) from the user's space to the device space using passed graphics configuration. |
| public static Point | Returns: the point which uses device space (pixels)absolute coordinate in the user's space x, int absolute coordinate in the user's space y)Converts absolute coordinates from the user's space to the device space using appropriate device transformation. |
| public static Rectangle | Returns: the rectangle which uses device space (pixels)the rectangle in the user's space rect)Converts the rectangle from the user's space to the device space using appropriate device transformation. |
| public static Rectangle | Returns: the rectangle which uses device space (pixels)the graphics configuration to be used for transformation gc, int absolute coordinate in the user's space x, int absolute coordinate in the user's space y, int the width in the user's space w, int the height in the user's space h)Converts absolute coordinates (x, y) and the size (w, h) from the user's space to the device space using passed graphics configuration. |
| public static Dimension | Returns: the size in the user's spacethe graphics configuration to be used for transformation gc, int the width in the device space w, int the height in the device space h)Converts the size (w, h) from the device space to the user's space using passed graphics configuration. |
| public static void |
| debugScale | back to summary |
|---|---|
| private static final double debugScale | |
| defaultFont | back to summary |
|---|---|
| private final Font defaultFont Establish the default font to be used by SG2D. | |
| displayChanger | back to summary |
|---|---|
| protected SunDisplayChanger displayChanger | |
| screens | back to summary |
|---|---|
| protected GraphicsDevice[] screens | |
| uiScaleEnabled | back to summary |
|---|---|
| private static final boolean uiScaleEnabled | |
| SunGraphicsEnvironment | back to summary |
|---|---|
| public SunGraphicsEnvironment() | |
| addDisplayChangedListener | back to summary |
|---|---|
| public void addDisplayChangedListener(DisplayChangedListener client) Add a DisplayChangeListener to be notified when the display settings are changed. | |
| createGraphics | back to summary |
|---|---|
| public Graphics2D createGraphics(BufferedImage img) Implements abstract java. Returns a Graphics2D object for rendering into the given BufferedImage.
| |
| displayChanged | back to summary |
|---|---|
| public void displayChanged() Implements sun. From the DisplayChangedListener interface; called when the display mode has been changed. | |
| getAllFonts | back to summary |
|---|---|
| public Font[] getAllFonts() Implements abstract java. Returns all fonts available in this environment. | |
| getAvailableFontFamilyNames | back to summary |
|---|---|
| public String[] getAvailableFontFamilyNames(Locale requestedLocale) Implements abstract java. Doc from java. Returns an array containing the names of all font families in this
Typical usage would be for presentation to a user for selection of a particular family name. An application can then specify this name when creating a font, in conjunction with a style, such as bold or italic, giving the font system flexibility in choosing its own best match among multiple fonts in the same font family. | |
| getAvailableFontFamilyNames | back to summary |
|---|---|
| public String[] getAvailableFontFamilyNames() Implements abstract java. Doc from java. Returns an array containing the names of all font families in this
Typical usage would be for presentation to a user for selection of a particular family name. An application can then specify this name when creating a font, in conjunction with a style, such as bold or italic, giving the font system flexibility in choosing its own best match among multiple fonts in the same font family. | |
| getDebugScale | back to summary |
|---|---|
| public static double getDebugScale() | |
| getDefaultScreenDevice | back to summary |
|---|---|
| public GraphicsDevice getDefaultScreenDevice() Implements abstract java. Returns the default screen graphics device. | |
| getFontManagerForSGE | back to summary |
|---|---|
| public static FontManagerForSGE getFontManagerForSGE() | |
| getGCDeviceBounds | back to summary |
|---|---|
| public static Rectangle getGCDeviceBounds(GraphicsConfiguration config) Returns the bounds of the graphics configuration in device space.
| |
| getGraphicsConfigurationAtPoint | back to summary |
|---|---|
| public static GraphicsConfiguration getGraphicsConfigurationAtPoint(GraphicsConfiguration current, double x, double y) Returns the graphics configuration which bounds contain the given point.
| |
| getNumScreens | back to summary |
|---|---|
| protected abstract int getNumScreens() Returns the number of screen devices of this graphics environment.
| |
| getScaleFactor | back to summary |
|---|---|
| public static double getScaleFactor(String propertyName) | |
| getScreenDevices | back to summary |
|---|---|
| public synchronized GraphicsDevice[] getScreenDevices() Implements abstract java. Returns an array of all of the screen devices. | |
| getUsableBounds | back to summary |
|---|---|
| public static Rectangle getUsableBounds(GraphicsDevice gd) Return the bounds of a GraphicsDevice, less its screen insets. See also java.awt.GraphicsEnvironment.getUsableBounds(); | |
| isDisplayLocal | back to summary |
|---|---|
| public abstract boolean isDisplayLocal() Returns true when the display is local, false for remote displays.
| |
| isFlipStrategyPreferred | back to summary |
|---|---|
| public boolean isFlipStrategyPreferred(ComponentPeer peer) Returns true if FlipBufferStrategy with COPIED buffer contents is preferred for this peer's GraphicsConfiguration over BlitBufferStrategy, false otherwise. The reason FlipBS could be preferred is that in some configurations an accelerated copy to the screen is supported (like Direct3D 9)
| |
| isUIScaleEnabled | back to summary |
|---|---|
| public static boolean isUIScaleEnabled() | |
| makeScreenDevice | back to summary |
|---|---|
| protected abstract GraphicsDevice makeScreenDevice(int screennum) Create and return the screen device with the specified number. The
device with number
| |
| paletteChanged | back to summary |
|---|---|
| public void paletteChanged() Implements sun. Part of the DisplayChangedListener interface: propagate this event to listeners | |
| removeDisplayChangedListener | back to summary |
|---|---|
| public void removeDisplayChangedListener(DisplayChangedListener client) Remove a DisplayChangeListener from Win32GraphicsEnvironment | |
| toDeviceSpace | back to summary |
|---|---|
| public static Point toDeviceSpace(int x, int y) Converts coordinates from the user's space to the device space using appropriate device transformation.
| |
| toDeviceSpace | back to summary |
|---|---|
| public static Rectangle toDeviceSpace(GraphicsConfiguration gc, int x, int y, int w, int h) Converts coordinates (x, y) and the size (w, h) from the user's space to the device space using passed graphics configuration.
| |
| toDeviceSpaceAbs | back to summary |
|---|---|
| public static Point toDeviceSpaceAbs(int x, int y) Converts absolute coordinates from the user's space to the device space using appropriate device transformation.
| |
| toDeviceSpaceAbs | back to summary |
|---|---|
| public static Rectangle toDeviceSpaceAbs(Rectangle rect) Converts the rectangle from the user's space to the device space using appropriate device transformation. | |
| toDeviceSpaceAbs | back to summary |
|---|---|
| public static Rectangle toDeviceSpaceAbs(GraphicsConfiguration gc, int x, int y, int w, int h) Converts absolute coordinates (x, y) and the size (w, h) from the user's space to the device space using passed graphics configuration.
| |
| toUserSpace | back to summary |
|---|---|
| public static Dimension toUserSpace(GraphicsConfiguration gc, int w, int h) Converts the size (w, h) from the device space to the user's space using passed graphics configuration.
| |
| useAlternateFontforJALocales | back to summary |
|---|---|
| public static void useAlternateFontforJALocales()
Deprecated
| |