Interface Paintlet
-
- All Superinterfaces:
ShallowCopySupporter<Paintlet>
- All Known Implementing Classes:
AbstractPaintlet
,Null
public interface Paintlet extends ShallowCopySupporter<Paintlet>
An interface for image paintlets.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ImagePanel.PaintPanel
getPaintPanel()
Returns the paint panel of the panel, null if no panel present.ImagePanel
getPanel()
Returns the image panel currently in use.boolean
getRepaintOnChange()
Returns whether the paintlet reacts with repaints to changes of its members.boolean
hasPanel()
Returns whether a panel has been set.boolean
isEnabled()
Returns whether the paintlet is currently enabled.void
paint(Graphics g)
The paint routine of the paintlet.void
setEnabled(boolean value)
Sets whether the paintlet is enabled or not.void
setPanel(ImagePanel value)
Sets the image panel to use, null to disable painting.void
setPanel(ImagePanel value, boolean register)
Sets the image panel to use, null to disable painting.void
setRepaintOnChange(boolean value)
Sets whether the paintlet reacts with repaints to changes of its members.-
Methods inherited from interface adams.core.ShallowCopySupporter
shallowCopy, shallowCopy
-
-
-
-
Method Detail
-
setPanel
void setPanel(ImagePanel value)
Sets the image panel to use, null to disable painting.- Parameters:
value
- the panel to paint on
-
setPanel
void setPanel(ImagePanel value, boolean register)
Sets the image panel to use, null to disable painting.- Parameters:
value
- the panel to paint onregister
- whether to register the panel
-
getPanel
ImagePanel getPanel()
Returns the image panel currently in use.- Returns:
- the panel in use
-
hasPanel
boolean hasPanel()
Returns whether a panel has been set.- Returns:
- true if a panel is currently set
-
getPaintPanel
ImagePanel.PaintPanel getPaintPanel()
Returns the paint panel of the panel, null if no panel present.- Returns:
- the paint panel
-
setEnabled
void setEnabled(boolean value)
Sets whether the paintlet is enabled or not. Setting it to true automatically initiates a repaint. Is not affected by m_RepaintOnChange.- Parameters:
value
- if true then the paintlet is enabled
-
isEnabled
boolean isEnabled()
Returns whether the paintlet is currently enabled.- Returns:
- true if the paintlet is enabled.
-
setRepaintOnChange
void setRepaintOnChange(boolean value)
Sets whether the paintlet reacts with repaints to changes of its members.- Parameters:
value
- if true then the paintlet repaints whenever members get changed
-
getRepaintOnChange
boolean getRepaintOnChange()
Returns whether the paintlet reacts with repaints to changes of its members.- Returns:
- true if paintlet repaints whenever members get changed
-
paint
void paint(Graphics g)
The paint routine of the paintlet.- Parameters:
g
- the graphics context to use for painting- See Also:
isEnabled()
-
-