Top Inners Fields Constructors Methods
com.sun.glass.ui

public final Class Screen

extends Object
Class Inheritance
Imports
java.util.Arrays, .Collections, .List

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private volatile int
private final int
private static final int
private static Screen.EventHandler
private final int
private final float
private final float
private final int
private final float
private final float
private final int
private final int
private final int
private volatile long
private final int
private final int
private static volatile List<Screen>
private final int
private final int
private final int
private final int
private final int
private final int
x

private final int
y

Constructor Summary

AccessConstructor and Description
public
Screen(long nativePtr, int depth, int x, int y, int width, int height, int platformX, int platformY, int platformWidth, int platformHeight, int visibleX, int visibleY, int visibleWidth, int visibleHeight, int resolutionX, int resolutionY, float platformScaleX, float platformScaleY, float outputScaleX, float outputScaleY)

Method Summary

Modifier and TypeMethod and Description
public boolean
containsPlatformCoords(int x, int y)

public boolean
containsPlatformRect(int x, int y, int w, int h)

private void
public boolean
equals(Object o)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public float
fromPlatformX(int px)

public float
fromPlatformY(int py)

public int
public int
getDepth()

Could be called from any thread

public int
getHeight()

Could be called from any thread

public static Screen

Returns:

the main screen
getMainScreen
()

Could be called from any thread

public long
getNativeScreen()

Could be called from any thread

public int
getPlatformHeight()

Could be called from any thread

public float

Returns:

platform X scaling
getPlatformScaleX
()

Returns the horizontal scaling of the UI (window sizes and event coordinates) from FX logical units to the platform units.

public float

Returns:

platform Y scaling
getPlatformScaleY
()

Returns the vertical scaling of the UI (window sizes and event coordinates) from FX logical units to the platform units.

public int
getPlatformWidth()

Could be called from any thread

public int
getPlatformX()

Could be called from any thread

public int
getPlatformY()

Could be called from any thread

public float

Returns:

recommended render X scaling
getRecommendedOutputScaleX
()

Returns the recommended horizontal scaling for the rendered frames.

public float

Returns:

recommended render Y scaling
getRecommendedOutputScaleY
()

Returns the recommended vertical scaling for the rendered frames.

public int
getResolutionX()

Could be called from any thread

public int
getResolutionY()

Could be called from any thread

public static List<Screen>

Returns:

list of all available screens
getScreens
()

Could be called from any thread

public static double
public int
getVisibleHeight()

Could be called from any thread

public int
getVisibleWidth()

Could be called from any thread

public int
getVisibleX()

Could be called from any thread

public int
getVisibleY()

Could be called from any thread

public int
getWidth()

Could be called from any thread

public int
getX()

Could be called from any thread

public int
getY()

Could be called from any thread

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

pack-priv static void
public static void
notifySettingsChanged()

Called from native when the Screen definitions change.

public float
portionIntersectsPlatformRect(int x, int y, int w, int h)

public void
setAdapterOrdinal(int adapter)

public static void
public int
toPlatformX(float ux)

public int
toPlatformY(float uy)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

adapterback to summary
private volatile int adapter
depthback to summary
private final int depth
dpiOverrideback to summary
private static final int dpiOverride
eventHandlerback to summary
private static Screen.EventHandler eventHandler
heightback to summary
private final int height
outputScaleXback to summary
private final float outputScaleX
outputScaleYback to summary
private final float outputScaleY
platformHeightback to summary
private final int platformHeight
platformScaleXback to summary
private final float platformScaleX
platformScaleYback to summary
private final float platformScaleY
platformWidthback to summary
private final int platformWidth
platformXback to summary
private final int platformX
platformYback to summary
private final int platformY
ptrback to summary
private volatile long ptr
resolutionXback to summary
private final int resolutionX
resolutionYback to summary
private final int resolutionY
screensback to summary
private static volatile List<Screen> screens
visibleHeightback to summary
private final int visibleHeight
visibleWidthback to summary
private final int visibleWidth
visibleXback to summary
private final int visibleX
visibleYback to summary
private final int visibleY
widthback to summary
private final int width
xback to summary
private final int x
yback to summary
private final int y

Constructor Detail

Screenback to summary
public Screen(long nativePtr, int depth, int x, int y, int width, int height, int platformX, int platformY, int platformWidth, int platformHeight, int visibleX, int visibleY, int visibleWidth, int visibleHeight, int resolutionX, int resolutionY, float platformScaleX, float platformScaleY, float outputScaleX, float outputScaleY)

Method Detail

containsPlatformCoordsback to summary
public boolean containsPlatformCoords(int x, int y)
containsPlatformRectback to summary
public boolean containsPlatformRect(int x, int y, int w, int h)
disposeback to summary
private void dispose()
equalsback to summary
public boolean equals(Object o)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Annotations
@Override
fromPlatformXback to summary
public float fromPlatformX(int px)
fromPlatformYback to summary
public float fromPlatformY(int py)
getAdapterOrdinalback to summary
public int getAdapterOrdinal()
getDepthback to summary
public int getDepth()

Could be called from any thread

getHeightback to summary
public int getHeight()

Could be called from any thread

getMainScreenback to summary
public static Screen getMainScreen()

Could be called from any thread

Returns:Screen

the main screen

getNativeScreenback to summary
public long getNativeScreen()

Could be called from any thread

getPlatformHeightback to summary
public int getPlatformHeight()

Could be called from any thread

getPlatformScaleXback to summary
public float getPlatformScaleX()

Returns the horizontal scaling of the UI (window sizes and event coordinates) from FX logical units to the platform units. Could be called from any thread

Returns:float

platform X scaling

getPlatformScaleYback to summary
public float getPlatformScaleY()

Returns the vertical scaling of the UI (window sizes and event coordinates) from FX logical units to the platform units. Could be called from any thread

Returns:float

platform Y scaling

getPlatformWidthback to summary
public int getPlatformWidth()

Could be called from any thread

getPlatformXback to summary
public int getPlatformX()

Could be called from any thread

getPlatformYback to summary
public int getPlatformY()

Could be called from any thread

getRecommendedOutputScaleXback to summary
public float getRecommendedOutputScaleX()

Returns the recommended horizontal scaling for the rendered frames. Could be called from any thread

Returns:float

recommended render X scaling

getRecommendedOutputScaleYback to summary
public float getRecommendedOutputScaleY()

Returns the recommended vertical scaling for the rendered frames. Could be called from any thread

Returns:float

recommended render Y scaling

getResolutionXback to summary
public int getResolutionX()

Could be called from any thread

getResolutionYback to summary
public int getResolutionY()

Could be called from any thread

getScreensback to summary
public static List<Screen> getScreens()

Could be called from any thread

Returns:List<Screen>

list of all available screens

getVideoRefreshPeriodback to summary
public static double getVideoRefreshPeriod()
getVisibleHeightback to summary
public int getVisibleHeight()

Could be called from any thread

getVisibleWidthback to summary
public int getVisibleWidth()

Could be called from any thread

getVisibleXback to summary
public int getVisibleX()

Could be called from any thread

getVisibleYback to summary
public int getVisibleY()

Could be called from any thread

getWidthback to summary
public int getWidth()

Could be called from any thread

getXback to summary
public int getX()

Could be called from any thread

getYback to summary
public int getY()

Could be called from any thread

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Annotations
@Override
initScreensback to summary
pack-priv static void initScreens()
notifySettingsChangedback to summary
public static void notifySettingsChanged()

Called from native when the Screen definitions change.

portionIntersectsPlatformRectback to summary
public float portionIntersectsPlatformRect(int x, int y, int w, int h)
setAdapterOrdinalback to summary
public void setAdapterOrdinal(int adapter)
setEventHandlerback to summary
public static void setEventHandler(Screen.EventHandler eh)
toPlatformXback to summary
public int toPlatformX(float ux)
toPlatformYback to summary
public int toPlatformY(float uy)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
com.sun.glass.ui back to summary

public Class Screen.EventHandler

extends Object
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

EventHandlerback to summary
public EventHandler()

Method Detail

handleSettingsChangedback to summary
public void handleSettingsChanged()