|
FreeHEP API Version current |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel org.freehep.graphics2d.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 inherited from class javax.swing.JPanel |
JPanel.AccessibleJPanel |
Nested classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, 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)
Creates a new BufferedPanel with a width and height set to zero. |
Method Summary | |
Graphics |
getBufferedGraphics()
Returns a pointer to the graphics (VectorGraphics) 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 PixelGraphics context, the display. |
boolean |
isExporting()
Returns true if the drawing is made for a VectorGraphics context. |
boolean |
isPrinting()
Returns true if the drawing is made for a PrinterGraphics context. |
void |
paintComponent(Graphics g)
Paint this panel by calling paintComponent(VectorGraphics) if necessary and flushing the buffered image to the screen. |
void |
paintComponent(VectorGraphics vg)
Allows for custom graphics to be painted. |
void |
repaint()
Triggers a full "user" repaint. |
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)
opaque
- transparent panelMethod Detail |
public void repaint()
public void invalidate()
public void paintComponent(Graphics g)
g
- Graphics objectpublic Graphics getBufferedGraphics()
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 paintComponent(VectorGraphics vg)
public void setBounds(int x, int y, int w, int h)
public boolean isPrinting()
public boolean isExporting()
public boolean isDisplaying()
|
FreeHEP API Version current |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |