Package com.openfin.desktop
Class WindowOptions
java.lang.Object
com.openfin.desktop.JsonBean
com.openfin.desktop.WindowOptions
- Direct Known Subclasses:
PlatformWindowOptions
public class WindowOptions extends JsonBean
A class representing the options for a Window.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description WindowOptions()Default constructorWindowOptions(java.lang.String name, java.lang.String url)Contructor with name and urlWindowOptions(org.json.JSONObject options)Constructs an instance with a new underlying JSONObject -
Method Summary
Modifier and Type Method Description AcceleratorOptionsgetAccelerator()Get keyboard shortcut options.booleangetAutoShow()The AutoShow property represents a flag to automatically show the Window when it is created.booleangetContextMenu()The ContextMenu property represents a flag to show the context menu when right-clicking on a window.intgetCornerRoundingHeight()The CornerRoundingHeight property represents the rounded corners to apply.intgetCornerRoundingWidth()The CornerRoundingHeight property represents the rounded corners to apply.booleangetDefaultCentered()The DefaultCentered property specifies that the window will be positioned in the center of the primary monitor when loaded for the first time on a machine.intgetDefaultHeight()The DefaultWidth property represents the window's default height in pixels.intgetDefaultLeft()The DefaultLeft property represents the window's default left position.intgetDefaultTop()The DefaultTop property represents the window's default top position.intgetDefaultWidth()The DefaultWidth property represents the window's default width in pixels.booleangetFrame()The Frame property represents a flag to show the frame.booleangetHideOnClose()The HideOnClose property represents a flag to allow a window to be hidden when the close button is clicked.org.json.JSONObjectgetJson()Gets the underlying JSONObjectLayoutOptionsgetLayoutOptions()intgetMaxHeight()The MaxHeight property represents the maximum height of a window.booleangetMaximizable()The Maximizable property represents a flag that lets the window be maximized.intgetMaxWidth()The MaxWidth property represents the maximum width of a window.intgetMinHeight()The MinHeight property represents the minimum height of a window.booleangetMinimizable()intgetMinWidth()The MinWidth property represents the minimum width of a window.java.lang.StringgetName()Get name of the windowdoublegetOpacity()The Opacity property represents a flag that specifies how transparent the window will be.java.lang.StringgetPreload()Get the URL of the preload script that will be retrieved (and cached, if needed) and eval'ed before any other script.booleangetResizable()The Resizable property represents a flag which allows the user to resize the window.intgetResizeRegionBottomRightCorner()The ResizeRegionBottomRightCorner property defines an additional square region located at the bottom right corner of a frameless window.intgetResizeRegionSize()The ResizeRegionSize property defines a region in pixels that will respond to user mouse interaction for resizing a frameless windowbooleangetSaveWindowState()The SaveWindowState property defines whether or not a window should maintain a persistent cache of its position/size.booleangetShowTaskbarIcon()The ShowTaskbarIcon property represents a flag to show the Window's icon in the taskbar.java.lang.StringgetState()The State property represents a string that sets the window to be "minimized", "maximized", or "normal" on creation.java.lang.StringgetTaskbarIcon()The TaskbarIcon property represents the URL of an icon to be shown on the desktop.java.lang.StringgetUrl()Get URL of the windowbooleanisDisableIabSecureLogging()The disableIabSecureLogging property represents a flag to disable secure logging in IAB Default: falsevoidsetAccelerator(AcceleratorOptions acceleratorOptions)Set keyboard shortcut options.voidsetAutoShow(boolean autoShow)The AutoShow property represents a flag to automatically show the Window when it is created.voidsetContextMenu(boolean contextMenu)The ContextMenu property represents a flag to show the context menu when right-clicking on a window.voidsetCornerRounding(int width, int height)The CornerRoundingHeight property represents the rounded corners to apply.voidsetDefaultCentered(boolean defaultCentered)The DefaultCentered property specifies that the window will be positioned in the center of the primary monitor when loaded for the first time on a machine.voidsetDefaultHeight(int defaultHeight)The DefaultWidth property represents the window's default height in pixels.voidsetDefaultLeft(int defaultLeft)The DefaultLeft property represents the window's default left position.voidsetDefaultTop(int defaultTop)The DefaultTop property represents the window's default top position.voidsetDefaultWidth(int defaultWidth)voidsetDisableIabSecureLogging(boolean disable)The disableIabSecureLogging property represents a flag to disable secure logging in IAB Default: falsevoidsetFrame(boolean frame)The Frame property represents a flag to show the frame.voidsetHideOnClose(boolean hideOnClose)The HideOnClose property represents a flag to allow a window to be hidden when the close button is clicked.voidsetLayoutOptions(LayoutOptions layoutOptions)voidsetMaxHeight(int maxHeight)The MaxHeight property represents the maximum height of a window.voidsetMaximizable(boolean maximizable)The Maximizable property represents a flag that lets the window be maximized.voidsetMaxWidth(int maxWidth)The MaxWidth property represents the maximum width of a window.voidsetMinHeight(int minHeight)The MinHeight property represents the minimum height of a window.voidsetMinimizable(boolean maximizable)The Minimizable property represents a flag that lets the window be minimized.voidsetMinWidth(int minWidth)The MinWidth property represents the minimum width of a window.voidsetName(java.lang.String name)Set name of the windowvoidsetOpacity(double opacity)The Opacity property represents a flag that specifies how transparent the window will be.voidsetPreload(java.lang.String url)Set A URL of the preload script that will be retrieved (and cached, if needed) and eval'ed before any other script.voidsetResizable(boolean resizable)The Resizable property represents a flag which allows the user to resize the window.voidsetResizeRegionBottomRightCorner(int resizeRegionBottomRightCorner)The ResizeRegionBottomRightCorner property defines an additional square region located at the bottom right corner of a frameless window.voidsetResizeRegionSize(int resizeRegionSize)The ResizeRegionSize property defines a region in pixels that will respond to user mouse interaction for resizing a frameless window Default value: 2voidsetSaveWindowState(boolean saveWindowState)The SaveWindowState property defines whether or not a window should maintain a persistent cache of its position/size.voidsetShowTaskbarIcon(boolean showTaskbarIcon)The ShowTaskbarIcon property represents a flag to show the Window's icon in the taskbar.voidsetState(java.lang.String state)The State property represents a string that sets the window to be "minimized", "maximized", or "normal" on creation.voidsetTaskbarIcon(java.lang.String taskbarIcon)The TaskbarIcon property represents the URL of an icon to be shown on the desktop for a child window.voidsetUrl(java.lang.String url)Set name of the windowMethods inherited from class com.openfin.desktop.JsonBean
get, getArray, getBoolean, getBooleanValue, getBooleanValue, getDoubleValue, getDoubleValue, getInteger, getIntegerValue, getJsonBean, getJsonBean, getJsonBeanList, getJsonCopy, getJsonValue, getList, getRectangle, getString, put, setArray, setBoolean, setInteger, setJsonArray, setJsonBean, setLong, setRectangle, setString, toString
-
Constructor Details
-
WindowOptions
public WindowOptions()Default constructor -
WindowOptions
public WindowOptions(java.lang.String name, java.lang.String url)Contructor with name and url- Parameters:
name- name of the Windowurl- URL of the window
-
WindowOptions
public WindowOptions(org.json.JSONObject options)Constructs an instance with a new underlying JSONObject- Parameters:
options- underlying options
-
-
Method Details
-
setShowTaskbarIcon
public void setShowTaskbarIcon(boolean showTaskbarIcon)The ShowTaskbarIcon property represents a flag to show the Window's icon in the taskbar. Default: false- Parameters:
showTaskbarIcon- show taskbar icon if true
-
getName
public java.lang.String getName()Get name of the window- Returns:
- name
-
setName
public void setName(java.lang.String name)Set name of the window- Parameters:
name- name of the Window
-
getUrl
public java.lang.String getUrl()Get URL of the window- Returns:
- url of the Window
-
setUrl
public void setUrl(java.lang.String url)Set name of the window- Parameters:
url- name of the window
-
getShowTaskbarIcon
public boolean getShowTaskbarIcon()The ShowTaskbarIcon property represents a flag to show the Window's icon in the taskbar. Default: false- Returns:
- value of showTaskbarIcon
-
setDefaultWidth
public void setDefaultWidth(int defaultWidth) -
getDefaultWidth
public int getDefaultWidth()The DefaultWidth property represents the window's default width in pixels. Default: 800- Returns:
- value of defaultWidth
-
setDefaultHeight
public void setDefaultHeight(int defaultHeight)The DefaultWidth property represents the window's default height in pixels. Default: 500- Parameters:
defaultHeight- value of defaultHeight
-
getDefaultHeight
public int getDefaultHeight()The DefaultWidth property represents the window's default height in pixels. Default: 500- Returns:
- value of defaultHeight
-
setDefaultTop
public void setDefaultTop(int defaultTop)The DefaultTop property represents the window's default top position. Default: 100- Parameters:
defaultTop- value of defaultTop
-
getDefaultTop
public int getDefaultTop()The DefaultTop property represents the window's default top position. Default: 100- Returns:
- value of defaultTop
-
setDefaultLeft
public void setDefaultLeft(int defaultLeft)The DefaultLeft property represents the window's default left position. Default: 100- Parameters:
defaultLeft- value of defaultLeft
-
getDefaultLeft
public int getDefaultLeft()The DefaultLeft property represents the window's default left position. Default: 100- Returns:
- value of defaultLeft
-
setFrame
public void setFrame(boolean frame)The Frame property represents a flag to show the frame. Default: true- Parameters:
frame- value of frame
-
getFrame
public boolean getFrame()The Frame property represents a flag to show the frame. Default: true- Returns:
- value of frame
-
setResizable
public void setResizable(boolean resizable)The Resizable property represents a flag which allows the user to resize the window. This property will be deprecated in a future release. Default: true- Parameters:
resizable- value of resizable
-
getResizable
public boolean getResizable()The Resizable property represents a flag which allows the user to resize the window. This property will be deprecated in a future release. Default: true- Returns:
- value of resizable
-
setAutoShow
public void setAutoShow(boolean autoShow)The AutoShow property represents a flag to automatically show the Window when it is created. Default: false- Parameters:
autoShow- value of autoShow
-
getAutoShow
public boolean getAutoShow()The AutoShow property represents a flag to automatically show the Window when it is created. Default: false- Returns:
- value of autoShow
-
setState
public void setState(java.lang.String state)The State property represents a string that sets the window to be "minimized", "maximized", or "normal" on creation. Default: "normal"- Parameters:
state- value of state
-
getState
public java.lang.String getState()The State property represents a string that sets the window to be "minimized", "maximized", or "normal" on creation. Default: "normal"- Returns:
- value of state
-
setOpacity
public void setOpacity(double opacity)The Opacity property represents a flag that specifies how transparent the window will be. Default: 1.0- Parameters:
opacity- value of opacity
-
getOpacity
public double getOpacity()The Opacity property represents a flag that specifies how transparent the window will be. Default: 1.0- Returns:
- value of opacity
-
setCornerRounding
public void setCornerRounding(int width, int height)The CornerRoundingHeight property represents the rounded corners to apply.- Parameters:
width- width of rounded cornersheight- height of rounded corners
-
getCornerRoundingHeight
public int getCornerRoundingHeight()The CornerRoundingHeight property represents the rounded corners to apply.- Returns:
- height of rounded corners
-
getCornerRoundingWidth
public int getCornerRoundingWidth()The CornerRoundingHeight property represents the rounded corners to apply.- Returns:
- width of of rounded corners
-
setMinWidth
public void setMinWidth(int minWidth)The MinWidth property represents the minimum width of a window. Default: 0- Parameters:
minWidth- value of minWidth
-
getMinWidth
public int getMinWidth()The MinWidth property represents the minimum width of a window. Default: 0- Returns:
- value of minWidth
-
setMaxWidth
public void setMaxWidth(int maxWidth)The MaxWidth property represents the maximum width of a window. The value will default to the OS defined value if set to -1. Default: -1- Parameters:
maxWidth- value of maxWidth
-
getMaxWidth
public int getMaxWidth()The MaxWidth property represents the maximum width of a window. The value will default to the OS defined value if set to -1. Default: -1- Returns:
- value of maxWidth
-
setMinHeight
public void setMinHeight(int minHeight)The MinHeight property represents the minimum height of a window. Default: 0- Parameters:
minHeight- value of minHeight
-
getMinHeight
public int getMinHeight()The MinHeight property represents the minimum height of a window. Default: 0- Returns:
- value of minHeight
-
setMaxHeight
public void setMaxHeight(int maxHeight)The MaxHeight property represents the maximum height of a window. Will default to the OS defined value if set to -1. Default: -1- Parameters:
maxHeight- value of maxHeight
-
getMaxHeight
public int getMaxHeight()The MaxHeight property represents the maximum height of a window. Will default to the OS defined value if set to -1. Default: -1- Returns:
- value of maxHeight
-
setSaveWindowState
public void setSaveWindowState(boolean saveWindowState)The SaveWindowState property defines whether or not a window should maintain a persistent cache of its position/size. Default: true- Parameters:
saveWindowState- value of saveWindowState
-
getSaveWindowState
public boolean getSaveWindowState()The SaveWindowState property defines whether or not a window should maintain a persistent cache of its position/size. Default: true- Returns:
- value of saveWindowState
-
setMinimizable
public void setMinimizable(boolean maximizable)The Minimizable property represents a flag that lets the window be minimized. Default: true- Parameters:
maximizable- value of maximizable
-
getMinimizable
public boolean getMinimizable() -
setMaximizable
public void setMaximizable(boolean maximizable)The Maximizable property represents a flag that lets the window be maximized. Default: true- Parameters:
maximizable- value of maximizable
-
getMaximizable
public boolean getMaximizable()The Maximizable property represents a flag that lets the window be maximized. Default: true- Returns:
- value of maximizable
-
setHideOnClose
public void setHideOnClose(boolean hideOnClose)The HideOnClose property represents a flag to allow a window to be hidden when the close button is clicked.- Parameters:
hideOnClose- value of hideOnClose
-
getHideOnClose
public boolean getHideOnClose()The HideOnClose property represents a flag to allow a window to be hidden when the close button is clicked.- Returns:
- value of hideOnClose
-
setContextMenu
public void setContextMenu(boolean contextMenu)The ContextMenu property represents a flag to show the context menu when right-clicking on a window. Default: false- Parameters:
contextMenu- value of contextMenu
-
getContextMenu
public boolean getContextMenu()The ContextMenu property represents a flag to show the context menu when right-clicking on a window. Default: false- Returns:
- value of contextMenu
-
setTaskbarIcon
public void setTaskbarIcon(java.lang.String taskbarIcon)The TaskbarIcon property represents the URL of an icon to be shown on the desktop for a child window. To set URL of taskbar icon for main window of an app, ApplicationOptions.setApplicationIcon should be called.- Parameters:
taskbarIcon- value of taskbarIcon
-
getTaskbarIcon
public java.lang.String getTaskbarIcon()The TaskbarIcon property represents the URL of an icon to be shown on the desktop.- Returns:
- value of taskbarIcon
-
setResizeRegionBottomRightCorner
public void setResizeRegionBottomRightCorner(int resizeRegionBottomRightCorner)The ResizeRegionBottomRightCorner property defines an additional square region located at the bottom right corner of a frameless window. Default value: 4- Parameters:
resizeRegionBottomRightCorner- an additional square region
-
getResizeRegionBottomRightCorner
public int getResizeRegionBottomRightCorner()The ResizeRegionBottomRightCorner property defines an additional square region located at the bottom right corner of a frameless window.- Returns:
- value of resizeRegionBottomRightCorner, or -1 if it is not set
-
setResizeRegionSize
public void setResizeRegionSize(int resizeRegionSize)The ResizeRegionSize property defines a region in pixels that will respond to user mouse interaction for resizing a frameless window Default value: 2- Parameters:
resizeRegionSize- new value of resizeRegionSize
-
getResizeRegionSize
public int getResizeRegionSize()The ResizeRegionSize property defines a region in pixels that will respond to user mouse interaction for resizing a frameless window- Returns:
- value of resizeRegionSize, or -1 if it is not set
-
setDefaultCentered
public void setDefaultCentered(boolean defaultCentered)The DefaultCentered property specifies that the window will be positioned in the center of the primary monitor when loaded for the first time on a machine. Default: false- Parameters:
defaultCentered- new value of defaultCentered
-
getDefaultCentered
public boolean getDefaultCentered()The DefaultCentered property specifies that the window will be positioned in the center of the primary monitor when loaded for the first time on a machine. Default: false- Returns:
- value of defaultCentered
-
getPreload
public java.lang.String getPreload()Get the URL of the preload script that will be retrieved (and cached, if needed) and eval'ed before any other script. Default: inherited from the parent application.- Returns:
- url of the preload script
-
setPreload
public void setPreload(java.lang.String url)Set A URL of the preload script that will be retrieved (and cached, if needed) and eval'ed before any other script. Default: inherited from the parent application.- Parameters:
url- of the preload script
-
isDisableIabSecureLogging
public boolean isDisableIabSecureLogging()The disableIabSecureLogging property represents a flag to disable secure logging in IAB Default: false- Returns:
- value of disableIabSecureLogging
-
setDisableIabSecureLogging
public void setDisableIabSecureLogging(boolean disable)The disableIabSecureLogging property represents a flag to disable secure logging in IAB Default: false- Parameters:
disable- new value of disableIabSecureLogging
-
setAccelerator
Set keyboard shortcut options.- Parameters:
acceleratorOptions- Keyboard shortcuts options for devtools, zoom, reload, and reload ignoring cache.
-
getAccelerator
Get keyboard shortcut options.- Returns:
- Keyboard shortcuts options
-
getLayoutOptions
-
setLayoutOptions
-
getJson
public org.json.JSONObject getJson()Description copied from class:JsonBeanGets the underlying JSONObject
-