Package com.iizix.gyro
Class WindowOptions
- java.lang.Object
- com.iizix.gyro.WindowOptions
public class WindowOptions extends java.lang.ObjectClass 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 booleanspawnFlag indicating "spawn mode" is used and the Window will not be tracked.static WindowOptionsSPAWN_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 thespawnmode.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 voidchannelMode(boolean on)Whether or not to display the window in theater mode.booleanequals(java.lang.Object o)Checks for equality.voidfullscreen(boolean on)Whether or not to display the browser in full-screen mode.java.lang.StringgetOptions()Gets the options that are used in the window.open function call.inthashCode()Hash code.voidheight(int height)Sets the height.voidlocation(boolean on)Whether or not to display the address field.voidmenubar(boolean on)Whether or not to display the menu bar.voidresizable(boolean on)Whether or not the window is resizable.voidsetScrollbars(boolean on)Whether or not to display scroll bars.voidsetStatus(boolean on)Whether or not to add a status bar.voidtitlebar(boolean on)Whether or not to display the title bar.voidtoolbar(boolean on)Whether or not to display the browser toolbar.java.lang.StringtoString()Outputs a debug string.voidwidth(int width)Sets the width.
Field Detail
SPAWN_BLANK
public static final WindowOptions SPAWN_BLANK
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 thespawnmode. Ifspawnmode 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:
equalsin classjava.lang.Object
hashCode
public int hashCode()
Hash code.- Overrides:
hashCodein classjava.lang.Object- Returns:
- Returns the hash code.
toString
public java.lang.String toString()
Outputs a debug string.- Overrides:
toStringin classjava.lang.Object