Class WindowOptions


  • public class WindowOptions
    extends java.lang.Object
    Class used to hold the Window options when opening a pop-up window on the client side from a browser session. This class is not used when the client is running inside iiziRun.
    Author:
    Christopher Mindus
    • Field Summary

      Fields 
      Modifier and Type Field Description
      boolean spawn
      Flag indicating "spawn mode" is used and the Window will not be tracked.
      static WindowOptions SPAWN_BLANK  
    • Constructor Summary

      Constructors 
      Constructor Description
      WindowOptions()
      Constructor, spawn mode = false, default width = 600 and height = 450, status bar, no menu bar, scroll bars.
      WindowOptions​(boolean spawn)
      Constructor to set the spawn mode.
      WindowOptions​(int width, int height)
      Constructor with options: spawn mode = false, status bar, no menu bar and scroll bars.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void channelMode​(boolean on)
      Whether or not to display the window in theater mode.
      boolean equals​(java.lang.Object o)
      Checks for equality.
      void fullscreen​(boolean on)
      Whether or not to display the browser in full-screen mode.
      java.lang.String getOptions()
      Gets the options that are used in the window.open function call.
      int hashCode()
      Hash code.
      void height​(int height)
      Sets the height.
      void location​(boolean on)
      Whether or not to display the address field.
      void menubar​(boolean on)
      Whether or not to display the menu bar.
      void resizable​(boolean on)
      Whether or not the window is resizable.
      void setScrollbars​(boolean on)
      Whether or not to display scroll bars.
      void setStatus​(boolean on)
      Whether or not to add a status bar.
      void titlebar​(boolean on)
      Whether or not to display the title bar.
      void toolbar​(boolean on)
      Whether or not to display the browser toolbar.
      java.lang.String toString()
      Outputs a debug string.
      void width​(int width)
      Sets the width.
      • Methods inherited from class java.lang.Object

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

      • spawn

        public final boolean spawn
        Flag indicating "spawn mode" is used and the Window will not be tracked.
    • Constructor Detail

      • WindowOptions

        public WindowOptions()
        Constructor, spawn mode = false, default width = 600 and height = 450, status bar, no menu bar, scroll bars.
      • WindowOptions

        public WindowOptions​(boolean spawn)
        Constructor to set the spawn mode. If spawn mode is false, these settings are preset: default width = 600 and height = 450, status bar, no menu bar, scroll bars.

        "Spawn mode" means that JavaScript "window.open(...)" is not used, but rather a creation of a hyperlink element that is clicked. This prevents blocking and does not enable setting width, height, nor checking when the window is closed.

        Parameters:
        spawn - The spawn mode flag.
      • WindowOptions

        public WindowOptions​(int width,
                             int height)
        Constructor with options: spawn mode = false, status bar, no menu bar and scroll bars.
        Parameters:
        width - The width, minimum 100 pixels (is set automatically).
        height - The height, minimum 100 pixels (is set automatically).
    • Method Detail

      • width

        public void width​(int width)
        Sets the width. A minimum value of 100 is set if smaller.
        Parameters:
        width - The width in pixels.
        Throws:
        java.lang.IllegalStateException - If spawn mode is used.
      • height

        public void height​(int height)
        Sets the height. A minimum value of 100 is set if smaller.
        Parameters:
        height - The height in pixels.
        Throws:
        java.lang.IllegalStateException - If spawn mode is used.
      • channelMode

        public void channelMode​(boolean on)
        Whether or not to display the window in theater mode. Default is no. IE only.
        Parameters:
        on - true to turn on, false to turn off.
        Throws:
        java.lang.IllegalStateException - If spawn mode is used.
      • fullscreen

        public void fullscreen​(boolean on)
        Whether or not to display the browser in full-screen mode. Default is no. A window in full-screen mode must also be in theater mode. IE only.
        Parameters:
        on - true to turn on, false to turn off.
        Throws:
        java.lang.IllegalStateException - If spawn mode is used.
      • location

        public void location​(boolean on)
        Whether or not to display the address field. Opera only.
        Parameters:
        on - true to turn on, false to turn off.
        Throws:
        java.lang.IllegalStateException - If spawn mode is used.
      • menubar

        public void menubar​(boolean on)
        Whether or not to display the menu bar.
        Parameters:
        on - true to turn on, false to turn off.
        Throws:
        java.lang.IllegalStateException - If spawn mode is used.
      • resizable

        public void resizable​(boolean on)
        Whether or not the window is resizable. IE only.
        Parameters:
        on - true to turn on, false to turn off.
        Throws:
        java.lang.IllegalStateException - If spawn mode is used.
      • setScrollbars

        public void setScrollbars​(boolean on)
        Whether or not to display scroll bars. IE, Firefox & Opera only.
        Parameters:
        on - true to turn on, false to turn off.
        Throws:
        java.lang.IllegalStateException - If spawn mode is used.
      • setStatus

        public void setStatus​(boolean on)
        Whether or not to add a status bar.
        Parameters:
        on - true to turn on, false to turn off.
        Throws:
        java.lang.IllegalStateException - If spawn mode is used.
      • titlebar

        public void titlebar​(boolean on)
        Whether or not to display the title bar. Ignored unless the calling application is an HTML Application or a trusted dialog box.
        Parameters:
        on - true to turn on, false to turn off.
        Throws:
        java.lang.IllegalStateException - If spawn mode is used.
      • toolbar

        public void toolbar​(boolean on)
        Whether or not to display the browser toolbar. IE and Firefox only.
        Parameters:
        on - true to turn on, false to turn off.
        Throws:
        java.lang.IllegalStateException - If spawn mode is used.
      • getOptions

        public java.lang.String getOptions()
        Gets the options that are used in the window.open function call.
        Returns:
        A string as "width=600,height=450,...".
      • equals

        public boolean equals​(java.lang.Object o)
        Checks for equality.
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Hash code.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        Returns the hash code.
      • toString

        public java.lang.String toString()
        Outputs a debug string.
        Overrides:
        toString in class java.lang.Object