Class gz390_screen

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Runnable, Accessible

public class gz390_screen extends JPanel implements Runnable
The gz390_screen class defines public Graphics2D panel for use by gz390 to define GUAM views:
  1. tn_screen
  2. graphic_screen
The method set_screen(rows,cols,font, background_color,text_color) is used to initialize screen size based on the height and width of the font assuming it has been set to desired font size and is a monospace font. gz390 characer and graphics commands draw directly on gz390_screen buffered image object which is repainted at fixed intervals whenever scn_repaint is set true.
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      variable
      See Also:
    • tz390

      tz390 tz390
      variable
    • scn_rows

      int scn_rows
      variable
    • scn_cols

      int scn_cols
      variable
    • scn_font

      Font scn_font
      variable
    • scn_background_color

      Color scn_background_color
      variable
    • scn_text_color

      Color scn_text_color
      variable
    • scn_image

      BufferedImage scn_image
      variable
    • scn_grid

      Graphics2D scn_grid
      variable
    • scn_context

      FontRenderContext scn_context
      variable
    • scn_panel

      JScrollPane scn_panel
      variable
    • scn_layout

      TextLayout scn_layout
      variable
    • max_font_size

      int max_font_size
      variable
    • min_font_size

      int min_font_size
      variable
    • scn_font_size

      int scn_font_size
      variable
    • scn_char_height

      int scn_char_height
      variable
    • scn_char_base

      int scn_char_base
      variable
    • scn_char_width

      int scn_char_width
      variable
    • scn_char_rect

      Rectangle2D scn_char_rect
      variable
    • scn_height

      int scn_height
      variable
    • scn_width

      int scn_width
      variable
    • scn_size

      Dimension scn_size
      variable
    • main_width

      int main_width
      variable
    • main_height

      int main_height
      variable
    • main_panel_width

      int main_panel_width
      variable
    • main_panel_height

      int main_panel_height
      variable
    • scn_ready

      boolean scn_ready
      variable
    • scn_repaint

      boolean scn_repaint
      variable
    • scn_update_thread

      Thread scn_update_thread
      variable
    • scn_update_wait

      long scn_update_wait
      variable
  • Constructor Details

    • gz390_screen

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

    • paint

      public void paint(Graphics g)
      override default paint to draw screen image in panel using current scn_background.
      Overrides:
      paint in class JComponent
      Parameters:
      g - Graphics instance
    • start_scn_updates

      public void start_scn_updates()
      start thread used to repaint image at fixed intervals whenever scn_repaint has been set true
    • stop_scn_updates

      public void stop_scn_updates()
      set variable to stop scn updates
    • run

      public void run()
      run the thing
      Specified by:
      run in interface Runnable
    • set_screen

      public void set_screen(int new_rows, int new_cols, Font new_font, Color new_background_color, Color new_text_color)
      initialize screen panel based on rows, columns, text font and font size, background and text color
      Parameters:
      new_rows - number
      new_cols - number
      new_font - Font instance
      new_background_color - Color instance
      new_text_color - Color instance
    • resize_screen

      public void resize_screen()
      resize screen to fill current window by adjusting to max font size that will fit
    • calc_screen_size

      private void calc_screen_size()
      calc scn_width and scn_height for current scn_rows, scn_cols, scn_font