|
||||||||||
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.JLayeredPane bibliothek.gui.dock.station.OverpaintablePanel
public class OverpaintablePanel
A panel which contains two children, the "base pane" and the "overlay pane".
The "overlay pane" is painted above the "base pane" and all its children. It
can be used to paint arbitrary figures. Clients can change the painting
code by overriding paintOverlay(Graphics)
.
Clients will add new Component
s to the "content pane". Normally the
"content pane" is the same as the "base pane", but it is possible to use two
different JComponent
s for them. The client that replaces a
"content pane" has to add the new panel to the "base pane". It is possible
to put some Container
s between "base pane" and "content pane".
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JLayeredPane |
---|
JLayeredPane.AccessibleJLayeredPane |
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.JLayeredPane |
---|
DEFAULT_LAYER, DRAG_LAYER, FRAME_CONTENT_LAYER, LAYER_PROPERTY, MODAL_LAYER, PALETTE_LAYER, POPUP_LAYER |
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 | |
---|---|
OverpaintablePanel()
Creates a new panel |
Method Summary | |
---|---|
void |
doLayout()
|
JComponent |
getBasePane()
The basic panel, directly added to this . |
JComponent |
getContentPane()
Gets the layer on which new components should be inserted. |
Dimension |
getMaximumSize()
|
Dimension |
getMinimumSize()
|
Dimension |
getPreferredSize()
|
boolean |
isSolid()
Tells whether the background of this panel should be painted or not. |
protected void |
paintOverlay(Graphics g)
Paints the overlay over all components. |
void |
setBasePane(JComponent base)
Sets the panel which is added to this , and which is an
ancestor of the content-pane. |
void |
setContentPane(JComponent content)
Sets the panel on which clients should add their children. |
void |
setSolid(boolean solid)
Tells this panel whether the background should be painted or not. |
Methods inherited from class javax.swing.JLayeredPane |
---|
addImpl, getAccessibleContext, getComponentCountInLayer, getComponentsInLayer, getComponentToLayer, getIndexOf, getLayer, getLayer, getLayeredPaneAbove, getObjectForLayer, getPosition, highestLayer, insertIndexForLayer, isOptimizedDrawingEnabled, lowestLayer, moveToBack, moveToFront, paint, paramString, putLayer, remove, removeAll, setLayer, setLayer, setPosition |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public OverpaintablePanel()
Method Detail |
---|
public void setSolid(boolean solid)
true
,
then the background is painted.BackgroundComponent
s only.
solid
- whether to paint the background or notpublic boolean isSolid()
true
if the background is painted, false
if this component
is transparentpublic void setContentPane(JComponent content)
content
is not added to the base-panel, that must be done
by the client.
content
- the contents of this panelpublic JComponent getContentPane()
public void setBasePane(JComponent base)
this
, and which is an
ancestor of the content-pane. The content-pane is replaced by
base
when this method is called.
base
- the new basepublic JComponent getBasePane()
this
.
protected void paintOverlay(Graphics g)
g
- the graphics to usepublic Dimension getMinimumSize()
getMinimumSize
in class JComponent
public Dimension getPreferredSize()
getPreferredSize
in class JComponent
public Dimension getMaximumSize()
getMaximumSize
in class JComponent
public void doLayout()
doLayout
in class Container
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |