NativeWindowFactory so that
new window toolkits can replace just the NativeWindowFactory and reuse the graphics configuration selection
algorithm provided by, for example, an OpenGL binding.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| protected static final boolean | |
| private static final GraphicsConfigurationFactory. | |
| pack-priv static boolean | |
| private static final Map |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public final AbstractGraphicsConfiguration | Returns: the complete GraphicsConfigurationthe intermediate chosen capabilities to be refined by this implementation, may be equal to capsRequested capsChosen, final CapabilitiesImmutable the original requested capabilities capsRequested, final CapabilitiesChooser the choosing implementation chooser, final AbstractGraphicsScreen the referring Screen screen, final int if not nativeVisualID)VisualIDHolder#VID_UNDEFINED it reflects a pre-chosen visualID of the native platform's windowing system. Selects a graphics configuration on the specified graphics
device compatible with the supplied |
| protected abstract AbstractGraphicsConfiguration | chooseGraphicsConfigurationImpl(CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested, CapabilitiesChooser chooser, AbstractGraphicsScreen screen, int nativeVisualID)
|
| private static void | |
| private static ArrayList | getAllAssignableClassesFrom(final Class<?> superClassOrInterface, final Class<?> fromClass, final boolean interfacesOnly)
|
| private static void | |
| public static GraphicsConfigurationFactory | getFactory(final AbstractGraphicsDevice device, final CapabilitiesImmutable caps)
Returns the graphics configuration factory for use with the given device and capability. |
| public static GraphicsConfigurationFactory | getFactory(final Class<?>
the minimum capabilities class type accepted, must implement or extend deviceType, final Class<?> AbstractGraphicsDevicethe minimum capabilities class type accepted, must implement or extend capabilitiesType)CapabilitiesImmutableReturns the graphics configuration factory for use with the given device and capability class. |
| protected static String | |
| public static synchronized void | |
| protected static GraphicsConfigurationFactory | Returns: the previous registered factory, or null if nonethe minimum capabilities class type accepted, must implement or extend interface abstractGraphicsDeviceImplementor, final Class<?> AbstractGraphicsDevicethe minimum capabilities class type accepted, must extend interface capabilitiesType, final GraphicsConfigurationFactory factory)CapabilitiesImmutableRegisters a GraphicsConfigurationFactory handling the given graphics device and capability class. |
| public static synchronized void | |
| protected static String | |
| protected static String |
| DEBUG | back to summary |
|---|---|
| protected static final boolean DEBUG | |
| defaultDeviceCapsType | back to summary |
|---|---|
| private static final GraphicsConfigurationFactory. | |
| initialized | back to summary |
|---|---|
| pack-priv static boolean initialized | |
| registeredFactories | back to summary |
|---|---|
| private static final Map<GraphicsConfigurationFactory. | |
| GraphicsConfigurationFactory | back to summary |
|---|---|
| protected GraphicsConfigurationFactory() Creates a new NativeWindowFactory instance. End users do not need to call this method. | |
| chooseGraphicsConfiguration | back to summary |
|---|---|
| public final AbstractGraphicsConfiguration chooseGraphicsConfiguration(final CapabilitiesImmutable capsChosen, final CapabilitiesImmutable capsRequested, final CapabilitiesChooser chooser, final AbstractGraphicsScreen screen, final int nativeVisualID) throws IllegalArgumentException, NativeWindowException Selects a graphics configuration on the specified graphics
device compatible with the supplied Other platforms (e.g. Windows, MacOSX) don't offer the mentioned seperation
and hence need a fully established window and it's drawable.
Here the validation of the capabilities is performed later.
In this case, the AbstractGraphicsConfiguration implementation
must allow an overwrite of the Capabilites, for example
This method is mainly intended to be both used and implemented by the OpenGL binding. The concrete data type of the passed graphics device and
returned graphics configuration must be specified in the
documentation binding this particular API to the underlying
window toolkit. The Reference Implementation accepts
| |
| chooseGraphicsConfigurationImpl | back to summary |
|---|---|
| protected abstract AbstractGraphicsConfiguration chooseGraphicsConfigurationImpl(CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested, CapabilitiesChooser chooser, AbstractGraphicsScreen screen, int nativeVisualID) throws IllegalArgumentException, NativeWindowException | |
| dumpFactories | back to summary |
|---|---|
| private static void dumpFactories() | |
| getAllAssignableClassesFrom | back to summary |
|---|---|
| private static ArrayList | |
| getAllAssignableClassesFrom | back to summary |
|---|---|
| private static void getAllAssignableClassesFrom(final Class<?> superClassOrInterface, final Class<?> fromClass, final boolean interfacesOnly, final List<Class<?>> resolvedInterfaces, final List<Class<?>> inspectClasses) | |
| getFactory | back to summary |
|---|---|
| public static GraphicsConfigurationFactory getFactory(final AbstractGraphicsDevice device, final CapabilitiesImmutable caps) Returns the graphics configuration factory for use with the given device and capability.
| |
| getFactory | back to summary |
|---|---|
| public static GraphicsConfigurationFactory getFactory(final Class<?> deviceType, final Class<?> capabilitiesType) throws IllegalArgumentException, NativeWindowException Returns the graphics configuration factory for use with the given device and capability class. Note Registered device types maybe classes or interfaces, where capabilities types are interfaces only. Pseudo code for finding a suitable factory is:
For-All devT := getTopDownDeviceTypes(deviceType)
For-All capsT := getTopDownCapabilitiesTypes(capabilitiesType)
f = factory.get(devT, capsT);
if(f) { return f; }
end
end
| |
| getThreadName | back to summary |
|---|---|
| protected static String getThreadName() | |
| initSingleton | back to summary |
|---|---|
| public static synchronized void initSingleton() | |
| registerFactory | back to summary |
|---|---|
| protected static GraphicsConfigurationFactory registerFactory(final Class<?> abstractGraphicsDeviceImplementor, final Class<?> capabilitiesType, final GraphicsConfigurationFactory factory) throws IllegalArgumentException Registers a GraphicsConfigurationFactory handling the given graphics device and capability class. This does not need to be called by end users, only implementors of new GraphicsConfigurationFactory subclasses. Note Registered device types maybe classes or interfaces, where capabilities types are interfaces only. See
| |
| shutdown | back to summary |
|---|---|
| public static synchronized void shutdown() | |
| toHexString | back to summary |
|---|---|
| protected static String toHexString(final int val) | |
| toHexString | back to summary |
|---|---|
| protected static String toHexString(final long val) | |
| Modifier and Type | Field and Description |
|---|---|
| public final Class | |
| public final Class | |
| private final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final boolean | equals(final Object
the reference object with which to compare. obj)Overrides java. |
| public final int | |
| public final String |
| capsType | back to summary |
|---|---|
| public final Class<?> capsType | |
| deviceType | back to summary |
|---|---|
| public final Class<?> deviceType | |
| hash32 | back to summary |
|---|---|
| private final int hash32 | |
| DeviceCapsType | back to summary |
|---|---|
| public DeviceCapsType(final Class<?> deviceType, final Class<?> capsType) | |
| equals | back to summary |
|---|---|
| public final boolean equals(final Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
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. | |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| toString | back to summary |
|---|---|
| public final String toString() Overrides java. Doc from java. Returns a string representation of the object. | |