Graphical User Interface



Graphical User Interface Elements



Free Text

A free text is a one-line editable text string. By single-clicking with the left mouse button the text can be edited. From the edit menu it is possible to change most of the text properties. The font size can also be changed with the mouse using the vertical resize handles.

Menu Choices:

Brings up an editor window from which the text properties can be changed.



x and y:
Changes the position of the text.

Font Size:
Changes the font size.

Text:
Changes the text content.

Visible:
Decides whether the text should be visible or hidden.

Selectable:
Decides whether it should be possible to select the text with mouse or not.

Resizable:
Decides whether it should be possible to resize the text with the mouse or not.

Draggable:
Decides whether it should be possible to drag the text with the mouse or not.

2D Scale:
Change whether the resizing of the text depends on both the width and the height, rather than just the height to determine the font size to use in displaying the string.

Text:
Change the text of the string.

Face:
Change the font face of the string. The available choices depend on which fonts that are available on the particular machine. In order to ensure portability between different platforms it is recommended to only use the following five symbolical face names: Serif, SansSerif, Monospaced, Dialog, DialogInput. These are guaranteed to be available in every Java system. However, they may map to different real fonts depending on the platform.

AutoResize:
Change whether the text should automatically adjust its length when the text string is changed.

Clipping:
Change whether the text is only drawn within the bounding rectangle.

Editable:
Change whether the text is editable by the end user.

Single Click Edit:
If the text is editable, control whether the user can start editing with a double click or with a single click.

Bold:
Change the boldness of the text.

Italic:
Change whether the text is italic.

Underline:
Change whether the text is underlined.

Strike:
Change whether the text is shown with a strike-through.

Align Left:

Left justify each line.

Center:
Center each line.

Align Right:
Right justify each line.

Text Color:
Brings up a JColorChooser menu from which the user can change the text colour.

Background:
Brings up a JColorChooser menu from which the user can change the background colour.

Transparent:
Set whether or not the text background is filled with the background color before drawing the text (opaque), or if only the text is drawn without hiding what's underneath the text (transparent).

Select Backgro...:

If the text background is transparent and the text is not resizable, control whether gainedSelection() makes the background opaque and whether lostSelection() makes the background transparent again.

OK:
Apply the changes and close the edit window.

Apply:
Apply the changes.

Cancel:
Cancel any changes and close the edit window.

Brings up an edit menu from which the user can change the name of the free text. The name is used to refer to the text in method calls,



Text Methods:

Changes the text string.
Returns the text string.
Changes the text color.
Returns the current RGB value of the text color.
Changes the background color.
Returns the current RGB value of the background color.
Changes the font size.
Returns the current font size.

Rectangle

A resizable rectangle object. From the edit menu it is possible to change most of the properties of the rectangle.



Menu Choices:

Brings  up a editor window from which the text properties can be changed.



x and y:
Changes the position of the rectangle.

Width:
Change the width..

Height:
Changes the height..

Visible:
Decides whether the rectangle should be visible or hidden.

Selectable:
Decides whether it should be possible to select the rectangle with mouse or not.

Resizable:
Decides whether it should be possible to resize the rectangle with the mouse or not.

Draggable:
Decides whether it should be possible to drag the rectangle with the mouse or not.

Pen width:
Change the pen width of the rectangle.

Pen Properties:
Brush Properties:
Pen Color:
Brings up a JColorChooser menu from which the user can change the pen colour.

Fill Color:
Brings up a JColorChooser menu from which the user can change the fill colour.

OK:
Apply the changes and close the edit window.

Apply:
Apply the changes.

Cancel:
Cancel any changes and close the edit window.


Brings up an edit window from which the user can change the name of the rectangle. The name is used to refer to the rectangle in method calls,



Text Methods:

Changes the pen color.
Returns the current RGB value of the pen color.
Changes the fill color.
Returns the current RGB value of the fill color.
Changes the pen width.
Returns the current pen width.
Changes the pen style Legal values are 0 - No Pen, .65535 - Solid Pen, 1 - Dashed Pen, 2 - Dotted Pen, 3 - Dash Dot Pen, 4 - Dash Dot Dot Pen.
Returns the current pen style.
Removes the rectangle.



Ellipse

A resizable ellipse object. From the edit menu it is possible to change most of the properties of the ellipse.



Menu Choices:

Brings up an editor window from which the ellipse properties can be changed. The editor window and the options are the same as for the rectangle.

Brings up an edit menu from which the user can change the name of the ellipse. The name is used to refer to the ellipse in method calls,

Text Methods:

Changes the pen color.
Returns the current RGB value of the pen color.
Changes the fill color.
Returns the current RGB value of the fill color.
Changes the pen width.
Returns the current pen width.
Changes the pen style Legal values are 0 - No Pen, .65535 - Solid Pen, 1 - Dashed Pen, 2 - Dotted Pen, 3 - Dash Dot Pen, 4 - Dash Dot Dot Pen.
Returns the current pen style.
Removes the ellipse.

Polygon

A resizable eight-corner polygon object. From the edit menu it is possible to change most of the properties of the polygon. The resize handles are used to move the individual corner points. Polygons with different number of corner points are created using line objects.

Menu Choices:

Brings up an editor window from which the polygon properties can be changed. The editor window and the options are the same as for the rectangle with the exception for one additional checkbox.

Cubic Bezier:
Change whether the points should be interconnected with straight lines or with cubic Bezier splines.

Brings up an edit menu from which the user can change the name of the polygon. The name is used to refer to the polygon in method calls,

Text Methods:

Moves a corner point to a new position.
Returns the x coordinate of a point.
Returns the y coordinate of a point.
Changes the pen color.
Returns the current RGB value of the pen color.
Changes the fill color.
Returns the current RGB value of the fill color.
Changes the pen width.
Returns the current pen width.
Changes the pen style Legal values are 0 - No Pen, .65535 - Solid Pen, 1 - Dashed Pen, 2 - Dotted Pen, 3 - Dash Dot Pen, 4 - Dash Dot Dot Pen.
Returns the current pen style.

3D Rectangle

A resizable rectangle object with a 3D appearance. From the edit menu it is possible to change most of the properties of the 3D rectangle.

Menu Choices:

Brings up an editor window from which the rectangle properties can be changed. The window and the options are the same as for the ordinary rectangle.
Brings up an edit window from which the user can change the name of the rectangle. The name is used to refer to the rectangle in method calls,

Text methods:
Changes the pen color.
Returns the current RGB value of the pen color.
Changes the fill color.
Returns the current RGB value of the fill color.
Changes the pen width.
Returns the current pen width.
Changes the pen style Legal values are 0 - No Pen, .65535 - Solid Pen, 1 - Dashed Pen, 2 - Dotted Pen, 3 - Dash Dot Pen, 4 - Dash Dot Dot Pen.
Returns the current pen style.

Line

A line is created by clicking on the Line button in the Misc palette. This causes JGrafchart to change into line-drawing mode. A line is created by clicking with the mouse on the desired starting point of the line. A corner point is created for each subsequent mouse click. The line is terminated with a double-click. If the end point is sufficiently close to the start point a closed polygon will be created instead of a line. The points are sufficiently close if the grid point closest to the start point is the same as the grid point closest to the end point. The line corner points can be moved using the resize handles.

Menu Choices:

Brings  up a editor window from which the line properties can be changed.



x and y:
Changes the position of the rectangle.

Width:
Change the width..

Height:
Changes the height..

Cubic Bezier:
Change whether the points should be interconnected with straight lines or with cubic Bezier splines.

Visible:
Decides whether the rectangle should be visible or hidden.

Selectable:
Decides whether it should be possible to select the rectangle with mouse or not.

Resizable:
Decides whether it should be possible to resize the rectangle with the mouse or not.

Draggable:
Decides whether it should be possible to drag the rectangle with the mouse or not.

Pen width:
Change the pen width of the rectangle.

Pen Properties:
Arrow Properties:
Pen Color:
Brings up a JColorChooser menu from which the user can change the pen colour.

OK:
Apply the changes and close the edit window.

Apply:
Apply the changes.

Cancel:
Cancel any changes and close the edit window.

Brings up an edit menu from which the user can change the name of the line. The name is used to refer to the line in method calls.

Text Methods:

Moves a corner point to a new position.
Returns the x coordinate of a point.
Returns the y coordinate of a point.
Changes the pen color.
Returns the current RGB value of the pen color.
Changes the pen width.
Returns the current pen width.
Changes the pen style Legal values are 0 - No Pen, .65535 - Solid Pen, 1 - Dashed Pen, 2 - Dotted Pen, 3 - Dash Dot Pen, 4 - Dash Dot Dot Pen.
Returns the current pen style.

Spline

A spline is created by clicking on the Spine button in the Misc palette. This causes JGrafchart to change into spline-drawing mode. A spline is created by clicking with the mouse on the desired starting point of the spline. A corner point is created for each subsequent mosue click. The spline is terminated with a double-click. If the end point is sufficiently close to the start point a closed splined polygon will be created instead of a spline. The points are sufficiently close if the grid point closest to the start point is the same as the grid point closest to the end point. The spline corner points can be moved using the resize handles.

Menu Choices:

Brings up an editor window from which the spline properties can be changed. The editor window and options are the same as for the line.
Brings up an edit menu from which the user can change the name of the spline. The name is used to refer to the spline in method calls.

Text Methods:

Moves a corner point to a new position.
Returns the x coordinate of a point.
Returns the y coordinate of a point.
Changes the pen color.
Returns the current RGB value of the pen color.
Changes the pen width.
Returns the current pen width.
Changes the pen style Legal values are 0 - No Pen, .65535 - Solid Pen, 1 - Dashed Pen, 2 - Dotted Pen, 3 - Dash Dot Pen, 4 - Dash Dot Dot Pen.
Returns the current pen style.



Icon

An icon object. The icon is given by an arbitrary .gif  or .jpg file.

Menu Choices:

Brings up an editor window from which the icon file name can be changed.



File name:
The icon file name.

Def. Size:
Change the size of the icon to its original size.
Brings up an edit menu from which the user can change the name of the icon. The name is used to refer to the icon in method calls.

Text Methods:

Change the icon to a new file name.
Change the icon to a new URL.



Action Button

A button to which can be associated JGrafchart actions which are executed when the user clicks on the button with the left mouse button. Clicking on the button with the right button brings up the action button menu.



Name:
The name of the button is a text string that is shown in the center of the button. The size of the button is automatically adjusted to fit the length of the string.

Action:
The action to be executed when the user left clicks on the button. This must be one or several stored actions, e.g., an action could be S Start = 1;

Enabled when stopped:
An action button must have been compiled to be active. If enabled when stopped is selected the action button will be executed will be executed also when the application is stopped, provided that it has been successfully compiled.
By default an action button is not enabled when the application is stopped.

The action button has no menu choices and no text methods.


Graphical Action Button

A graphical button to which can be associated JGrafchart actions which are executed when the user clicks on the button icon with the left mouse button. Clicking on the button icon with the right button brings up the action button menu. The button icon is given by an arbitrary .gif  or .jpg file.




File name:
The icon file name.

Action:
The action to be executed when the user left clicks on the button. This must be one or several stored actions, e.g., an action could be S Start = 1;

Enabled when stopped:
A button must have been compiled to be active. If enabled when stopped is selected the button will be executed also when the application is stopped, provided that it has been successfully compiled.
By default a button is not enabled when the application is stopped.

Def. Size:
Change the size of the icon to its original size.

Text Methods:

Change the icon to a new file name.
Change the icon to a new URL.

Plotter

A one-or two-channel plotter object.

Menu Choices:

A toggle that shows or hides the plotter panel associated with the plotter. The plotter panel can be resized.



Pause:
Pauses the plotting.

Continue:
Continues the plotting.
Brings up an editor window from which the plotter properties can be changed.



Channel 1:
A numerical expression that will be evaluated and plotted on channel one.

Channel 1 Color:
Brings up a JFileChooser from which the pen color of channel one is changed.

Channel 2:
A numerical expression that will be evaluated and plotted on channel two.

Channel 2 Color:
Brings up a JFileChooser from which the pen color of channel two is changed.

X Range (s):
The range of the x-axis in seconds.

X # Ticks:
The number of tick marks on the x-axis.

X # Grid:
The number of grid lines on the x-axis.

Y min:
The minimum value of the y-axis.

Y max:
The maximum value of the y-axis.

Y # Ticks:
The number of tick marks on the y-axis.

Y # Grid:
The number of grid lines on the y-axis.

Update Freq.:
The update frequency in relation to the scan cycle. For example a value of 2 means that the plotter panel will be updated every second scan.

Legend:
A text that will be printed at the top of the plotter panel.

The plotter has no text methods.



Browser

The browser is a scrollable and resizable message browser that can be used for alarm and event displays. The messages are represented by text strings. The user can select a message by clicking on it. A message is de-selected by clicking on another message, clicking again on the selected message, or clicking on the browser background. The selected message is highlighted (the text is displayed in the background color and the background is displayed in the text color). The browser messages are not persistent in the sense that they are not saved with the application.

Menu Choices:

Brings up an editor window from which the browser properties can be changed.


Font Size:
The font size at which newly added messages will be displayed. Does not effect the already inserted messages.

Text Color:
The text color of newly added messages. Does not effect the already inserted messages.

Fill Color:
The background color of the browser.

Font Face:
The font face of newly added messages. Does not effect the already inserted messages.

Bold:
When selected newly inserted messages will be displayed in bold face. Does not effect already inserted messages.
Brings up an edit menu from which the user can change the name of the icon. The name is used to refer to the browser in method calls.

Text Methods:

Adds a string at the end of the browser (the bottom of the browser)
Adds the string at the given location. Index 0 corresponds to the top of the browser.
Removes the item at the given position.
Returns the string at the given position.
Returns the number of items in the list.
Removes all items from the list.
Returns the text of the selected item. Returns the empty string if no item is selected.
Returns the index of the currently selected item. Returns -1 if no item is selected.
Returns the current text color of the browser.
Sets the text color.
Returns the current fill color of the browser.
Sets the fill color.
Returns the text font size..
Sets the text font size.
Returns true if the bold property is set.
Sets the bold property.
Returns the current text font face name..
Sets the text font face name.


Show Workspace Button

A button that is used to show a new workspace slide in a JGrafchart slide show.

Clicking on the button when not executing brings up an edit window in which the global (qualified) name of the next workspace slide to show is entered. Clicking on the button during execution will show this workspace slide.



The show workspace button has no menu choices or text methods.


CHEM Icon

The icon of the CHEM project that has funded the development of JGrafchart.

The CHEM icon has no menu choices and no text methods.





LUCAS Icon

The icon of the LUCAS Center for Applied Software Research at Lund University that also has funded the development of JGrafchart.

The LUCAS icon has no menu choices and no text methods.







Group

A group of object is created by selecting a number of objects and then applying the menu choice Group.


Clicking with the right mouse button in an "empty" part of the group brings up a name display from which the user can change the name of the group. The name is used to reference the group and its internal parts. If the group does not contain any empty space, then the name display can be reached from the tree view window. The internal parts of a group are referenced using dot-notation.