Package com.nomagic.magicdraw.ui
Class WindowComponentInfo
- java.lang.Object
-
- com.nomagic.magicdraw.ui.WindowComponentInfo
-
@OpenApiAll public class WindowComponentInfo extends java.lang.Object
Stores information about window component - id, name, icon and etc.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
dockable
Flag indicating if window can be dockedprivate javax.swing.Icon
icon
Icon of the window component.private java.lang.String
id
The id of the window component.private int
index
Flag indicating the docking index of the window component in JIDE interface style.private java.awt.Rectangle
initialFloatingBounds
Initial bounds for floating window.private java.lang.String
name
The name (title) of the window component.private boolean
removeOnHide
Flag indicating if the window should be removed on hide.private int
side
Flag indicating the side to place the window component in JIDE interface style.private int
state
Flag indicating the docking state of the window component in JIDE interface style.private java.lang.String
tabTitle
The title of window's tab.
-
Constructor Summary
Constructors Constructor Description WindowComponentInfo(java.lang.String id, java.lang.String tabTitle, java.lang.String name, javax.swing.Icon icon, int side, int state, boolean removeOnHide)
Constructor.WindowComponentInfo(java.lang.String id, java.lang.String name, javax.swing.Icon icon, int side, int state, boolean removeOnHide)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.swing.Icon
getIcon()
Returns icon of the window component.java.lang.String
getId()
Returns id of the window component.int
getIndex()
Returns the window component index in the JIDE interface style.java.awt.Rectangle
getInitialFloatingBounds()
java.lang.String
getName()
Returns name (title) of the window component.int
getSide()
Returns the window component side in the JIDE interface style.int
getState()
Returns the window component initial docking state in the JIDE interface style.java.lang.String
getTabTitle()
Returns window's tab's title.boolean
isDockable()
boolean
isRemoveOnHide()
Returns if the window component should be removed on hide.void
setDockable(boolean dockable)
Set dockable initial state of the windowvoid
setIcon(javax.swing.Icon icon)
Set icon for the window.void
setId(java.lang.String id)
Set id for the window component.void
setIndex(int index)
Set the window component initial docking index in JIDE interface style.void
setInitialFloatingBounds(java.awt.Rectangle initialFloatingBounds)
Sets initial bounds for floating window.void
setName(java.lang.String name)
Set name (title) for the window component.void
setRemoveOnHide(boolean removeOnHide)
Set if remove the window component onvoid
setSide(int side)
Set the window component side in JIDE interface style.void
setState(int state)
Set the window component initial docking state in JIDE interface style.void
setTabTitle(java.lang.String tabTitle)
Sets title of window's tab.
-
-
-
Field Detail
-
id
private java.lang.String id
The id of the window component.
-
tabTitle
private java.lang.String tabTitle
The title of window's tab.
-
name
private java.lang.String name
The name (title) of the window component.
-
icon
@CheckForNull private javax.swing.Icon icon
Icon of the window component.
-
side
private int side
Flag indicating the side to place the window component in JIDE interface style.
-
state
private int state
Flag indicating the docking state of the window component in JIDE interface style.
-
index
private int index
Flag indicating the docking index of the window component in JIDE interface style.
-
removeOnHide
private boolean removeOnHide
Flag indicating if the window should be removed on hide. It may be just hidden but not removed.
-
dockable
private boolean dockable
Flag indicating if window can be docked
-
initialFloatingBounds
@CheckForNull private java.awt.Rectangle initialFloatingBounds
Initial bounds for floating window. Default will be used if not specified
-
-
Constructor Detail
-
WindowComponentInfo
public WindowComponentInfo(java.lang.String id, java.lang.String name, @CheckForNull javax.swing.Icon icon, int side, int state, boolean removeOnHide)
Constructor.- Parameters:
id
- id of the window component.name
- name (title) of the window.icon
- icon of the window.side
- indicates the side to place the window component in the JIDE interface style.state
- indicates the docking state of the window component in the JIDE interface style.removeOnHide
- true if the window should be removed on hide, false if it should be just hide.- See Also:
WindowsManager.SIDE_EAST
,WindowsManager.SIDE_NORTH
,WindowsManager.SIDE_SOUTH
,WindowsManager.SIDE_WEST
,WindowsManager.STATE_DOCKED
,WindowsManager.STATE_FLOATING
,WindowsManager.STATE_AUTOHIDE
,WindowsManager.STATE_HIDDEN
-
WindowComponentInfo
public WindowComponentInfo(java.lang.String id, java.lang.String tabTitle, java.lang.String name, @CheckForNull javax.swing.Icon icon, int side, int state, boolean removeOnHide)
Constructor.- Parameters:
id
- id of the window component.tabTitle
- the title of window's tab.name
- name (title) of the window.icon
- icon of the window.side
- indicates the side to place the window component in the JIDE interface style.state
- indicates the docking state of the window component in the JIDE interface style.removeOnHide
- true if the window should be removed on hide, false if it should be just hide.- See Also:
WindowsManager.SIDE_EAST
,WindowsManager.SIDE_NORTH
,WindowsManager.SIDE_SOUTH
,WindowsManager.SIDE_WEST
,WindowsManager.STATE_DOCKED
,WindowsManager.STATE_FLOATING
,WindowsManager.STATE_AUTOHIDE
,WindowsManager.STATE_HIDDEN
-
-
Method Detail
-
getId
public java.lang.String getId()
Returns id of the window component.- Returns:
- id of the component.
-
getTabTitle
public java.lang.String getTabTitle()
Returns window's tab's title.- Returns:
- tab's title.
-
getName
public java.lang.String getName()
Returns name (title) of the window component.- Returns:
- title of the window.
-
getIcon
@CheckForNull public javax.swing.Icon getIcon()
Returns icon of the window component.- Returns:
- icon of the window.
-
getSide
public int getSide()
Returns the window component side in the JIDE interface style.- Returns:
- side constant.
-
getState
public int getState()
Returns the window component initial docking state in the JIDE interface style.- Returns:
- side constant.
-
isRemoveOnHide
public boolean isRemoveOnHide()
Returns if the window component should be removed on hide.- Returns:
- true if window is removed on hide, otherwise - false.
-
setIcon
public void setIcon(@CheckForNull javax.swing.Icon icon)
Set icon for the window.- Parameters:
icon
- window component icon.
-
setId
public void setId(java.lang.String id)
Set id for the window component.- Parameters:
id
- id
-
setTabTitle
public void setTabTitle(java.lang.String tabTitle)
Sets title of window's tab.- Parameters:
tabTitle
- tab's title
-
setName
public void setName(java.lang.String name)
Set name (title) for the window component.- Parameters:
name
- name
-
setRemoveOnHide
public void setRemoveOnHide(boolean removeOnHide)
Set if remove the window component on- Parameters:
removeOnHide
- remove on hide
-
setSide
public void setSide(int side)
Set the window component side in JIDE interface style.- Parameters:
side
- side
-
setState
public void setState(int state)
Set the window component initial docking state in JIDE interface style.- Parameters:
state
- state
-
getIndex
public int getIndex()
Returns the window component index in the JIDE interface style.- Returns:
- index
-
setIndex
public void setIndex(int index)
Set the window component initial docking index in JIDE interface style.- Parameters:
index
- index
-
isDockable
public boolean isDockable()
- Returns:
- true if window is dockable
-
setDockable
public void setDockable(boolean dockable)
Set dockable initial state of the window- Parameters:
dockable
- true if window is dockable
-
getInitialFloatingBounds
@CheckForNull public java.awt.Rectangle getInitialFloatingBounds()
- Returns:
- initial bounds for floating window or null if default must be used.
-
setInitialFloatingBounds
public void setInitialFloatingBounds(@CheckForNull java.awt.Rectangle initialFloatingBounds)
Sets initial bounds for floating window. Default bounds will be used if not specified.- Parameters:
initialFloatingBounds
- bounds
-
-