All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Samples.BuildAccessorWindow

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Window
                           |
                           +----java.awt.Frame
                                   |
                                   +----Samples.BuildAccessorWindow

public class BuildAccessorWindow
extends Frame
This class provides a utility to create accessors for class variables. See the main() method for invocation and use.


Variable Index

 o inAnApplet
 o textArea

Constructor Index

 o BuildAccessorWindow()
Constructs a BuildAccessorWindow.

Method Index

 o action(Event, Object)
Provides handling for user interface actions.
 o buildGetter(String)
Constructs a getter definition for the class variable.
 o buildSetter(String)
Constructs a setter definition for the class variable.
 o handleEvent(Event)
Handles window events.
 o main(String[])
Starts a BuildAccessorWindow.

Variables

 o inAnApplet
 private boolean inAnApplet
 o textArea
 private TextArea textArea

Constructors

 o BuildAccessorWindow
 BuildAccessorWindow()
Constructs a BuildAccessorWindow.

Methods

 o handleEvent
 public boolean handleEvent(Event event)
Handles window events. The only one of interest is WINDOW_DESTROY.

Parameters:
event - contains information about the specific event.
Overrides:
handleEvent in class Component
 o buildGetter
 String buildGetter(String declaration)
Constructs a getter definition for the class variable.

Parameters:
declaration - the declaration of the class variable.
Returns:
the new getter definition.
 o buildSetter
 String buildSetter(String declaration)
Constructs a setter definition for the class variable.

Parameters:
declaration - the declaration of the class variable.
Returns:
the new setter definition.
 o action
 public boolean action(Event event,
                       Object arg)
Provides handling for user interface actions. The action of interest is the button click.

Parameters:
event - information about the event
arg - an optional argument connected with the event
Returns:
true
Overrides:
action in class Component
 o main
 public static void main(String args[])
Starts a BuildAccessorWindow. To use, start the BuildAccessorWindow, copy the class variables from a class definition for which you want to build accessors. Paste the class variables into the BuildAccessorWindow text area. Click on the "Click to build accessors" button. The accessors are created below the class variables, they can be copied and pasted back into the original class definition. To run, highlight name below and select run,
 Samples.BuildAccessorWindow
 

Parameters:
args - command line arguments (none expected)

All Packages  Class Hierarchy  This Package  Previous  Next  Index