Class Window.Hint

  • Enclosing interface:
    Window

    public static class Window.Hint
    extends java.lang.Object
    Window hints are meta-data stored along with the window that can be used to give the GUI system some ideas of how this window wants to be treated. There are no guarantees that the hints will be honoured though. You can declare your own window hints by sub-classing this class. It is highly recommended to provide your custom hints a good .toString(). You'd surely prefer in a debug-session to see the Hints of a Window as [Expanded, Modal] than as [foo.Bar@12345, foo.Bar@fedcba]
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static Window.Hint CENTERED
      With this hint, the window wants to be at the center of the terminal instead of using the cascading layout which is the standard.
      static Window.Hint EXPANDED
      This window hint tells the window manager that the window should be taking up almost the entire screen, leaving only a small space around it.
      static Window.Hint FIT_TERMINAL_WINDOW
      With this hint, don't let the window grow larger than the terminal screen, rather set components to a smaller size than they prefer.
      static Window.Hint FIXED_POSITION
      Windows with this hint should not be positioned by the window manager, rather they should use whatever position is pre-set.
      static Window.Hint FIXED_SIZE
      Windows with this hint should not be automatically sized by the window manager (using getPreferredSize()), rather should rely on the code manually setting the size of the window using setFixedSize(..).
      static Window.Hint FULL_SCREEN
      A window with this hint would like to be placed covering the entire screen.
      private java.lang.String info  
      static Window.Hint MENU_POPUP
      Windows with this hint should (optionally) be rendered differently by the window manager to distiguish them from ordinary windows.
      static Window.Hint MODAL
      This hint tells the window manager that this window should have exclusive access to the keyboard input until it is closed.
      static Window.Hint NO_DECORATIONS
      With this hint, the TextGUI system should not draw any decorations around the window.
      static Window.Hint NO_FOCUS
      With this hint, the window should never receive focus by the window manager
      static Window.Hint NO_POST_RENDERING
      With this hint, the TextGUI system should skip running any post renderers for the window.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Hint()  
      protected Hint​(java.lang.String info)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • NO_DECORATIONS

        public static final Window.Hint NO_DECORATIONS
        With this hint, the TextGUI system should not draw any decorations around the window. Decorated size will be the same as the window size.
      • NO_POST_RENDERING

        public static final Window.Hint NO_POST_RENDERING
        With this hint, the TextGUI system should skip running any post renderers for the window. By default this means the window won't have any shadow.
      • NO_FOCUS

        public static final Window.Hint NO_FOCUS
        With this hint, the window should never receive focus by the window manager
      • CENTERED

        public static final Window.Hint CENTERED
        With this hint, the window wants to be at the center of the terminal instead of using the cascading layout which is the standard.
      • FIXED_POSITION

        public static final Window.Hint FIXED_POSITION
        Windows with this hint should not be positioned by the window manager, rather they should use whatever position is pre-set.
      • MENU_POPUP

        public static final Window.Hint MENU_POPUP
        Windows with this hint should (optionally) be rendered differently by the window manager to distiguish them from ordinary windows. This is intended to be used only by menu popups (See MenuBar, Menu and MenuItem).
      • FIXED_SIZE

        public static final Window.Hint FIXED_SIZE
        Windows with this hint should not be automatically sized by the window manager (using getPreferredSize()), rather should rely on the code manually setting the size of the window using setFixedSize(..).
      • FIT_TERMINAL_WINDOW

        public static final Window.Hint FIT_TERMINAL_WINDOW
        With this hint, don't let the window grow larger than the terminal screen, rather set components to a smaller size than they prefer.
      • MODAL

        public static final Window.Hint MODAL
        This hint tells the window manager that this window should have exclusive access to the keyboard input until it is closed. For window managers that allows the user to switch between open windows, putting a window on the screen with this hint should make the window manager temporarily disable that function until the window is closed.
      • FULL_SCREEN

        public static final Window.Hint FULL_SCREEN
        A window with this hint would like to be placed covering the entire screen. Use this in combination with NO_DECORATIONS if you want the content area to take up the entire terminal.
      • EXPANDED

        public static final Window.Hint EXPANDED
        This window hint tells the window manager that the window should be taking up almost the entire screen, leaving only a small space around it. This is different from FULL_SCREEN which takes all available space and completely hide the background and any other window behind it.
      • info

        private java.lang.String info
    • Constructor Detail

      • Hint

        protected Hint()
      • Hint

        protected Hint​(java.lang.String info)
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object