All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jp.kyasu.editor.ColorChoice

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----jp.kyasu.awt.KContainer
                           |
                           +----jp.kyasu.awt.Panel
                                   |
                                   +----jp.kyasu.editor.ColorChoice

public class ColorChoice
extends Panel
The ColorChoice class presents a pop-up menu of choices of colors.

Version:
12 May 1998
Author:
Kazuki YASUMATSU

Constructor Index

 o ColorChoice()
Constructs a color choice with the null default color.
 o ColorChoice(Color)
Constructs a color choice with the specified default color.
 o ColorChoice(Color, Color)
Constructs a color choice with the specified default color and foreground color.

Method Index

 o addItemListener(ItemListener)
Add a listener to recieve item events when the state of an item changes.
 o getColor()
Returns the selected color.
 o main(String[])
Executes the examples.
 o removeItemListener(ItemListener)
Removes an item listener.
 o setEnabled(boolean)
Enables or disables this choice.

Constructors

 o ColorChoice
 public ColorChoice()
Constructs a color choice with the null default color.

 o ColorChoice
 public ColorChoice(Color defaultColor)
Constructs a color choice with the specified default color.

 o ColorChoice
 public ColorChoice(Color defaultColor,
                    Color foreground)
Constructs a color choice with the specified default color and foreground color.

Methods

 o setEnabled
 public synchronized void setEnabled(boolean b)
Enables or disables this choice.

Overrides:
setEnabled in class KContainer
 o getColor
 public Color getColor()
Returns the selected color.

 o addItemListener
 public void addItemListener(ItemListener l)
Add a listener to recieve item events when the state of an item changes.

See Also:
ItemSelectable
 o removeItemListener
 public void removeItemListener(ItemListener l)
Removes an item listener.

See Also:
ItemSelectable
 o main
 public static void main(String args[])
Executes the examples.


All Packages  Class Hierarchy  This Package  Previous  Next  Index