package bluej.extensions.painter;
import java.awt.Graphics2D;
import bluej.extensions.BClassTarget;
|
| This interface allows extensions to provide custom implementations for
| painting a class target. Although, extensions are not allowed to define a
| completely new visual representation of a class target. A class target is
| always rectangular and the name of the class is printed in the top area. Only
| the area below the name may be customized by extensions.
| </p>
|
| To prevent extensions from painting over each others representation of a
| class target, the process is split into two methods. One is responsible for
| the background while the other prints the foreground. Extensions are
| encouraged to decide wisely where their painting should go. However, there is
| no guarantee that your drawing will not be painted over by another extension.
| </p>
|
| NOTE: The warnings of BlueJ (e.g. the stripped image, if the class is
| uncompiled and the "broken" image if the source code could not be parsed)
|* will always be drawn <em>after</em> the extensions have drawn their images.
* Therefore, extensions are unable to paint over the warnings or prevent them
| from appearing.
| </p>
|
| @author Simon Gerlach
|
public interface ExtensionClassTargetPainter
{
| Ask the extension to draw the background of its class target
| representation.
|
| @param bClassTarget
| The class target that will be painted.
| @param graphics
| The {}link Graphics2D} instance to draw on.
| @param width
| The width of the area to paint.
| @param height
| The height of the area to paint.
|
p.public void drawClassTargetBackground(BClassTarget bClassTarget, Graphics2D graphics, int width, int height);
| Ask the extension to draw the foreground of its class target
| representation.
|
| @param bClassTarget
| The class target that will be painted.
| @param graphics
| The {}link Graphics2D} instance to draw on.
| @param width
| The width of the area to paint.
| @param height
| The height of the area to paint.
|
p.public void drawClassTargetForeground(BClassTarget bClassTarget, Graphics2D graphics, int width, int height);
}
top,
use,
map,
interface ExtensionClassTargetPainter
. drawClassTargetBackground
. drawClassTargetForeground
11 neLoCode
+ 40 LoComm