org.vishia.guiBzr

## Class BzrGui.CmdLineAndGui

- java.lang.Object
- - org.vishia.mainCmd.MainCmd
  - - org.vishia.gral.area9.GralArea9MainCmd
    - - org.vishia.guiBzr.BzrGui.CmdLineAndGui

- All Implemented Interfaces:
    MainCmd_ifc, MainCmdLogging_ifc, Report, LogMessage
  Enclosing class:
    BzrGui

      private static class BzrGui.CmdLineAndGui
      extends GralArea9MainCmd

  Organisation class for the GUI.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.vishia.mainCmd.MainCmd

      `MainCmd.Argument, MainCmd.SetArgument`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `(package private) BzrGui.CallingArguments` | `cargs` Aggregation to given instance for the command-line-argument.

    - ### Fields inherited from class org.vishia.gral.area9.GralArea9MainCmd

      `gralMng, gui, version`

    - ### Fields inherited from class org.vishia.mainCmd.MainCmd

      `argList, bHelpIswritten, cmdLineArgs, currdir, dateFormatMsg, errCmdline, fReport, kError_writeInfoDirectly, kInfo_writeInfoDirectly, kInfoln_writeInfoDirectly, kWarning_writeInfoDirectly, listAboutInfo, listHelpInfo, logMessageImplReport, mError_writeInfoDirectly, mNewln_writeInfoDirectly, msgDisp, mWarning_writeInfoDirectly, nLevelDisplayToReport, nLogLevel, nReportLevelDisplay, outCmdline, sVersion`

    - ### Fields inherited from interface org.vishia.mainCmd.MainCmdLogging_ifc

      `anytime, debug, error, eventOrder, exitSuccessfull, exitUserAbort, exitWithArgumentError, exitWithErrors, exitWithFileProblems, exitWithNotes, exitWithWarnings, fineDebug, fineEventOrder, fineInfo, info, interested, mNeverOutputToDisplay, mReportLevel, warning`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CmdLineAndGui(BzrGui.CallingArguments cargs, java.lang.String[] args)` ctor called in static main.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `callWithoutArguments()` Invoked from parseArguments if no argument is given.
    `protected boolean` | `checkArguments()` Checks the cmdline arguments relation together.
    `protected boolean` | `testArgument(java.lang.String arg, int nArg)` Tests one argument.
    `(package private) void` | `XXXinitGraphic()` Initializes the Graphic.

    - ### Methods inherited from class org.vishia.gral.area9.GralArea9MainCmd

      `exit, parseArgumentsAndInitGraphic, parseArgumentsAndInitGraphic`

    - ### Methods inherited from class org.vishia.mainCmd.MainCmd

      `addAboutInfo, addArgument, addHelpInfo, addMsgConfig, addStandardHelpInfo, close, currdir, executeCmdLine, executeCmdLine, executeCmdLine, executeCmdLine, executeCmdLine, executeCmdLine, flush, flushReport, getArgument, getExitErrorLevel, getLogging_ifc, getLogMessageErrorConsole, getLogMessageOutputConsole, getLogMessageOutputFile, getReportFileName, getReportLevel, getReportLevelFromIdent, isOnline, openReportfile, parseArguments, parseArguments, report, report, reportln, reportln, sendMsg, sendMsgTime, sendMsgVaList, setcurrdir, setExitErrorLevel, setLogMessageDestination, setOutputChannels, setReportLevel, setReportLevelToIdent, startCmdLine, startCmdLine, switchToWindowOrStartCmdline, writeAboutInfo, writeDirectly, writeError, writeError, writeErrorDirectly, writeHelpInfo, writeInfo, writeInfoln, writeStackTrace, writeWarning, XXXassertion`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### cargs

          final BzrGui.CallingArguments cargs

      Aggregation to given instance for the command-line-argument. The instance can be arranged anywhere else. It is given as ctor-parameter.

  - ### Constructor Detail

    - #### CmdLineAndGui

          public CmdLineAndGui(BzrGui.CallingArguments cargs,
                               java.lang.String[] args)

      ctor called in static main.
      Parameters:
        `cargs` - aggregation to command-line-argument data, it will be filled here.
        `args` - The command-line-calling arguments from static main

  - ### Method Detail

    - #### testArgument

          protected boolean testArgument(java.lang.String arg,
                                         int nArg)

      Tests one argument. This method is invoked from parseArgument. It is abstract in the superclass MainCmd and must be overwritten from the user. :TODO: user, test and evaluate the content of the argument string or test the number of the argument and evaluate the content in dependence of the number.
      Overrides:
        `testArgument` in class `GralArea9MainCmd`
      Parameters:
        `argc` - String of the actual parsed argument from cmd line
        `nArg` - number of the argument in order of the command line, the first argument is number 1.
      Returns:
        true is okay, false if the argument doesn't match. The parseArgument method in MainCmd throws an exception, the application should be aborted.

    - #### callWithoutArguments

          protected void callWithoutArguments()

      Invoked from parseArguments if no argument is given. In the default implementation a help info is written and the application is terminated. The user should overwrite this method if the call without comand line arguments is meaningfull.
      Overrides:
        `callWithoutArguments` in class `GralArea9MainCmd`

    - #### checkArguments

          protected boolean checkArguments()

      Checks the cmdline arguments relation together. If there is an inconsistents, a message should be written. It may be also a warning. :TODO: the user only should determine the specific checks, this is a sample.
      Overrides:
        `checkArguments` in class `GralArea9MainCmd`
      Returns:
        true if successfull, false if failed.

    - #### XXXinitGraphic

          void XXXinitGraphic()

      Initializes the Graphic. Note: This functionality should be a part of the implementing class, because some of the methods are designated as protected. The initializing is done only one time. Advantage of protected methods: don't call it without the correct context. This method is called from outside.