public class P2DComponentView extends java.lang.Object implements P2DViewInterface
public void updateGeometry();
public void draw (Graphics2D g);
P2DComponentViewInterface
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
version |
Constructor and Description |
---|
P2DComponentView()
The default construtor.
|
Modifier and Type | Method and Description |
---|---|
void |
draw(P2DComponentInterface component,
P2DContainerInterface container,
java.awt.Graphics2D g)
Draw the component specific elements.
|
void |
drawBackground(P2DComponentInterface component,
P2DContainerInterface container,
java.awt.Graphics2D g)
Draw the component's background.
|
void |
drawChildren(P2DComponentInterface component,
P2DContainerInterface container,
java.awt.Graphics2D g)
Draw the component's children.
|
void |
drawFrame(P2DComponentInterface component,
P2DContainerInterface container,
java.awt.Graphics2D g)
Draw the component's frame.
|
java.lang.String |
getVersion() |
void |
initialize()
Initialize the object.
|
void |
install(P2DComponentInterface component)
Install the view for the given component.
|
void |
paint(P2DComponentInterface component,
java.awt.Graphics2D g)
Paint the component.
|
void |
paint(P2DComponentInterface component,
P2DContainerInterface container,
java.awt.Graphics2D g2)
Paint the component.
|
void |
release()
Release the object.
|
void |
release(P2DComponentInterface component)
Release the view.
|
void |
revalidate(P2DComponentInterface component,
boolean revalidate)
Request a newly calculation of the component.
|
void |
uninstall(P2DComponentInterface component)
Uninstall the view for the given component.
|
public static final java.lang.String version
public java.lang.String getVersion()
public void release()
public void initialize()
initialize
in interface P2DViewInterface
public void release(P2DComponentInterface component)
public void install(P2DComponentInterface component)
install
in interface P2DViewInterface
public void uninstall(P2DComponentInterface component)
uninstall
in interface P2DViewInterface
public void revalidate(P2DComponentInterface component, boolean revalidate)
revalidate
in interface P2DViewInterface
public void paint(P2DComponentInterface component, java.awt.Graphics2D g)
g
- The graphics context.public void paint(P2DComponentInterface component, P2DContainerInterface container, java.awt.Graphics2D g2)
This method saves the transformation of the context. This information will be stored in a hashtable where the key is the toplevel container.
The method will configure the graphical context, and will call the methods drawBackground, draw, drawChildren, drawFrame in a save graphical environment.
paint
in interface P2DViewInterface
container
- The toplevel container.component
- the component to be paint.g2
- The graphics context.public void draw(P2DComponentInterface component, P2DContainerInterface container, java.awt.Graphics2D g)
draw
in interface P2DViewInterface
g
- The graphics context.component
- The component to be paint.container
- The toplevel container.public void drawBackground(P2DComponentInterface component, P2DContainerInterface container, java.awt.Graphics2D g)
drawBackground
in interface P2DViewInterface
container
- The toplevel container.component
- The component to be paint.g
- The graphics context.public void drawFrame(P2DComponentInterface component, P2DContainerInterface container, java.awt.Graphics2D g)
drawFrame
in interface P2DViewInterface
container
- The toplevel container.component
- The component to be paint.g
- The graphics context.public void drawChildren(P2DComponentInterface component, P2DContainerInterface container, java.awt.Graphics2D g)
drawChildren
in interface P2DViewInterface
container
- The toplevel container.component
- The component to be paint.g
- The graphics context.