Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.media.nativewindow
Class Capabilities

    java.lang.Object
      javax.media.nativewindow.Capabilities

All Implemented Interfaces:
  Cloneable

Direct Known Subclasses:
  GLCapabilities

    public class Capabilities

extends Object
implements Cloneable

Specifies a set of capabilities that a window's rendering context must support, such as color depth per channel. It currently contains the minimal number of routines which allow configuration on all supported window systems.

Constructor Summary
`Capabilities()` Creates a Capabilities object.

Method Summary
`Object` | `clone()`
`boolean` | `equals(Object obj)`
`int` | `getAlphaBits()` Returns the number of bits requested for the color buffer's alpha component.
`int` | `getBlueBits()` Returns the number of bits requested for the color buffer's blue component.
`int` | `getGreenBits()` Returns the number of bits requested for the color buffer's green component.
`int` | `getRedBits()` Returns the number of bits requested for the color buffer's red component.
`int` | `getTransparentAlphaValue()` Gets the transparent alpha value for the frame buffer configuration.
`int` | `getTransparentBlueValue()` Gets the transparent blue value for the frame buffer configuration.
`int` | `getTransparentGreenValue()` Gets the transparent green value for the frame buffer configuration.
`int` | `getTransparentRedValue()` Gets the transparent red value for the frame buffer configuration.
`boolean` | `isBackgroundOpaque()` Indicates whether the background of this OpenGL context should be considered opaque.
`boolean` | `isOnscreen()` Indicates whether the drawable surface is onscreen.
`void` | `setAlphaBits(int alphaBits)` Sets the number of bits requested for the color buffer's alpha component.
`void` | `setBackgroundOpaque(boolean opaque)` For on-screen OpenGL contexts on some platforms, sets whether the background of the context should be considered opaque.
`void` | `setBlueBits(int blueBits)` Sets the number of bits requested for the color buffer's blue component.
`void` | `setGreenBits(int greenBits)` Sets the number of bits requested for the color buffer's green component.
`void` | `setOnscreen(boolean onscreen)` Sets whether the drawable surface supports onscreen.
`void` | `setRedBits(int redBits)` Sets the number of bits requested for the color buffer's red component.
`void` | `setTransparentAlphaValue(int transValueAlpha)` Sets the transparent alpha value for the frame buffer configuration, ranging from 0 to the maximum frame buffer value for alpha.
`void` | `setTransparentBlueValue(int transValueBlue)` Sets the transparent blue value for the frame buffer configuration, ranging from 0 to the maximum frame buffer value for blue.
`void` | `setTransparentGreenValue(int transValueGreen)` Sets the transparent green value for the frame buffer configuration, ranging from 0 to the maximum frame buffer value for green.
`void` | `setTransparentRedValue(int transValueRed)` Sets the transparent red value for the frame buffer configuration, ranging from 0 to the maximum frame buffer value for red.
`String` | `toString()` Returns a textual representation of this Capabilities object.

Methods inherited from class java.lang.Object
`finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Capabilities

    public Capabilities()

  Creates a Capabilities object. All attributes are in a default state.

Method Detail

### clone

    public Object clone()

  Overrides:
    `clone` in class `Object`

### equals

    public boolean equals(Object obj)

  Overrides:
    `equals` in class `Object`

### getRedBits

    public int getRedBits()

  Returns the number of bits requested for the color buffer's red component. On some systems only the color depth, which is the sum of the red, green, and blue bits, is considered.

### setRedBits

    public void setRedBits(int redBits)

  Sets the number of bits requested for the color buffer's red component. On some systems only the color depth, which is the sum of the red, green, and blue bits, is considered.

### getGreenBits

    public int getGreenBits()

  Returns the number of bits requested for the color buffer's green component. On some systems only the color depth, which is the sum of the red, green, and blue bits, is considered.

### setGreenBits

    public void setGreenBits(int greenBits)

  Sets the number of bits requested for the color buffer's green component. On some systems only the color depth, which is the sum of the red, green, and blue bits, is considered.

### getBlueBits

    public int getBlueBits()

  Returns the number of bits requested for the color buffer's blue component. On some systems only the color depth, which is the sum of the red, green, and blue bits, is considered.

### setBlueBits

    public void setBlueBits(int blueBits)

  Sets the number of bits requested for the color buffer's blue component. On some systems only the color depth, which is the sum of the red, green, and blue bits, is considered.

### getAlphaBits

    public int getAlphaBits()

  Returns the number of bits requested for the color buffer's alpha component. On some systems only the color depth, which is the sum of the red, green, and blue bits, is considered.

### setAlphaBits

    public void setAlphaBits(int alphaBits)

  Sets the number of bits requested for the color buffer's alpha component. On some systems only the color depth, which is the sum of the red, green, and blue bits, is considered.

### setBackgroundOpaque

    public void setBackgroundOpaque(boolean opaque)

  For on-screen OpenGL contexts on some platforms, sets whether the background of the context should be considered opaque. On supported platforms, setting this to false, in conjunction with the transparency values, may allow hardware-accelerated OpenGL content inside of windows of arbitrary shape. To achieve this effect it is necessary to use an OpenGL clear color with an alpha less than 1.0. The default value for this flag is `true`; setting it to false may incur a certain performance penalty, so it is not recommended to arbitrarily set it to false.
  If not set already, the transparency values for red, green, blue and alpha are set to their default value, which is half of the value range of the framebuffer's corresponding component, ie `redValue = ( 1 << ( redBits - 1 ) ) -1` .

### isBackgroundOpaque

    public boolean isBackgroundOpaque()

  Indicates whether the background of this OpenGL context should be considered opaque. Defaults to true.

  See Also:
    `setBackgroundOpaque(boolean)`

### setOnscreen

    public void setOnscreen(boolean onscreen)

  Sets whether the drawable surface supports onscreen. Defaults to true.

### isOnscreen

    public boolean isOnscreen()

  Indicates whether the drawable surface is onscreen. Defaults to true.

### getTransparentRedValue

    public int getTransparentRedValue()

  Gets the transparent red value for the frame buffer configuration. This value is undefined if `isBackgroundOpaque()` equals true.

  See Also:
    `setTransparentRedValue(int)`

### getTransparentGreenValue

    public int getTransparentGreenValue()

  Gets the transparent green value for the frame buffer configuration. This value is undefined if `isBackgroundOpaque()` equals true.

  See Also:
    `setTransparentGreenValue(int)`

### getTransparentBlueValue

    public int getTransparentBlueValue()

  Gets the transparent blue value for the frame buffer configuration. This value is undefined if `isBackgroundOpaque()` equals true.

  See Also:
    `setTransparentBlueValue(int)`

### getTransparentAlphaValue

    public int getTransparentAlphaValue()

  Gets the transparent alpha value for the frame buffer configuration. This value is undefined if `isBackgroundOpaque()` equals true.

  See Also:
    `setTransparentAlphaValue(int)`

### setTransparentRedValue

    public void setTransparentRedValue(int transValueRed)

  Sets the transparent red value for the frame buffer configuration, ranging from 0 to the maximum frame buffer value for red. This value is ignored if `isBackgroundOpaque()` equals true.
  It defaults to half of the frambuffer value for red.
  A value of -1 is interpreted as any value.

### setTransparentGreenValue

    public void setTransparentGreenValue(int transValueGreen)

  Sets the transparent green value for the frame buffer configuration, ranging from 0 to the maximum frame buffer value for green. This value is ignored if `isBackgroundOpaque()` equals true.
  It defaults to half of the frambuffer value for green.
  A value of -1 is interpreted as any value.

### setTransparentBlueValue

    public void setTransparentBlueValue(int transValueBlue)

  Sets the transparent blue value for the frame buffer configuration, ranging from 0 to the maximum frame buffer value for blue. This value is ignored if `isBackgroundOpaque()` equals true.
  It defaults to half of the frambuffer value for blue.
  A value of -1 is interpreted as any value.

### setTransparentAlphaValue

    public void setTransparentAlphaValue(int transValueAlpha)

  Sets the transparent alpha value for the frame buffer configuration, ranging from 0 to the maximum frame buffer value for alpha. This value is ignored if `isBackgroundOpaque()` equals true.
  It defaults to half of the frambuffer value for alpha.
  A value of -1 is interpreted as any value.

### toString

    public String toString()

  Returns a textual representation of this Capabilities object.

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.