Package ui

Class MonitorGui

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class MonitorGui extends JFrame
The GUI for the monitor/emulator. Handles the User interface.
See Also:
  • Constructor Details

    • MonitorGui

      public MonitorGui(inifile.IniFile inifile, GraphicsConfiguration gc, GraphicsDevice[] gds, Monitor monit, TrapDispatcher td)
      Creates new form MonitorGui.
      Parameters:
      inifile - the Inifile object containing configured values.
      gc - the graphics configuration of the current monitor screen we're on.
      gds - the info about all monitors that the user has connected.
      monit - monitor used
  • Method Details

    • setLanguage

      public void setLanguage(int language)
      Change the language and thus the texts shown in the items, menu etc..
      Parameters:
      language -
    • getScreen

      public Screen getScreen()
      Gets the screen currently used (not to be confused with the physical display this is shown on)
      Returns:
      the screen currently used (not to be confused with the physical display on which this is shown)
    • getGds

      public GraphicsDevice[] getGds()
      Gets the GraphicsDevice currently used by this program.
      Returns:
    • getWindowMode

      public int getWindowMode()
      Gets the current window mode.
      Returns:
      the current window mode (0:window 1:full size 2:special full size)
    • getDataLogger

      public JTextArea getDataLogger()
      Gets the left monitor "wdw".
      Returns:
      the javax.swing.JTextArea corresponds to the left wdw.
    • getRegLogger

      public JTextArea getRegLogger()
      Gets the right monitor "wdw".
      Returns:
      the javax.swing.JTextArea corresponds to the right wdw.
    • getInputWindow

      public JTextField getInputWindow()
      Gets the command line "wdw".
      Returns:
      the command line "wdw", a javax.swing.JTextField.
    • setFocus

      public void setFocus()
      Sets the focus to the screen object.
    • changeScreenAndReset

      public void changeScreenAndReset(int xsize, int ysize, int qlColourmode)
      Change the screen type/size/mode.
      Parameters:
      xsize - new X size
      ysize - new Y size
      qlColourmode - new colour mode (0, 2, or 3)
    • monitorVisible

      public void monitorVisible(boolean b)
      Menu item action : Shows / hides the monitor window.
      Parameters:
      b - true if monitor should be visible
    • setDoubleSize

      public void setDoubleSize()
      Menu item action : Doubles/halves the window x and y sizes WITHOUT increasing resolution.
    • setMenuBarVisible

      public void setMenuBarVisible(boolean state)
      Makes the menu bar visible/invisible. Note: making it visible is done from within SMSQ/E, JVAMBAR command.
      Parameters:
      state - = true if menu bar is to be visible, false if not.
    • deIconify

      public void deIconify()
      Pops the window up if iconified, or flashes the taskbar.
    • setMousePosition

      public void setMousePosition(int x, int y)
      Sets a new mouse position if that has changed from within SMSQ/E.
      Parameters:
      x - the new x position, relative to the screen object.
      y - same for y.
    • iconify

      public void iconify()
      Iconifies wdw from SMSQE command line.
    • getFDImage

      public static Image getFDImage(String filename)
      Returns an Image or null.
      Parameters:
      filename - where to get the image from.
      Returns:
      the Image or null.
    • getMonitor

      public final Monitor getMonitor()
      Gets the monitor.
      Returns:
      the monitor.