Class CompColor

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----UpdatableComponentImpl
                                   |
                                   +----CompColor

public class CompColor
extends UpdatableComponentImpl
This class produces a component that represents RGB color as a colored rectangle.

See Also:
UpdatableComponentImpl

Constructor Index

 o CompColor(RGBCoord)
Constructs colored rectangle component with argument.

Method Index

 o insets()
Overrides the default insets() method.
 o minimumSize()
Overrides the default minimumSize() method.
 o preferredSize()
Overrides the default preferredSize() method.
 o update()
Self-update method.
 o update(Graphics)
Overrides the default update(Graphics) method in order not to clear screen to avoid flicker.

Constructors

 o CompColor
 public CompColor(RGBCoord rgbc)
Constructs colored rectangle component with argument.

Parameters:
rgbc - reference to RGB coordinates.
See Also:
RGBCoord

Methods

 o update
 public void update()
Self-update method. It is called when the component has to be updated.

Overrides:
update in class UpdatableComponentImpl
 o minimumSize
 public Dimension minimumSize()
Overrides the default minimumSize() method.

Returns:
new Dimension
Overrides:
minimumSize in class Container
 o preferredSize
 public Dimension preferredSize()
Overrides the default preferredSize() method.

Returns:
new Dimension
Overrides:
preferredSize in class Container
 o insets
 public Insets insets()
Overrides the default insets() method.

Returns:
new Insets
Overrides:
insets in class Container
 o 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