Package org.vishia.gral Description
The package gral is a GRaphic Adaption Layer.
Why it is necessary:
- The graphic systems such as Swing or SWT (eclipse) or a Windows API has the same fundamental concepts to work,
but there are some differences. If a user works for example in Java-Swing, ones sources are not compatible
with SWT or another graphic system for example from QT. There are too may special knowledge necessary
and dependencies existing of the graphic platform.
- A user software should be independent of the graphic platform if only standard requirements are used.
Only for high-specific solutions the full bandwidth of the graphical base system may be need.
- The graphic programming should be easy to do.
The gral supports some independent concepts to fit that requests:
- A frame for a standard GUI application, which supports up to 9 areas in the application window for input, output etc.
org.vishia.gral.area9.GralArea9Window
, org.vishia.gral.area9
- A System to place widgets with grid coordinates, allowing larger and smaller presentation with proper fonts etc.
The user should not deal with pixel positions.
GralPos
- A system to build the graphic from a script.
org.vishia.gral.cfg
- The possibility to edit the appearance of GUI on runtime:
GralCfgDesigner
- Set values for all widgets in another thread than the graphic thread and invoke repaint:
GralWidget_ifc
.
- Animated graphic, especially for process data viewing:
InspcGui
-
Important classes:
GralWidget
: Base class for all user widgets.
GralPos
: Information about positioning
GralMng
: Manager for organization, singleton.
org.vishia.gral.test.HelloWorld
: Example
GralFactory
: Factory interface
AwtFactory
: The Factory for AWT (and swing)
SwtFactory
: The Factory for SWT (Eclipse Graphic widget toolkit)
GralMenu
: The menus both pull-down and right-mouse (context).
GralWindow
: A window, the main or sub windows, dialog boxes.
GralGraphicOrder
: Order initialized from another thread.
org.vishia.gral.area9.GralArea9Window
: Window with 9 areas configurable for typical using
Widgets:
Overview:
The user creates the instances for the window and the Gral manager using a factory class for the choiced graphic base.
Then the appearance of GUI can be created using the
GralMngBuild_ifc
.
After them the user can work with its GUI.
Example ussage of a org.eclipse.swt.widgets.Table from the GUI application 'JavaCommander':
The ObjectModelDiagram shows the application 'JavaCommander'. That application uses some tables to select files, commandes
and selection objects. The classes
FcmdLeftMidRightPanel.FcmdFavorCard
,
GralCommandSelector
and
GralFileSelector
are the 3 representations of selection lists from side of application.
They have its implementation of a
GralSelectList
, which is a base class which supports navigaton in a list.
The
The adaption to a basic system is present yet only for SWT. Adaption to Swing is planned.