Class PlaneMatch
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----UpdatableComponentImpl
|
+----PlaneMatch
- class PlaneMatch
- extends UpdatableComponentImpl
This class produces an updatable matching component. The matching
component contains a color rectangle of matching color inserted in
the center of a bigger rectangle of the color being matched.
- See Also:
- UpdatableComponentImpl
-
match
- inner color rectangle (matching color)
-
parent
- reference to parent applet
-
PlaneMatch(Color, Game)
- Constructs the matching component.
-
insets()
- Overrides the default insets() method.
-
minimumSize()
- Overrides the default minimumSize() method.
-
preferredSize()
- Overrides the default preferredSize() method.
-
reset(Color)
- Resets the matching component to the background color for the
outer rectangle and parent.rgbLocal color for the inner rectangle.
-
update()
- Self-update method that implements UpdatableComponentIfc.
-
update(Graphics)
- Overrides the default update(Graphics) method
in order not to clear screen to avoid flicker.
parent
Game parent
- reference to parent applet
match
CompColor match
- inner color rectangle (matching color)
PlaneMatch
public PlaneMatch(Color bg,
Game parent)
- Constructs the matching component.
- Parameters:
- bg - background color (color being matched)
- parent - reference to the parent applet.
update
public void update()
- Self-update method that implements UpdatableComponentIfc.
- Overrides:
- update in class UpdatableComponentImpl
- See Also:
- UpdatableComponentIfc
reset
public void reset(Color bg)
- Resets the matching component to the background color for the
outer rectangle and parent.rgbLocal color for the inner rectangle.
- Parameters:
- bg - new background color of the outer rectangle.
update
public void update(Graphics g)
- Overrides the default update(Graphics) method
in order not to clear screen to avoid flicker.
- Overrides:
- update in class Component
minimumSize
public Dimension minimumSize()
- Overrides the default minimumSize() method.
- Returns:
- new Dimension
- Overrides:
- minimumSize in class Container
preferredSize
public Dimension preferredSize()
- Overrides the default preferredSize() method.
- Returns:
- new Dimension
- Overrides:
- preferredSize in class Container
insets
public Insets insets()
- Overrides the default insets() method.
- Returns:
- new Insets
- Overrides:
- insets in class Container