|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PanelArtist
This interface allows the implementing component to interact with a StackedPanel. The StackedPanel handles all of the details of layering, repainting, etc.; however, it cannot provide the actual content to display. This is the responsibility of the PanelArtist. If the content changes then the PanelArtist is expected to signal to the StackedPanel that a redraw is needed (redrawNeeded method of StackedPanel). The StackedPanel will then callback the PanelArtist via the drawPanel method. The PanelArtist is then responsible for deciding what needs to be drawn. The actual drawing can be done in a background thread if desired. This interface allows only one StackedPanel to be controlled by a given PanelArtist. Consequently, when the setPanelArtist method is called the component should save the value.
Method Summary | |
---|---|
void |
abortDraw()
This method aborts any drawing which is being done in another thread. |
boolean |
drawPanel()
This method draws the graphics onto the StackedPanel. |
JComponent |
getControlPanel()
This method returns a JComponent which contains controls for the given PanelArtist. |
String |
getDescription()
This returns a descriptive string for this PanelArtist. |
Object |
getEventData()
This method returns the data sample which is currently being used. |
StackedPanel |
getStackedPanel()
Return the StackedPanel which is being controlled. |
void |
panelResized()
This method is called when the size of the StackedPanel has changed. |
void |
setEventData(Object data)
This method sets which data sample should be used. |
void |
setStackedPanel(StackedPanel panel)
Set the StackedPanel that this PanelArtist will control. |
Method Detail |
---|
String getDescription()
boolean drawPanel()
void setEventData(Object data)
data
- data sample to useObject getEventData()
void setStackedPanel(StackedPanel panel)
panel
- StackedPanel to controlStackedPanel getStackedPanel()
void abortDraw()
void panelResized()
JComponent getControlPanel()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |