public class GuiCfg
extends java.lang.Object
initMain()
: initializes the GUI
stepMain()
: Will be invoked in the main loop.
finishMain()
: invoked on exit.
main(String[])
. It is a complete ready to run application.
The content of the GUI can be controlled by a script. The command line arguments are parsed in
GralArea9MainCmd
, the universal or basic MainCmd for gral-GUI applications.
GralCfgZbnf
in the initMain()
routine.
Modifier and Type | Field and Description |
---|---|
protected GralUserAction |
actionFile |
(package private) GralArea9Panel |
area9 |
(package private) GuiCallingArgs |
cargs
The calling arguments of this class.
|
private GralUserAction |
cmdInvoke
Registered as user action.
|
LogMessage |
console
To Output log informations.
|
GralMng |
gralMng
Especially for debug access to the singleton instance, start with _ to present on top of variables.
|
GralCfgBuilder |
guiCfgBuilder |
GralCfgData |
guiCfgData
The configuration data for graphical appearance.
|
private Inspector |
inspector
Composition of a Inspector-Target instance.
|
protected JZtxtcmd |
jzcmd |
protected GralActionJztc |
jzTcActions |
protected GralMenu |
menuBar |
(package private) GralTextBox |
outputBox
An output box assembled as bottom area of the area9.
|
protected GralPlugUser2Gral_ifc |
plugUser2Gui |
protected GralPos |
refPos
The meaning of this GralPos is, it contains the reference to this.gralMng.
|
(package private) GralPanelContent |
tabPanel
The panel for all tabs from configuration.
|
protected GralPlugUser_ifc |
user
Some actions may be processed by a user implementation.
|
static java.lang.String |
version
The version, history and license.
|
GralWindow |
window |
Constructor and Description |
---|
GuiCfg(GuiCallingArgs cargs,
GralPlugUser_ifc plugUser,
GralPlugUser2Gral_ifc plugUser2Gui,
java.util.List<java.lang.String> cfgConditions)
ctor for the main class of a GUI application.
|
Modifier and Type | Method and Description |
---|---|
void |
appendTextInfoBox(java.lang.CharSequence text) |
private static GralCfgBuilder |
buildGuiCfg(GuiCallingArgs cargs,
GralCfgData guiCfgData,
GralPanelContent panel)
Build the graphic with given textual configuration data.
|
void |
execute()
This operation should be called in main().
|
protected void |
finishMain()
This routine is called on end of main-execution.
|
GralPlugUser_ifc |
getPluggedUser() |
private void |
initJzTc() |
protected void |
initMain() |
protected void |
initMenuGralDesigner()
Initializes the areas for the panels and configure the panels.
|
static void |
main(java.lang.String[] cmdArgs)
The command-line-invocation (primary command-line-call).
|
private static GralActionJztc |
processJzTc(JZtxtcmd jzcmd,
java.io.File fileJzTc,
GuiCfg gui) |
protected void |
readConfig(java.io.File fileCfg)
Reads a new configuration from the given file.
|
void |
setTextInfoBox(java.lang.CharSequence text) |
void |
showInfoBox(java.lang.CharSequence text) |
static int |
smain(java.lang.String[] cmdArgs)
Possible to start from another program, not as main.
|
protected void |
stepMain() |
(package private) void |
stop() |
protected void |
userInit()
Will be overridden...
|
public static final java.lang.String version
InspcGui
.
#GuiCfg(GuiCallingArgs, GralArea9MainCmd, GralPlugUser_ifc, GralPlugUser2Gral_ifc, List)
:
cfgConditions.
#showMethods
GralPlugUser_ifc
which may be null: A plugin may be instantiated
by reflection with String given class name. It may be possible to give it as parameter too.
GralPlugUser2Gral_ifc
which may be null.
Idea: a derived class should support it. Other Idea: either both via reflection or both maybe direct.
GralCfgDesigner
.
#_gralMng
now.
Generally an application may have more as one tabbed panels.
initMain()
as override-able method instead direct call of initializing.
GuiCallingArgs
as primary class, not an inner class here.
GralArea9MainCmd
as extra primary class.
GralPanelContent
instead the special InspcGuiPanelContent.
userInit()
as override-able method instead direct call of user.init().
Advantage: User can do anything in the derived class.
private final Inspector inspector
GuiCallingArgs.sInspectorOwnPort
is given as argument.
It means it depends on the arguments of the user, or maybe set this argurment by the inheriting application.public final LogMessage console
protected final JZtxtcmd jzcmd
protected final GralActionJztc jzTcActions
final GuiCallingArgs cargs
public final GralCfgData guiCfgData
public final GralCfgBuilder guiCfgBuilder
protected GralPlugUser_ifc user
protected final GralPlugUser2Gral_ifc plugUser2Gui
public final GralMng gralMng
protected final GralPos refPos
public final GralWindow window
protected final GralMenu menuBar
final GralArea9Panel area9
final GralPanelContent tabPanel
final GralTextBox outputBox
private final GralUserAction cmdInvoke
protected GralUserAction actionFile
public GuiCfg(GuiCallingArgs cargs, GralPlugUser_ifc plugUser, GralPlugUser2Gral_ifc plugUser2Gui, java.util.List<java.lang.String> cfgConditions)
GuiCallingArgs.sTitle
, should be given by command line arguments or set before construction.
#init()
which can be overridden.
refPos
refers the last created panel,
so that panel can immediately used for widgets, or the window can be selected etc. pp.cargs
- The given calling arguments.
If GuiCallingArgs.sTitle
is set then this is used as title for the window.cmdGui
- The GUI-organization.plugUser2Gui
- maybe possible a instances which plugs the user instance to the GUI.
This instance may be defined in the context which calls this constructor.
Note: A user instance may be instantiated with the cmd line calling argument "-plugin=JAVACLASSPATH"private static GralActionJztc processJzTc(JZtxtcmd jzcmd, java.io.File fileJzTc, GuiCfg gui)
private static GralCfgBuilder buildGuiCfg(GuiCallingArgs cargs, GralCfgData guiCfgData, GralPanelContent panel)
cargs
- argumentsguiCfgData
- destination for the config datapanel
- panel for widgets.GralCfgDesigner
.private void initJzTc()
public GralPlugUser_ifc getPluggedUser()
protected void userInit()
protected void initMenuGralDesigner()
protected void initMain()
protected void readConfig(java.io.File fileCfg)
fileCfg
- protected void stepMain()
protected void finishMain()
Closeable.close()
.public final void execute()
stepMain()
with 20 ms wait time,
and closes all necessities.
An unexpected exception is written to System.err.public void showInfoBox(java.lang.CharSequence text)
public void setTextInfoBox(java.lang.CharSequence text)
public void appendTextInfoBox(java.lang.CharSequence text)
public static void main(java.lang.String[] cmdArgs)
args
- Some calling arguments are taken. This is the GUI-configuration especially.public static int smain(java.lang.String[] cmdArgs)
cmdArgs
- given argumentscargs
- void stop()