Module tvbrowser
Package util.settings

Class WindowSetting


  • public final class WindowSetting
    extends java.lang.Object
    A class with the position and size settings for a window.
    Since:
    2.7
    Author:
    René Mach
    • Constructor Summary

      Constructors 
      Constructor Description
      WindowSetting​(java.awt.Dimension size)
      Creates an instance of this class with the default setting -1 for all values.
      WindowSetting​(java.io.ObjectInputStream in)
      Creates an instance of this class with the values read from the stream.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void layout​(java.awt.Window window)
      Sets the values to the given window.
      void layout​(java.awt.Window window, java.awt.Window parent)
      Sets the values to the given window.
      void saveSettings​(java.io.ObjectOutputStream out)
      Saves the values in the given stream.
      void setIgnoreAndMinSizeLocation​(boolean ignoreAndMinSizeLocation)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • WindowSetting

        public WindowSetting​(java.io.ObjectInputStream in)
                      throws java.io.IOException
        Creates an instance of this class with the values read from the stream.
        Parameters:
        in - The stream to read the settings from.
        Throws:
        java.io.IOException - Thrown if something went wrong.
      • WindowSetting

        public WindowSetting​(java.awt.Dimension size)
        Creates an instance of this class with the default setting -1 for all values.
        Parameters:
        size - The default size of the window.
    • Method Detail

      • saveSettings

        public void saveSettings​(java.io.ObjectOutputStream out)
                          throws java.io.IOException
        Saves the values in the given stream.
        Parameters:
        out - The stream to save the values in.
        Throws:
        java.io.IOException - Thrown if an IO operation went wrong.
      • layout

        public void layout​(java.awt.Window window)
        Sets the values to the given window.
        Parameters:
        window - The window to set the values for.
      • layout

        public void layout​(java.awt.Window window,
                           java.awt.Window parent)
        Sets the values to the given window.
        Parameters:
        window - The window to set the values for.
        parent - The parent window of the window to layout (if not null the window is placed relative to it.)
        Since:
        3.3
      • toString

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

        public void setIgnoreAndMinSizeLocation​(boolean ignoreAndMinSizeLocation)