Operations Dialog Box
The term "operation" refers to specialized callbacks that you can
define using the GUI builder Operations dialog box. Callbacks are
typically implemented by adding custom code to the Group file
(project.java). However, for simple callbacks, it is
often more convenient to use a GUI builder operation than to add
custom code to the group class. In many cases a GUI builder operation
can automate all of the code generation for a callback. You may find
that you can use the Operations dialog box for all or most of your
callbacks.
Editing Operations Using GUI Builder
The Operations dialog box has Insert and Delete buttons:
- Use the Insert button to create a new operation and add
it to the list of operations.
- Use the Delete button to remove operations from the list.
If you accidentally delete operations, you can click Reset
to return the list to its state after the last Apply
operation. There is no undo operation, so you cannot
reverse changes you have applied.
Each time you click Insert, an operation is added to the
list. GUI builder automatically assigns a unique name for
each operation you create. You can edit that name in the Op Name
field. Note that operations names must be unique within a group.
To create an operation:
- Click Insert to create the operation
- Click on the Filter button to modify the filter associated
with the operations. Filters are described in Filter Editor.
- Click on the Action button to modify the operation's
action. Actions are described in Action Editor.
As you add most filters and actions you can test them
"live" in the layout window. For example, if you specify an operation
that changes the foreground color of a label when a specific button is
clicked, the label will change color in the layout window when the
button is clicked.
Custom actions added in the Action dialog box are available only when
running the application and are not available live in the layout
panel.
See also:
- Adding Operations to Components
- What Is a Component Operation?
- GUI Builder Runtime Classes
- Creating Menus
- What Are Groups and Shadows?
- More On Groups and Shadows
- Visual Java GUI Builder API Documentation
- Visual Java GUI
Builder Runtime Packages
- Class Hierarchy
- Index of
All Fields and Methods