| Modifier and Type | Class and Description |
|---|---|
| private class | BufferStrategyPaintManager.
BufferInfo is used to track the BufferStrategy being used for a particular Component. |
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private int | |
| private int | |
| private int | |
| private Graphics | bsg
Graphics from the BufferStrategy. |
| private BufferStrategyPaintManager. | bufferInfo
BufferInfo corresponding to root. |
| private ArrayList | bufferInfos
List of BufferInfos. |
| private BufferStrategy | bufferStrategy
BufferStrategy currently being used. |
| private boolean | disposeBufferOnEnd
Set to true if the bufferInfo needs to be disposed when current paint loop is done. |
| private static final PlatformLogger | |
| private boolean | painting
Indicates |
| private JComponent | rootJ
Farthest JComponent ancestor for the current paint/copyArea. |
| private boolean | showing
Indicates we're in the process of showing. |
| private int | xOffset
Location of component being painted relative to root. |
| private int | yOffset
Location of component being painted relative to root. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public void | beginPaint()
Overrides javax. Invoked prior to any calls to paint or copyArea. |
| public void | copyArea(JComponent c, Graphics g, int x, int y, int w, int h, int deltaX, int deltaY, boolean clip)
Overrides javax. Does a copy area on the specified region. |
| protected void | dispose()
Overrides javax. Cleans up any created BufferStrategies. |
| private void | |
| public void | doubleBufferingChanged(final JRootPane rootPane)
Overrides javax. Invoked when the double buffering or useTrueDoubleBuffering changes for a JRootPane. |
| private void | |
| public void | endPaint()
Overrides javax. Invoked to indicate painting has been completed. |
| private Container | |
| private boolean | Returns: true if successful, false otherwise.Renders the BufferStrategy to the screen. |
| private BufferStrategyPaintManager. | getBufferInfo(Container root)
Returns the BufferInfo for the specified root or null if one hasn't been created yet. |
| public boolean | paint(JComponent paintingComponent, JComponent bufferComponent, Graphics g, int x, int y, int w, int h)
Overrides javax. Paints a region of a component |
| private boolean | Returns: true if should use buffering per window in painting.Calculates information common to paint/copyArea. |
| private void | |
| private void | |
| public boolean | show(Container c, int x, int y, int w, int h)
Overrides javax. Shows the specified region of the back buffer. |
| accumulatedMaxX | back to summary |
|---|---|
| private int accumulatedMaxX | |
| accumulatedMaxY | back to summary |
|---|---|
| private int accumulatedMaxY | |
| accumulatedX | back to summary |
|---|---|
| private int accumulatedX | |
| accumulatedY | back to summary |
|---|---|
| private int accumulatedY | |
| bsg | back to summary |
|---|---|
| private Graphics bsg Graphics from the BufferStrategy. | |
| bufferInfo | back to summary |
|---|---|
| private BufferStrategyPaintManager. BufferInfo corresponding to root. | |
| bufferInfos | back to summary |
|---|---|
| private ArrayList<BufferStrategyPaintManager. List of BufferInfos. We don't use a Map primarily because there are typically only a handful of top level components making a Map overkill. | |
| bufferStrategy | back to summary |
|---|---|
| private BufferStrategy bufferStrategy BufferStrategy currently being used. | |
| disposeBufferOnEnd | back to summary |
|---|---|
| private boolean disposeBufferOnEnd Set to true if the bufferInfo needs to be disposed when current paint loop is done. | |
| LOGGER | back to summary |
|---|---|
| private static final PlatformLogger LOGGER | |
| painting | back to summary |
|---|---|
| private boolean painting Indicates | |
| rootJ | back to summary |
|---|---|
| private JComponent rootJ Farthest JComponent ancestor for the current paint/copyArea. | |
| showing | back to summary |
|---|---|
| private boolean showing Indicates we're in the process of showing. All painting, on the EDT, is blocked while this is true. | |
| xOffset | back to summary |
|---|---|
| private int xOffset Location of component being painted relative to root. | |
| yOffset | back to summary |
|---|---|
| private int yOffset Location of component being painted relative to root. | |
| BufferStrategyPaintManager | back to summary |
|---|---|
| pack-priv BufferStrategyPaintManager() | |
| accumulate | back to summary |
|---|---|
| private void accumulate(int x, int y, int w, int h) | |
| beginPaint | back to summary |
|---|---|
| public void beginPaint() Overrides javax. Doc from javax. Invoked prior to any calls to paint or copyArea. | |
| copyArea | back to summary |
|---|---|
| public void copyArea(JComponent c, Graphics g, int x, int y, int w, int h, int deltaX, int deltaY, boolean clip) Overrides javax. Doc from javax. Does a copy area on the specified region. | |
| dispose | back to summary |
|---|---|
| protected void dispose() Overrides javax. Cleans up any created BufferStrategies. | |
| dispose | back to summary |
|---|---|
| private void dispose(List<BufferStrategyPaintManager. | |
| doubleBufferingChanged | back to summary |
|---|---|
| public void doubleBufferingChanged(final JRootPane rootPane) Overrides javax. Invoked when the double buffering or useTrueDoubleBuffering changes for a JRootPane. If the rootpane is not double buffered, or true double buffering changes we throw out any cache we may have. | |
| doubleBufferingChanged0 | back to summary |
|---|---|
| private void doubleBufferingChanged0(JRootPane rootPane) Does the work for doubleBufferingChanged. | |
| endPaint | back to summary |
|---|---|
| public void endPaint() Overrides javax. Doc from javax. Invoked to indicate painting has been completed. | |
| fetchRoot | back to summary |
|---|---|
| private Container fetchRoot(JComponent c) | |
| flushAccumulatedRegion | back to summary |
|---|---|
| private boolean flushAccumulatedRegion() Renders the BufferStrategy to the screen.
| |
| getBufferInfo | back to summary |
|---|---|
| private BufferStrategyPaintManager. Returns the BufferInfo for the specified root or null if one hasn't been created yet. | |
| paint | back to summary |
|---|---|
| public boolean paint(JComponent paintingComponent, JComponent bufferComponent, Graphics g, int x, int y, int w, int h) Overrides javax. Doc from javax. Paints a region of a component | |
| prepare | back to summary |
|---|---|
| private boolean prepare(JComponent c, Container root, boolean isPaint, int x, int y, int w, int h) Calculates information common to paint/copyArea.
| |
| resetAccumulated | back to summary |
|---|---|
| private void resetAccumulated() | |
| resetDoubleBufferPerWindow | back to summary |
|---|---|
| private void resetDoubleBufferPerWindow() Turns off double buffering per window. | |
| show | back to summary |
|---|---|
| public boolean show(Container c, int x, int y, int w, int h) Overrides javax. Shows the specified region of the back buffer. This will return true if successful, false otherwise. This is invoked on the toolkit thread in response to an expose event. | |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private boolean | |
| private boolean | |
| private WeakReference | |
| private WeakReference |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | componentHidden(ComponentEvent e)
Overrides java. Implements java. Invoked when the component has been made invisible. |
| private BufferStrategy | |
| private BufferStrategy | |
| public void | |
| public BufferStrategy | getBufferStrategy(boolean
If true and the BufferStrategy is currently null,
one will be created. create)Returns the BufferStrategy. |
| public boolean | |
| public boolean | |
| public Container | |
| public boolean | hasBufferStrategyChanged()
Returns true if the buffer strategy of the component differs from current buffer strategy. |
| public boolean | |
| public void | |
| public void | |
| public void | |
| public void | windowActivated(WindowEvent e)
Implements java. Invoked when the Window is set to be the active Window. |
| public void | windowClosed(WindowEvent e)
Implements java. Invoked when a window has been closed as the result of calling dispose on the window. |
| public void | windowClosing(WindowEvent e)
Implements java. Invoked when the user attempts to close the window from the window's system menu. |
| public void | windowDeactivated(WindowEvent e)
Implements java. Invoked when a Window is no longer the active Window. |
| public void | windowDeiconified(WindowEvent e)
Implements java. Invoked when a window is changed from a minimized to a normal state. |
| public void | windowIconified(WindowEvent e)
Implements java. Invoked when a window is changed from a normal to a minimized state. |
| public void | windowOpened(WindowEvent e)
Implements java. Invoked the first time a window is made visible. |
| contentsLostDuringExpose | back to summary |
|---|---|
| private boolean contentsLostDuringExpose | |
| inSync | back to summary |
|---|---|
| private boolean inSync | |
| paintAllOnExpose | back to summary |
|---|---|
| private boolean paintAllOnExpose | |
| root | back to summary |
|---|---|
| private WeakReference<Container> root | |
| weakBS | back to summary |
|---|---|
| private WeakReference<BufferStrategy> weakBS | |
| BufferInfo | back to summary |
|---|---|
| public BufferInfo(Container root) | |
| componentHidden | back to summary |
|---|---|
| public void componentHidden(ComponentEvent e) Overrides java. Implements java. Doc from java. Invoked when the component has been made invisible. | |
| createBufferStrategy | back to summary |
|---|---|
| private BufferStrategy createBufferStrategy() Creates the BufferStrategy. If the appropriate system property has been set we'll try for flip first and then we'll try for blit. | |
| createBufferStrategy | back to summary |
|---|---|
| private BufferStrategy createBufferStrategy(Container root, boolean isVsynced) | |
| dispose | back to summary |
|---|---|
| public void dispose() Cleans up and removes any references. | |
| getBufferStrategy | back to summary |
|---|---|
| public BufferStrategy getBufferStrategy(boolean create) Returns the BufferStrategy. This will return null if
the BufferStrategy hasn't been created and
| |
| getContentsLostDuringExpose | back to summary |
|---|---|
| public boolean getContentsLostDuringExpose() | |
| getPaintAllOnExpose | back to summary |
|---|---|
| public boolean getPaintAllOnExpose() | |
| getRoot | back to summary |
|---|---|
| public Container getRoot() Returns the Root (Window) that this BufferInfo references. | |
| hasBufferStrategyChanged | back to summary |
|---|---|
| public boolean hasBufferStrategyChanged() Returns true if the buffer strategy of the component differs from current buffer strategy. | |
| isInSync | back to summary |
|---|---|
| public boolean isInSync() Whether or not the contents of the buffer strategy is in sync with the window. This is set to true when the root pane paints all, and false when contents are lost/restored. | |
| setContentsLostDuringExpose | back to summary |
|---|---|
| public void setContentsLostDuringExpose(boolean value) | |
| setInSync | back to summary |
|---|---|
| public void setInSync(boolean inSync) | |
| setPaintAllOnExpose | back to summary |
|---|---|
| public void setPaintAllOnExpose(boolean paintAllOnExpose) | |
| windowActivated | back to summary |
|---|---|
| public void windowActivated(WindowEvent e) Implements java. Doc from java. Invoked when the Window is set to be the active Window. Only a Frame or a Dialog can be the active Window. The native windowing system may denote the active Window or its children with special decorations, such as a highlighted title bar. The active Window is always either the focused Window, or the first Frame or Dialog that is an owner of the focused Window. | |
| windowClosed | back to summary |
|---|---|
| public void windowClosed(WindowEvent e) Implements java. Doc from java. Invoked when a window has been closed as the result of calling dispose on the window. | |
| windowClosing | back to summary |
|---|---|
| public void windowClosing(WindowEvent e) Implements java. Doc from java. Invoked when the user attempts to close the window from the window's system menu. | |
| windowDeactivated | back to summary |
|---|---|
| public void windowDeactivated(WindowEvent e) Implements java. Doc from java. Invoked when a Window is no longer the active Window. Only a Frame or a Dialog can be the active Window. The native windowing system may denote the active Window or its children with special decorations, such as a highlighted title bar. The active Window is always either the focused Window, or the first Frame or Dialog that is an owner of the focused Window. | |
| windowDeiconified | back to summary |
|---|---|
| public void windowDeiconified(WindowEvent e) Implements java. Doc from java. Invoked when a window is changed from a minimized to a normal state. | |
| windowIconified | back to summary |
|---|---|
| public void windowIconified(WindowEvent e) Implements java. Doc from java. Invoked when a window is changed from a normal to a minimized state. For many platforms, a minimized window is displayed as the icon specified in the window's iconImage property. | |
| windowOpened | back to summary |
|---|---|
| public void windowOpened(WindowEvent e) Implements java. Doc from java. Invoked the first time a window is made visible. | |