All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class netscape.samples.simple.ShowTextCustomizer

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----netscape.samples.simple.ShowTextCustomizer

public class ShowTextCustomizer
extends Panel
implements Customizer, KeyListener
Note: Images may be missing from the JavaDocs generated.

Do not be alarmed: this is intentional and should not impact the usability of the JavaDocs as a reference.


Variable Index

 o backgroundColor
 o textColor
 o textFont

Constructor Index

 o ShowTextCustomizer()
The constructor initializes basic properties of this customizer class.

Method Index

 o addPropertyChangeListener(PropertyChangeListener)
 o getPreferredSize()
Returns the preferred size for our customizer
 o keyPressed(KeyEvent)
Forces a repaint on keypresses
 o keyReleased(KeyEvent)
On a key release event, set the property of the bean to match the value the user specified in the textfield
 o keyTyped(KeyEvent)
Forces a repaint on keystrokes
 o paint(Graphics)
Paints a preview of what will appear in the main ShowText class using the message specified, using an algorithm similar to the one used in ShowText
 o preferredSize()
Old method used only for older layout managers
 o removePropertyChangeListener(PropertyChangeListener)
 o setObject(Object)
This is called by the tool inspecting ShowText at design time just before instantiating the customizer and displaying it to the user.

Variables

 o textFont
 public Font textFont
 o textColor
 public Color textColor
 o backgroundColor
 public Color backgroundColor

Constructors

 o ShowTextCustomizer
 public ShowTextCustomizer()
The constructor initializes basic properties of this customizer class.

Methods

 o setObject
 public void setObject(Object obj)
This is called by the tool inspecting ShowText at design time just before instantiating the customizer and displaying it to the user.

The textfield used is initialized to the value of the property it controls.

 o paint
 public void paint(Graphics g)
Paints a preview of what will appear in the main ShowText class using the message specified, using an algorithm similar to the one used in ShowText

Overrides:
paint in class Container
 o getPreferredSize
 public Dimension getPreferredSize()
Returns the preferred size for our customizer

Overrides:
getPreferredSize in class Container
 o keyTyped
 public void keyTyped(KeyEvent e)
Forces a repaint on keystrokes

 o keyPressed
 public void keyPressed(KeyEvent e)
Forces a repaint on keypresses

 o keyReleased
 public void keyReleased(KeyEvent e)
On a key release event, set the property of the bean to match the value the user specified in the textfield

 o preferredSize
 public Dimension preferredSize()
Old method used only for older layout managers

Overrides:
preferredSize in class Container
 o addPropertyChangeListener
 public void addPropertyChangeListener(PropertyChangeListener listener)
 o removePropertyChangeListener
 public void removePropertyChangeListener(PropertyChangeListener listener)

All Packages  Class Hierarchy  This Package  Previous  Next  Index