|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.GraphicsConfigTemplate
javax.media.j3d.GraphicsConfigTemplate3D
public class GraphicsConfigTemplate3D
This class is used to obtain a valid GraphicsConfiguration that can be used by Java 3D. A user instantiates one of these objects and then sets all non-default attributes as desired. The getBestConfiguration() method in the GraphicsDevice class is then called with this GraphicsConfigTemplate and the "best" GraphicsConfiguration is returned. The "best" GraphicsConfiguration means that this GraphicsConfiguration is supported and it meets or exceeds what was requested in the GraphicsConfigTemplate. Null is returned if no such "best" GraphicsConfiguration is found.
GraphicsConfigTemplate
,
GraphicsDevice
,
GraphicsConfiguration
,
Serialized FormField Summary | |
---|---|
(package private) int |
blueSize
|
(package private) int |
depthSize
|
(package private) int |
doubleBuffer
|
(package private) static java.lang.Object |
globalLock
|
(package private) int |
greenSize
|
(package private) static java.lang.Object |
monitorLock
|
(package private) int |
redSize
|
(package private) int |
sceneAntialiasing
|
(package private) int |
stencilSize
|
(package private) int |
stereo
|
(package private) java.lang.Object |
testCfg
|
(package private) static boolean |
threadWaiting
|
Fields inherited from class java.awt.GraphicsConfigTemplate |
---|
PREFERRED, REQUIRED, UNNECESSARY |
Constructor Summary | |
---|---|
GraphicsConfigTemplate3D()
Constructs a GraphicsConfigTemplate3D object with default parameters. |
Method Summary | |
---|---|
private static java.lang.String |
enumStr(int val)
|
java.awt.GraphicsConfiguration |
getBestConfiguration(java.awt.GraphicsConfiguration[] gc)
Implement the abstract function of getBestConfiguration() in GraphicsConfigTemplate. |
int |
getBlueSize()
Retrieves the number of blue bits requested by this template. |
int |
getDepthSize()
Retrieves the size of the depth buffer. |
int |
getDoubleBuffer()
Retrieves the double buffering value. |
(package private) static void |
getGraphicsConfigFeatures(Canvas3D c)
Set the stereo/doubleBuffer/sceneAntialiasingAccum and hasSceneAntialiasingMultiSamples flags in Canvas3D |
int |
getGreenSize()
Retrieves the number of green bits requested by this template. |
int |
getRedSize()
Retrieves the number of red bits requested by this template. |
int |
getSceneAntialiasing()
Retrieves the scene antialiasing value. |
int |
getStencilSize()
Retrieves the size of the stencil buffer. |
int |
getStereo()
Retrieves the stereo value. |
boolean |
isGraphicsConfigSupported(java.awt.GraphicsConfiguration gc)
Returns a boolean indicating whether or not the given GraphicsConfiguration can be used to create a drawing surface that can be rendered to. |
(package private) static void |
runMonitor(int action)
|
void |
setBlueSize(int value)
Sets the number of blue bits required. |
void |
setDepthSize(int value)
Sets the depth buffer size requirement. |
void |
setDoubleBuffer(int value)
Sets the double buffering requirement. |
void |
setGreenSize(int value)
Sets the number of green bits required. |
(package private) static void |
setQueryProps(Canvas3D c)
Set the queryProperties() map in Canvas3D |
void |
setRedSize(int value)
Sets the number of red bits required. |
void |
setSceneAntialiasing(int value)
Sets the scene antialiasing requirement. |
void |
setStencilSize(int value)
Sets the stencil buffer size requirement. |
void |
setStereo(int value)
Sets the stereo requirement. |
java.lang.String |
toString()
Returns a string representation of this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
int depthSize
int doubleBuffer
int blueSize
int greenSize
int redSize
int sceneAntialiasing
int stereo
int stencilSize
java.lang.Object testCfg
static java.lang.Object globalLock
static java.lang.Object monitorLock
static volatile boolean threadWaiting
Constructor Detail |
---|
public GraphicsConfigTemplate3D()
Method Detail |
---|
public void setDoubleBuffer(int value)
value
- the value to set this field topublic int getDoubleBuffer()
public void setStereo(int value)
value
- the value to set this field topublic int getStereo()
public void setSceneAntialiasing(int value)
value
- the value to set this field topublic int getSceneAntialiasing()
public void setDepthSize(int value)
value
- the value to set this field topublic int getDepthSize()
public void setStencilSize(int value)
value
- the value to set this field topublic int getStencilSize()
public void setRedSize(int value)
value
- the value to set this field topublic int getRedSize()
public void setGreenSize(int value)
value
- the value to set this field topublic int getGreenSize()
public void setBlueSize(int value)
value
- the value to set this field topublic int getBlueSize()
public java.awt.GraphicsConfiguration getBestConfiguration(java.awt.GraphicsConfiguration[] gc)
getBestConfiguration
in class java.awt.GraphicsConfigTemplate
gc
- the array of GraphicsConfigurations to choose from
GraphicsDevice
public boolean isGraphicsConfigSupported(java.awt.GraphicsConfiguration gc)
isGraphicsConfigSupported
in class java.awt.GraphicsConfigTemplate
gc
- the GraphicsConfiguration object to test
true
if this GraphicsConfiguration object
can be used to create surfaces that can be rendered to,
false
if the GraphicsConfiguration can not be used
to create a drawing surface usable by this API.static void getGraphicsConfigFeatures(Canvas3D c)
static void setQueryProps(Canvas3D c)
static void runMonitor(int action)
private static final java.lang.String enumStr(int val)
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |