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.
-
inAnApplet
-
-
textArea
-
-
BuildAccessorWindow()
- Constructs a BuildAccessorWindow.
-
action(Event, Object)
- Provides handling for user interface actions.
-
buildGetter(String)
- Constructs a getter definition for the class variable.
-
buildSetter(String)
- Constructs a setter definition for the class variable.
-
handleEvent(Event)
- Handles window events.
-
main(String[])
- Starts a BuildAccessorWindow.
inAnApplet
private boolean inAnApplet
textArea
private TextArea textArea
BuildAccessorWindow
BuildAccessorWindow()
- Constructs a BuildAccessorWindow.
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
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.
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.
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
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