|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.freehep.postscript.viewer.BufferedPanel
public abstract class BufferedPanel
This class extends JPanel by adding double buffering. This is intended to be used in situations in which redrawing the contents of the panel is expensive.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
BufferedPanel()
|
|
BufferedPanel(boolean opaque)
|
Method Summary | |
---|---|
Graphics |
getOffscreenGraphics()
Returns a pointer to the graphics (Graphics) context of the buffer. |
void |
invalidate()
Triggers a full repaint, since the component is not valid anymore (size change, iconized, ...) |
boolean |
isDisplaying()
Returns true if the drawing is made for a Graphics context, the display. |
boolean |
isPrinting()
Returns true if the drawing is made for a PrinterGraphics context. |
void |
paintComponent(Graphics g)
Paint this panel by calling paintComponent(Graphics) if necessary and flushing the buffered image to the screen. |
void |
repaint()
Triggers a full "user" repaint. |
abstract void |
repaintComponent(Graphics graphics)
Really repaint the component |
void |
setBounds(int x,
int y,
int w,
int h)
Resize and move a component. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BufferedPanel()
public BufferedPanel(boolean opaque)
Method Detail |
---|
public void repaint()
repaint
in class Component
public void invalidate()
invalidate
in class Container
public void paintComponent(Graphics g)
paintComponent
in class JComponent
g
- Graphics objectpublic abstract void repaintComponent(Graphics graphics)
graphics
- public Graphics getOffscreenGraphics()
NOTE: this method used to be called getGraphics, however, since the JVM paint thread may call getGraphics from paintImmediately and fails to work with our VectorGraphics context (the gc is not longer attached to the image), we decided to rename the method.
public void setBounds(int x, int y, int w, int h)
setBounds
in class Component
public boolean isPrinting()
public boolean isDisplaying()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |