Name

guiControl — This code in this method assists in controlling and customizing the Patchworks user interface.

Overview

This code in this method assists in controlling and customizing the Patchworks user interface.

This control is instantiated in the Patchworks classic_GUI() startup method, and the resulting object is referenced by the global variable 'gui'. This object is able to perform functions such as

  • Simulate the press of buttons on the GUI

  • Add menu items to the GUI

This routine provides support for keeping a list of buttons that have been put on the GUI, and simulating clicks on the buttons according to the name given to the button.

You should not need to call this method directly, that will be done by the method that creates the user interface. However, you can call methods on this object, such as

  • gui.click("start"); to simulate starting the scheduler

  • gui.addMenuItem(menuName, itemName, command, async); To add an item to the menu system.

Read the comments in the source for this script for more details.

Syntax

Object guiControl ( JFrame myFrame ) 

The command has the following arguments:

myFrame

A reference to the main window that contains the GUI.

Description

Return value

A reference to the guiControl object.