Class z390

All Implemented Interfaces:
ActionListener, ComponentListener, FocusListener, KeyListener, MouseListener, Runnable, EventListener

z390 is the interactive command screen component of z390
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      variable
      See Also:
    • tz390

      tz390 tz390
      variable
    • startup_cmd_file

      String startup_cmd_file
      variable
    • first_user_parm

      int first_user_parm
      variable
    • hex_base

      int hex_base
      variable
    • echo_cmd

      boolean echo_cmd
      variable
    • console_log

      boolean console_log
      variable
    • z390_errors

      int z390_errors
      variable
    • cmd_error

      boolean cmd_error
      variable
    • max_errors

      int max_errors
      variable
    • main_applet

      boolean main_applet
      running as browser applet
    • main_gui

      boolean main_gui
      parm = /g
    • main_console

      boolean main_console
      parm = /c
    • main_batch

      boolean main_batch
      parm = file name
    • main_title

      String main_title
      variable
    • check_perms

      boolean check_perms
      reset with /NP
    • perm_file_user_dir

      boolean perm_file_user_dir
      set if user.dir ok
    • perm_file_read

      boolean perm_file_read
      set if read ok
    • perm_file_write

      boolean perm_file_write
      set if write ok
    • perm_file_execute

      boolean perm_file_execute
      set if exec ok
    • perm_runtime_thread

      boolean perm_runtime_thread
      set if popup file chooser ok
    • perm_file_log

      boolean perm_file_log
      set if write log ok
    • perm_select

      boolean perm_select
      set if select dir/file ok
    • main_demo

      boolean main_demo
      set if no permissions
    • main_lic

      boolean main_lic
      set if permissions ok
    • mode_msg1

      String mode_msg1
      variable
    • mode_msg2

      String mode_msg2
      variable
    • lic_end_date

      Date lic_end_date
      variable
    • cur_date

      Date cur_date
      variable
    • mmddyy

      variable
    • hhmmss

      variable
    • dir_cur_file

      File dir_cur_file
      current directory file
    • log_file_name

      String log_file_name
      variable
    • log_tod

      boolean log_tod
      variable
    • log_file

      BufferedWriter log_file
      variable
    • max_line_length

      int max_line_length
      variable
    • ins_count

      int ins_count
      variable
    • io_count

      int io_count
      variable
    • start_cmd_io_count

      int start_cmd_io_count
      variable
    • start_cmd_time

      long start_cmd_time
      variable
    • monitor_timer

      Timer monitor_timer
      variable
    • monitor_wait

      int monitor_wait
      variable
    • monitor_timeout_limit

      int monitor_timeout_limit
      variable
    • monitor_cmd_time_total

      long monitor_cmd_time_total
      variable
    • monitor_last_time

      long monitor_last_time
      variable
    • monitor_next_time

      long monitor_next_time
      variable
    • monitor_cur_interval

      long monitor_cur_interval
      variable
    • monitor_last_ins_count

      int monitor_last_ins_count
      variable
    • monitor_next_ins_count

      int monitor_next_ins_count
      variable
    • monitor_last_io_count

      int monitor_last_io_count
      variable
    • monitor_next_io_count

      int monitor_next_io_count
      variable
    • monitor_cur_ins

      long monitor_cur_ins
      variable
    • monitor_cur_int

      long monitor_cur_int
      variable
    • monitor_cur_rate

      long monitor_cur_rate
      variable
    • monitor_last_cmd_mode

      boolean monitor_last_cmd_mode
      variable
    • status_visible

      boolean status_visible
      variable
    • status_interval

      int status_interval
      variable
    • status_last_time

      long status_last_time
      variable
    • status_next_time

      long status_next_time
      variable
    • status_last_ins_count

      int status_last_ins_count
      variable
    • status_next_ins_count

      int status_next_ins_count
      variable
    • status_next_io_count

      int status_next_io_count
      variable
    • status_last_io_count

      int status_last_io_count
      variable
    • status_cur_ins

      long status_cur_ins
      variable
    • status_cur_int

      long status_cur_int
      variable
    • status_cur_rate

      long status_cur_rate
      variable
    • cmd_mode

      boolean cmd_mode
      variable
    • cmd_running

      boolean cmd_running
      variable
    • cmd_io_total

      int cmd_io_total
      variable
    • cmd_exec_process

      Process cmd_exec_process
      variable
    • cmd_exec_error_reader

      BufferedReader cmd_exec_error_reader
      variable
    • cmd_exec_output_reader

      BufferedReader cmd_exec_output_reader
      variable
    • cmd_exec_input_writer

      PrintStream cmd_exec_input_writer
      variable
    • cmd_exec_error_msg

      String cmd_exec_error_msg
      variable
    • cmd_exec_output_msg

      String cmd_exec_output_msg
      variable
    • cmd_exec_process_thread

      Thread cmd_exec_process_thread
      variable
    • cmd_exec_error_reader_thread

      Thread cmd_exec_error_reader_thread
      variable
    • cmd_exec_output_reader_thread

      Thread cmd_exec_output_reader_thread
      variable
    • cmd_exec_rc

      int cmd_exec_rc
      variable
    • cmd_line

      String cmd_line
      variable
    • last_cmd_line

      String last_cmd_line
      variable
    • shutdown_exit

      boolean shutdown_exit
      variable
    • ascii_lf

      int ascii_lf
      variable
    • ascii_cr

      int ascii_cr
      variable
    • refresh_request

      boolean refresh_request
      variable
    • main_status

      boolean main_status
      variable
    • main_frame

      JFrame main_frame
      variable
    • main_width

      int main_width
      variable
    • main_height

      int main_height
      variable
    • main_border

      int main_border
      variable
    • main_loc_x

      int main_loc_x
      variable
    • main_loc_y

      int main_loc_y
      variable
    • scrollbar_width

      int scrollbar_width
      variable
    • font_space

      int font_space
      variable
    • font_size

      int font_size
      variable
    • title_height

      int title_height
      variable
    • font_width

      int font_width
      variable
    • log_char_height

      int log_char_height
      variable
    • tool_height

      int tool_height
      variable
    • lines_per_page

      int lines_per_page
      variable
    • log_height

      int log_height
      variable
    • log_width

      int log_width
      variable
    • command_columns

      int command_columns
      variable
    • command_height

      int command_height
      variable
    • status_height

      int status_height
      variable
    • applet_status_height

      int applet_status_height
      variable
    • labels_visible

      boolean labels_visible
      variable
    • labels_min_width

      int labels_min_width
      variable
    • labels_max_font

      int labels_max_font
      variable
    • label_width

      int label_width
      variable
    • main_panel

      JPanel main_panel
      variable
    • log_text

      JTextArea log_text
      variable
    • log_view

      JScrollPane log_view
      variable
    • cmd_label

      JLabel cmd_label
      variable
    • z390_cmd_line

      JTextField z390_cmd_line
      variable
    • status_line_label

      JLabel status_line_label
      variable
    • status_line

      JTextField status_line
      variable
    • cur_cmd

      int cur_cmd
      index of most recent comment entered
    • end_cmd

      int end_cmd
      index of highest cmd entered
    • max_cmd

      int max_cmd
      variable
    • view_cmd

      int view_cmd
      index of current cmd in view
    • view_restore

      boolean view_restore
      variable
    • cmd_history

      String[] cmd_history
      variable
    • file_menu

      JMenu file_menu
      variable
    • edit_menu

      JMenu edit_menu
      variable
    • option_menu

      JMenu option_menu
      variable
    • view_menu

      JMenu view_menu
      variable
    • help_menu

      JMenu help_menu
      variable
    • file_menu_cd

      JMenuItem file_menu_cd
      variable
    • file_menu_edit

      JMenuItem file_menu_edit
      variable
    • file_menu_mac

      JMenuItem file_menu_mac
      variable
    • file_menu_asm

      JMenuItem file_menu_asm
      variable
    • file_menu_asml

      JMenuItem file_menu_asml
      variable
    • file_menu_asmlg

      JMenuItem file_menu_asmlg
      variable
    • file_menu_job

      JMenuItem file_menu_job
      variable
    • file_menu_exec

      JMenuItem file_menu_exec
      variable
    • file_menu_exit

      JMenuItem file_menu_exit
      variable
    • edit_menu_cut

      JMenuItem edit_menu_cut
      variable
    • edit_menu_copy

      JMenuItem edit_menu_copy
      variable
    • edit_menu_paste

      JMenuItem edit_menu_paste
      variable
    • edit_menu_select_log

      JMenuItem edit_menu_select_log
      variable
    • edit_menu_select_cmd

      JMenuItem edit_menu_select_cmd
      variable
    • edit_menu_copy_log

      JMenuItem edit_menu_copy_log
      variable
    • edit_menu_editor

      JMenuItem edit_menu_editor
      variable
    • option_menu_ascii

      JCheckBoxMenuItem option_menu_ascii
      variable
    • option_menu_con

      JCheckBoxMenuItem option_menu_con
      variable
    • option_menu_dump

      JCheckBoxMenuItem option_menu_dump
      variable
    • option_menu_guam

      JCheckBoxMenuItem option_menu_guam
      variable
    • option_menu_list

      JCheckBoxMenuItem option_menu_list
      variable
    • option_menu_listcall

      JCheckBoxMenuItem option_menu_listcall
      variable
    • option_menu_stats

      JCheckBoxMenuItem option_menu_stats
      variable
    • option_menu_amode31

      JCheckBoxMenuItem option_menu_amode31
      variable
    • option_menu_rmode31

      JCheckBoxMenuItem option_menu_rmode31
      variable
    • option_menu_test

      JCheckBoxMenuItem option_menu_test
      variable
    • option_menu_trace

      JCheckBoxMenuItem option_menu_trace
      variable
    • view_menu_status

      JCheckBoxMenuItem view_menu_status
      variable
    • view_menu_cmd

      JCheckBoxMenuItem view_menu_cmd
      variable
    • help_menu_help

      JMenuItem help_menu_help
      variable
    • help_menu_commands

      JMenuItem help_menu_commands
      variable
    • help_menu_guide

      JMenuItem help_menu_guide
      variable
    • help_menu_perm

      JMenuItem help_menu_perm
      variable
    • help_menu_releases

      JMenuItem help_menu_releases
      variable
    • help_menu_support

      JMenuItem help_menu_support
      variable
    • help_menu_about

      JMenuItem help_menu_about
      variable
    • focus_comp

      Component focus_comp
      variable
    • select_dir_frame

      JFrame select_dir_frame
      variable
    • select_file_frame

      JFrame select_file_frame
      variable
    • selected_file

      File selected_file
      variable
    • selected_file_name

      String selected_file_name
      variable
    • selected_dir_name

      String selected_dir_name
      variable
    • select_cmd

      String select_cmd
      variable
    • select_file_type

      String select_file_type
      variable
    • select_opt

      String select_opt
      variable
    • bat_file_name

      String bat_file_name
      variable
    • mac_opt

      String mac_opt
      variable
    • asm_opt

      String asm_opt
      variable
    • asml_opt

      String asml_opt
      variable
    • asmlg_opt

      String asmlg_opt
      variable
    • job_opt

      String job_opt
      variable
    • exec_opt

      String exec_opt
      variable
    • web_site

      String web_site
      variable
    • install_loc

      String install_loc
      variable
    • install_webdoc

      String install_webdoc
      variable
    • sysin_file_name

      String sysin_file_name
      variable
    • syslib_dir_name

      String syslib_dir_name
      variable
    • sysout_dir_name

      String sysout_dir_name
      variable
    • anim_option

      boolean anim_option
      variable
  • Constructor Details

    • z390

      public z390()
      Dummy constructor - no initialization needed
  • Method Details

    • main

      public static void main(String[] args)
      Create instance of z390 class
      Parameters:
      args - argument string
    • set_main_mode

      private int set_main_mode(String[] args)
      Set main program execution mode. Set security permissions Notes:
      1. called from main or init before z390 instance started so only set class variables
      Parameters:
      args - argument string
      Returns:
      16 on error, 0 if okay.
    • set_startup_parm_options

      private void set_startup_parm_options(String[] args)
      process startup parms:
      • /G - graphical interface (default)
      • /NP - no permissions (supress checking permissions
      • /NT - no unique log file timestamps
      • /RT - regress test mode (supress time stamps
      • /SC file - startup cmd mode file (.bat)
      Parameters:
      args - argument string
    • log_command

      private void log_command(String cmd_parm1, String cmd_parm2)
      if OFF specified, turn log off. If file specified, open new log. else error.
      Parameters:
      cmd_parm1 - argument string
      cmd_parm2 - not used
    • open_log_file

      private void open_log_file()
      Open log file
    • close_log_file

      private void close_log_file()
      Close log file
    • close_all_files

      private void close_all_files()
      display error total on log and close data and log files
    • log_error

      private void log_error(int error, String msg)
      Write error to log
      Parameters:
      error - error number
      msg - error message text
    • abort_error

      private void abort_error(int error, String msg)
      Abort with error message
      Parameters:
      error - error number
      msg - error message text
    • shut_down

      private void shut_down(int return_code)
      cancel threads and exit with rc (turn off runtime shutdown exit
      Parameters:
      return_code - return code
    • set_runtime_hooks

      private void set_runtime_hooks()
      install hook for shutdown when -Xrs VM set
    • put_copyright

      private void put_copyright()
      display z390 version and copyright
    • put_log

      private void put_log(String msg)
      Write message to log file and to console if console mode or console option on.
      Parameters:
      msg - message text
    • process_command

      private void process_command(String cmd_text)
      Process a command:
      1. parse parms and execute z390 command if found
        1. * in position 1 is a comment
        2. space or null logged as blank line
      2. If not a known z390 command, issue CMD Windows command.
      Notes:
      1. z390_cmd_line event handler routes input to CMD processor when in cmd_mode.
      2. Some commands will issue retry or cancel error message if command running on separate thread to avoid file conflicts or deadlocks.
      3. Other non destructive commands will proceed in parallel which may cause log messages to be intermixed.
      4. Status bar shows progress of command processes on separate threads.
      5. Use EXIT or BREAK event to abort CMD process. CTRL-C works in command mode only.
      Parameters:
      cmd_text - command string
    • add_cmd_hist

      private void add_cmd_hist()
      add command cmd_line to rolling history
    • get_prev_cmd

      private void get_prev_cmd()
      restore prev cmd to z390_cmd_line
    • get_next_cmd

      private void get_next_cmd()
      display next cmd
    • time_stamp

      private String time_stamp()
      return date and time if tz390.opt_timing
      Returns:
      date and time as a string value
    • get_next_parm

      private String get_next_parm(StringTokenizer st, boolean ignore_spaces)
      get string with or without single/double quotes.
      • ignore leading spaces or commas if ignore_spaces = true, else return null
      • if space or comma found next.
      Parameters:
      st - string tokenizer
      ignore_spaces - flag to ignore/honor spaces
      Returns:
      next token as text
    • about_command

      private void about_command()
      write basic info to log
    • font_command

      private void font_command(String cmd_parm1, String cmd_parm2)
      reset font size for log, and command line and menu pop-ups
      Parameters:
      cmd_parm1 - requested font size as text
      cmd_parm2 - not used
    • set_text_font

      private void set_text_font()
      reset font size for menu, log, cmd and status line
    • get_dec_int

      private int get_dec_int(String cmd_parm)
      return int from immediate decimal parm
      Parameters:
      cmd_parm - input text parameter
      Returns:
      decimal value of input parameter
    • get_int

      private int get_int(String cmd_parm)
      return int from immediate hex parm:or reg
      Parameters:
      cmd_parm - input parameter in text format
      Returns:
      decimal value from input parameter
    • get_text_char

      private int get_text_char(int work_int)
      return int value of char or 0 if not printable
      Parameters:
      work_int - integer input value
      Returns:
      input value, or adjusted integer value
    • help_command

      private void help_command()
      log summary list of commands and help reference
    • monitor_startup

      private void monitor_startup()
      start monitor to terminate cmd command if timeout limit reached
    • cmd_startup

      private int cmd_startup(String cmd_line)
      start Windows command processer with synchronized buffered output to log.
      1. If cmd_line is null, set cmd_mode and start command processor without command.
      2. Future commands in cmd_mode will be passed to processor via cmd_exec_input_writer.
      Parameters:
      cmd_line - command text
      Returns:
      return code
    • sleep_now

      private void sleep_now()
      sleep for monitor interval if not abort
    • sync_cmd_dir

      private void sync_cmd_dir()
      sync the cmd task directory with current directory.
    • monitor_update

      private void monitor_update()
      1. At monitor_wait intervals, update the z390 GUI title date and time and the status line information.
      2. If CMD mode and monitor_wait_total greater than timeout_interval then abort CMD.
      3. If monitor_wait_total greater than status_interval then update and log status line in batch or command mode.
      4. If current time beyond main_demo timeout then terminate.
      5. reset focus to z390_cmd_line after update
    • cmd_timeout_error

      private void cmd_timeout_error()
      issue timeout error
    • cmd_command

      private void cmd_command(String cmd)
      exec Windows command as follows:
      1. If cmd_mode set via prior cmd with no command, then all commands are routed to command processor via cmd_exec_input.
        • Use BREAK key or EXIT command passed to command processor to end cmd_mode.
      2. If prior Windows command is still running, display current status and request user hit break or retry later.
      3. If cmd_mode not set then start command processor via call to cmd_exec_start.
      4. See STATUS command to set interval for display of status of long running commands.
      Parameters:
      cmd - command text
    • get_status_line

      private String get_status_line()
      format fixed field status line for both z390 gui status line and status log requests
      1. Time of date
      2. INS total
      3. I/O total
      4. CMD mode
      Returns:
      status text
    • get_pad

      private String get_pad(long num, int pad)
      format and pad status line number to specified length. If number 0, return all spaces. If number > 1000, return K.
      Parameters:
      num - number of pad characters to generate
      pad - pad character to use
      Returns:
      padding string
    • status_log_update

      private void status_log_update()
      update status interval and write status line to log
    • init_z390

      private void init_z390(String[] args)
      load shared tables and file routines
      Parameters:
      args - argument string
    • build_main_panel

      private void build_main_panel()
      Build the main panel with:
      1. Scrolling log display
      2. command entry field
    • exit_main

      private void exit_main(int rc)
      terminate the program
      Parameters:
      rc - return code
    • set_gui_size

      private void set_gui_size()
      calculate gui object sizes based on screen size and font size
    • build_log_view

      private void build_log_view()
      build scrolling log view based on current screen and font size
    • build_z390_cmd_line

      private void build_z390_cmd_line()
      Build the command entry field
    • build_status_line

      private void build_status_line()
      Build the statuts line
    • build_menu_items

      private void build_menu_items()
      Build the menu bar
    • set_tooltips

      private void set_tooltips()
      set tooltips after font changes
    • title_update

      private void title_update()
      update main frame title with current date and time.
    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Perform menu and command line requests
      Specified by:
      actionPerformed in interface ActionListener
    • exec_gui_command

      private void exec_gui_command()
      exec command
    • perm_command

      private void perm_command()
      display Java security access permissions
    • rel_command

      private void rel_command()
      display Windows, Java Runtime, and z390 software releases led
    • guide_command

      private void guide_command()
      link to z390\webdoc\index.html or www.z390.org note start parms are /d"path" file
    • reset_z390_cmd

      private void reset_z390_cmd()
      reset z390_cmd text and set focus
    • support_command

      private void support_command()
      link to online support www.z390.org
    • start_doc

      public boolean start_doc(String url)
      document start from url
      Parameters:
      url - url of command to be executed
      Returns:
      false on error, true otherwise
    • getClipboard

      public static String getClipboard()
      Get string text from system clipboard
      Returns:
      text from clipboard
    • setClipboard

      public static void setClipboard(String str)
      put string to system clipboard
      Parameters:
      str - string to write to clipboard
    • keyPressed

      public void keyPressed(KeyEvent e)
      Handle key pressed events
      Specified by:
      keyPressed in interface KeyListener
      Parameters:
      e - keypress event
    • process_cancel_key

      private void process_cancel_key()
      cancel cmd, or gui cmd in response to F3 or CTRL-BREAK
    • keyTyped

      public void keyTyped(KeyEvent e)
      Handle key typed events
      Specified by:
      keyTyped in interface KeyListener
      Parameters:
      e - keypress event
    • keyReleased

      public void keyReleased(KeyEvent e)
      Handle key released events
      Specified by:
      keyReleased in interface KeyListener
      Parameters:
      e - keypress event
    • displayInfo

      protected void displayInfo(KeyEvent e, String s)
      display key event
      Parameters:
      e - keypress event
      s - Key pressed as text
    • mousePressed

      public void mousePressed(MouseEvent e)
      Popup edit menu on right mouse click
      Specified by:
      mousePressed in interface MouseListener
      Parameters:
      e - mouse event
    • mouseReleased

      public void mouseReleased(MouseEvent e)
      Handle mouse release event
      Specified by:
      mouseReleased in interface MouseListener
      Parameters:
      e - mouse event
    • mouseEntered

      public void mouseEntered(MouseEvent e)
      Handle mouse event
      Specified by:
      mouseEntered in interface MouseListener
      Parameters:
      e - mouse event
    • mouseExited

      public void mouseExited(MouseEvent e)
      Handle mouse event
      Specified by:
      mouseExited in interface MouseListener
      Parameters:
      e - mouse event
    • mouseClicked

      public void mouseClicked(MouseEvent e)
      Handle mouse click event
      Specified by:
      mouseClicked in interface MouseListener
      Parameters:
      e - mouse event
    • focusLost

      public void focusLost(FocusEvent e)
      last component to lose focus (ignored for now)
      Specified by:
      focusLost in interface FocusListener
    • focusGained

      public void focusGained(FocusEvent e)
      Save last component to get focus
      Specified by:
      focusGained in interface FocusListener
    • exit_command

      private void exit_command()
      abort command if runnung and turn off cmd_mode. If no command running and not cmd_mode, then exit z390.
    • loc_command

      private void loc_command(String cmd_parm1, String cmd_parm2)
      set location of main window x, y
      Parameters:
      cmd_parm1 - first command parameter
      cmd_parm2 - second command parameter
    • size_command

      private void size_command(String cmd_parm1, String cmd_parm2)
      resize main window
      Parameters:
      cmd_parm1 - first command parameter
      cmd_parm2 - second command parameter
    • status_command

      private void status_command(String cmd_parm1, String cmd_parm2)
      set status line display on or off or set interval for logging status. If seconds specified as 0 or null, logging status is turned off
      Parameters:
      cmd_parm1 - first command parameter
      cmd_parm2 - not used
    • title_command

      private void title_command(String cmd_parm1, String cmd_parm2)
      set GUI window title
      Parameters:
      cmd_parm1 - command parameter
      cmd_parm2 - not used
    • timeout_command

      private void timeout_command(String cmd_parm1, String cmd_parm2)
      set timeout interval in seconds used to timeout commands when not in command mode. Default is 3 seconds. Issue command with no arugment to turn off timeout. Commands can be cancelled via BREAK.
      Parameters:
      cmd_parm1 - timeout limit as text
      cmd_parm2 - not used
    • options_command

      private boolean options_command(JCheckBoxMenuItem option_men, String cmd_parm1, String cmd_parm2)
      check or uncheck option menu item and update option parm lists for commands
      Parameters:
      option_men - menu option
      cmd_parm1 - command parameter
      cmd_parm2 - not used
      Returns:
      flag: true of false
    • cd_command

      private void cd_command(String cmd_parm1)
      set current directory using file chooser dialog if parm1 null else use path
      Parameters:
      cmd_parm1 - command parameter
    • select_dir

      private void select_dir()
      Invoke file chooser dialog to set dir_cur Note:
      • dialog is kept for non gui mode to avoid dispose causing gui shutdown on last window
    • create_select_dir

      private void create_select_dir(JFileChooser select_dir_chooser)
      create dialog with file chooser to select current directory
      Parameters:
      select_dir_chooser - file chooser object
    • select_file

      private void select_file(String file_cmd, String file_type, String file_opt)
      Invoke file chooser dialog to set selected_file_name within select_file_type if any. Notes:
      1. Note dialog is kept for non gui mode to avoid dispose causing gui shutdown on last window)
      Parameters:
      file_cmd - select command
      file_type - file type
      file_opt - file option (not used)
    • create_select_file

      private void create_select_file(JFileChooser select_file_chooser)
      create select file frame with chooser on first call. It is updated after that.
      Parameters:
      select_file_chooser - file chooser object
    • get_short_file_name

      private String get_short_file_name(String file_name)
      return shortest file name possible with quotes if LSN
      Parameters:
      file_name - file name
      Returns:
      file name
    • commands_command

      private void commands_command(String cmd_parm1, String cmd_parm2)
      display alphabetical list of basic and extended commands
      Parameters:
      cmd_parm1 - not used
      cmd_parm2 - not used
    • createImageIcon

      protected static ImageIcon createImageIcon(String path, String description)
      Returns an ImageIcon, or null if the path was invalid.
      Parameters:
      path - - full path and file name
      description - - description to add to ImageIcon
      Returns:
      ImageIcon
    • check_main_view

      private void check_main_view()
      if main window size has changed due to user streching without window event handler triggering update, do it now.
    • update_main_view

      private void update_main_view()
      update log and command line size following any of the following changes:
      • Change in window size
      • Change in font size
    • rebuild_lines

      private void rebuild_lines()
      rebuild z390_cmd and status lines with or without labels to fix current main_panel size. start by removing labels and lines
    • componentHidden

      public void componentHidden(ComponentEvent e)
      Event notification when a component is hidden
      Specified by:
      componentHidden in interface ComponentListener
      Parameters:
      e - component event
    • componentMoved

      public void componentMoved(ComponentEvent e)
      Event notification when a component is moved
      Specified by:
      componentMoved in interface ComponentListener
      Parameters:
      e - component event
    • componentResized

      public void componentResized(ComponentEvent e)
      Event notification when a component is resized
      Specified by:
      componentResized in interface ComponentListener
      Parameters:
      e - component event
    • componentShown

      public void componentShown(ComponentEvent e)
      Event notification when a component is shown
      Specified by:
      componentShown in interface ComponentListener
      Parameters:
      e - component event
    • cmd_exec_start

      public int cmd_exec_start(String[] exec_cmd)
      1. Terminate any prior exec process with error if non zero completion.
      2. Start new process running on separate thread.
      Note:
      • cmd monitor will issue exec_term if timeout limit is reached before next start command does it.
      • Error will be issued by exec_term if non zero return code or if process had to be cancelled.
      Parameters:
      exec_cmd - command to be executed
      Returns:
      -1 if exception occurred; 0 otherwise
    • cmd_exec_input

      private void cmd_exec_input(String cmd_line)
      send input to exec command in process
      Parameters:
      cmd_line - command text
    • cmd_exec_rc

      private int cmd_exec_rc()
      1. return ending rc else -1
      2. return 0 if no process defined
      Returns:
      return code
    • cmd_exec_cancel

      private void cmd_exec_cancel()
      cancel exec process
    • run

      public void run()
      run something
      Specified by:
      run in interface Runnable
    • copy_cmd_output_to_log

      private void copy_cmd_output_to_log()
      copy cmd output to log a byte at a time to handle cmd output with cr/lf (ie TIME)
    • copy_cmd_error_to_log

      private void copy_cmd_error_to_log()
      copy cmd error to log a line at a time
    • batch_cmd

      private void batch_cmd(String bat_cmd, String bat_file_name, String bat_file_type, String bat_opt)
      invoke batch command with specified file and options. If file is null, invoke file selection dialog with specified file type and then launch batch command when selection dialog closes. Notes:
      1. select_file_type is set to filter files to type for command.
      2. select_opt is set to any override options for command. The override options are updated on any change to the options menu.
      3. CMD mode is started if not already running and mult batch commands just queue up for single process.
      4. EDIT command is launched separately in parallel to allow multiple edits to run.
      5. Editor is defined by EDIT environment variable else it uses hard coded default.
      6. JOB launches selected BAT file with options
      Parameters:
      bat_cmd - batch command
      bat_file_name - batch file name
      bat_file_type - batch file type
      bat_opt - batch file options