Overview
Package
Class
Use
Tree
Deprecated
Index
All Classes
Help
Prev Class
Next Class
Sample
Document
Class java.awt.Component.FlipBufferStrategy
Inherited members: ShowHide
Deprecated: ShowHide
View: ClientSubclassPackageImplementation
java.awt

Class Component.FlipBufferStrategy

  • java.lang.Object
    • java.awt.image.BufferStrategy
      • java.awt.Component.FlipBufferStrategy
  • Enclosing class:
    Component
    protected class Component.FlipBufferStrategy extends java.awt.image.BufferStrategy
    Inner class for flipping buffers on a component. That component must be a Canvas or Window.
    Since:
    1.4
    See Also:
    Canvas, Window, BufferStrategy
    • Fields 
      Modifier and Type Field and Description
      Ordinary member indicator caps Reveal DetailHide Detail
      protected BufferCapabilities caps
      The buffering capabilities
      protected BufferCapabilities caps
      The buffering capabilities
      Ordinary member indicator drawBuffer Reveal DetailHide Detail
      protected Image drawBuffer
      The drawing buffer
      protected Image drawBuffer
      The drawing buffer
      Ordinary member indicator drawVBuffer Reveal DetailHide Detail
      protected java.awt.image.VolatileImage drawVBuffer
      The drawing buffer as a volatile image
      protected java.awt.image.VolatileImage drawVBuffer
      The drawing buffer as a volatile image
      Ordinary member indicator numBuffers Reveal DetailHide Detail
      protected int numBuffers
      The number of buffers
      protected int numBuffers
      The number of buffers
      Ordinary member indicator validatedContents Reveal DetailHide Detail
      protected boolean validatedContents
      Whether or not the drawing buffer has been recently restored from a lost state.
      protected boolean validatedContents
      Whether or not the drawing buffer has been recently restored from a lost state.
    • Constructors 
      Modifier Constructor and Description
      Ordinary member indicator Component.FlipBufferStrategy Reveal DetailHide Detail
      protected Component.FlipBufferStrategy(int numBuffers, BufferCapabilities caps)
      Creates a new flipping buffer strategy for this component.
      protected Component.FlipBufferStrategy(int numBuffers, BufferCapabilities caps) throws AWTException
      Creates a new flipping buffer strategy for this component. The component must be a Canvas or Window.
      Parameters:
      numBuffers - the number of buffers
      caps - the capabilities of the buffers
      Throws:
      AWTException - if the capabilities supplied could not be supported or met
      java.lang.ClassCastException - if the component is not a canvas or window.
      java.lang.IllegalStateException - if the component has no peer
      java.lang.IllegalArgumentException - if numBuffers is less than two, or if BufferCapabilities.isPageFlipping is not true.
      See Also:
      Canvas, Window, createBuffers(int, BufferCapabilities)
    • Methods 
      Modifier and Type Method and Description
      Overridden member indicator contentsLost Reveal DetailHide Detail
      boolean contentsLost()
      Returns whether the drawing buffer was lost since the last call to getDrawGraphics.
      public boolean contentsLost()
      Description copied from class: java.awt.image.BufferStrategy
      Returns whether the drawing buffer was lost since the last call to getDrawGraphics. Since the buffers in a buffer strategy are usually type VolatileImage, they may become lost. For a discussion on lost buffers, see VolatileImage.
      Specified by:
      contentsLost in class java.awt.image.BufferStrategy
      Returns:
      whether the drawing buffer was lost since the last call to getDrawGraphics
      See Also:
      VolatileImage
      Overridden member indicator contentsRestored Reveal DetailHide Detail
      boolean contentsRestored()
      Returns whether the drawing buffer was recently restored from a lost state and reinitialized to the default background color (white).
      public boolean contentsRestored()
      Description copied from class: java.awt.image.BufferStrategy
      Returns whether the drawing buffer was recently restored from a lost state and reinitialized to the default background color (white). Since the buffers in a buffer strategy are usually type VolatileImage, they may become lost. If a surface has been recently restored from a lost state since the last call to getDrawGraphics, it may require repainting. For a discussion on lost buffers, see VolatileImage.
      Specified by:
      contentsRestored in class java.awt.image.BufferStrategy
      Returns:
      whether the drawing buffer was recently restored from a lost state and reinitialized to the default background color (white)
      See Also:
      VolatileImage
      Ordinary member indicator createBuffers Reveal DetailHide Detail
      protected void createBuffers(int numBuffers, BufferCapabilities caps)
      Creates one or more complex, flipping buffers with the given capabilities.
      protected void createBuffers(int numBuffers, BufferCapabilities caps) throws AWTException
      Creates one or more complex, flipping buffers with the given capabilities.
      Parameters:
      numBuffers - number of buffers to create; must be greater than one
      caps - the capabilities of the buffers. BufferCapabilities.isPageFlipping must be true.
      Throws:
      AWTException - if the capabilities supplied could not be supported or met
      java.lang.IllegalStateException - if the component has no peer
      java.lang.IllegalArgumentException - if numBuffers is less than two, or if BufferCapabilities.isPageFlipping is not true.
      See Also:
      BufferCapabilities.isPageFlipping()
      Ordinary member indicator destroyBuffers Reveal DetailHide Detail
      protected void destroyBuffers()
      Destroys the buffers created through this object
      protected void destroyBuffers()
      Destroys the buffers created through this object
      Overridden member indicator dispose Reveal DetailHide Detail
      void dispose()
      Releases system resources currently consumed by this BufferStrategy and removes it from the associated Component.
      public void dispose()
      Releases system resources currently consumed by this BufferStrategy and removes it from the associated Component. After invoking this method, getBufferStrategy will return null. Trying to use a BufferStrategy after it has been disposed will result in undefined behavior.
      Overrides:
      dispose in class java.awt.image.BufferStrategy
      Since:
      1.6
      See Also:
      Window.createBufferStrategy(int), Canvas.createBufferStrategy(int), Window.getBufferStrategy(), Canvas.getBufferStrategy()
      Ordinary member indicator flip Reveal DetailHide Detail
      protected void flip(BufferCapabilities.FlipContents flipAction)
      Flipping moves the contents of the back buffer to the front buffer, either by copying or by moving the video pointer.
      protected void flip(BufferCapabilities.FlipContents flipAction)
      Flipping moves the contents of the back buffer to the front buffer, either by copying or by moving the video pointer.
      Parameters:
      flipAction - an integer value describing the flipping action for the contents of the back buffer. This should be one of the values of the BufferCapabilities.FlipContents property.
      Throws:
      java.lang.IllegalStateException - if the buffers have not yet been created
      See Also:
      BufferCapabilities.getFlipContents()
      Ordinary member indicator getBackBuffer Reveal DetailHide Detail
      protected Image getBackBuffer()
       
      protected Image getBackBuffer()
      Overridden member indicator getCapabilities Reveal DetailHide Detail
      BufferCapabilities getCapabilities()
      Returns the BufferCapabilities for this BufferStrategy.
      public BufferCapabilities getCapabilities()
      Description copied from class: java.awt.image.BufferStrategy
      Returns the BufferCapabilities for this BufferStrategy.
      Specified by:
      getCapabilities in class java.awt.image.BufferStrategy
      Returns:
      the buffering capabilities of this strategy
      Overridden member indicator getDrawGraphics Reveal DetailHide Detail
      Graphics getDrawGraphics()
      Creates a graphics context for the drawing buffer.
      public Graphics getDrawGraphics()
      Description copied from class: java.awt.image.BufferStrategy
      Creates a graphics context for the drawing buffer. This method may not be synchronized for performance reasons; use of this method by multiple threads should be handled at the application level. Disposal of the graphics object obtained must be handled by the application.
      Specified by:
      getDrawGraphics in class java.awt.image.BufferStrategy
      Returns:
      the graphics on the drawing buffer. This method may not be synchronized for performance reasons; use of this method by multiple threads should be handled at the application level. Disposal of the graphics object must be handled by the application.
      Ordinary member indicator revalidate Reveal DetailHide Detail
      protected void revalidate()
      Restore the drawing buffer if it has been lost
      protected void revalidate()
      Restore the drawing buffer if it has been lost
      Overridden member indicator show Reveal DetailHide Detail
      void show()
      Makes the next available buffer visible by either blitting or flipping.
      public void show()
      Makes the next available buffer visible by either blitting or flipping.
      Specified by:
      show in class java.awt.image.BufferStrategy
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
This document was created by Dulcet from the OpenJDK sources. Copyright © 1993, 2012 Oracle and/or its affiliates. All rights reserved.

SourceForge