Package jexer.backend

Class MultiScreen

  • All Implemented Interfaces:
    Screen

    public class MultiScreen
    extends LogicalScreen
    implements Screen
    MultiScreen mirrors its I/O to several screens.
    • Constructor Detail

      • MultiScreen

        public MultiScreen()
        Public constructor provides a virtual screen at 80x25.
      • MultiScreen

        public MultiScreen​(Screen screen)
        Public constructor takes the dimensions of the first screen.
        Parameters:
        screen - the screen to add
    • Method Detail

      • getTextWidth

        public int getTextWidth()
        Get the width of a character cell in pixels.
        Specified by:
        getTextWidth in interface Screen
        Overrides:
        getTextWidth in class LogicalScreen
        Returns:
        the width in pixels of a character cell
      • getTextHeight

        public int getTextHeight()
        Get the height of a character cell in pixels.
        Specified by:
        getTextHeight in interface Screen
        Overrides:
        getTextHeight in class LogicalScreen
        Returns:
        the height in pixels of a character cell
      • setWidth

        public void setWidth​(int width)
        Change the width. Everything on-screen will be destroyed and must be redrawn.
        Specified by:
        setWidth in interface Screen
        Overrides:
        setWidth in class LogicalScreen
        Parameters:
        width - new screen width
      • setHeight

        public void setHeight​(int height)
        Change the height. Everything on-screen will be destroyed and must be redrawn.
        Specified by:
        setHeight in interface Screen
        Overrides:
        setHeight in class LogicalScreen
        Parameters:
        height - new screen height
      • setDimensions

        public void setDimensions​(int width,
                                  int height)
        Change the width and height. Everything on-screen will be destroyed and must be redrawn.
        Specified by:
        setDimensions in interface Screen
        Overrides:
        setDimensions in class LogicalScreen
        Parameters:
        width - new screen width
        height - new screen height
      • flushPhysical

        public void flushPhysical()
        Classes must provide an implementation to push the logical screen to the physical device.
        Specified by:
        flushPhysical in interface Screen
        Overrides:
        flushPhysical in class LogicalScreen
      • setTitle

        public void setTitle​(java.lang.String title)
        Set the window title.
        Specified by:
        setTitle in interface Screen
        Overrides:
        setTitle in class LogicalScreen
        Parameters:
        title - the new title
      • addScreen

        public void addScreen​(Screen screen)
        Add a screen to the list.
        Parameters:
        screen - the screen to add
      • removeScreen

        public void removeScreen​(Screen screenToRemove)
        Remove a screen from the list.
        Parameters:
        screenToRemove - the screen to remove