public final class TestWindowManager extends WindowManagerEx
WindowManagerEx.WindowShadowMode| Constructor and Description |
|---|
TestWindowManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(WindowManagerListener listener) |
void |
adjustContainerWindow(java.awt.Component c,
java.awt.Dimension oldSize,
java.awt.Dimension newSize) |
void |
dispatchComponentEvent(java.awt.event.ComponentEvent e)
This method is invoked by
IdeEventQueue to notify window manager that
some window activity happens. |
void |
doNotSuggestAsParent(java.awt.Window window) |
IdeFrameEx |
findFirstVisibleFrameHelper()
GUI test only.
|
IdeFrame |
findFrameFor(Project project) |
ProjectFrameHelper |
findFrameHelper(Project project)
Find frame for project or if project is null, for a last focused window.
|
javax.swing.JFrame |
findVisibleFrame() |
ProjectFrameHelper [] |
getAllProjectFrames() |
java.awt.Component |
getFocusedComponent(Project project) |
java.awt.Component |
getFocusedComponent(java.awt.Window window) |
IdeFrameImpl |
getFrame(Project project) |
ProjectFrameHelper |
getFrameHelper(Project project) |
IdeFrame |
getIdeFrame(Project project) |
DesktopLayout |
getLayout() |
java.awt.Window |
getMostRecentFocusedWindow() |
java.util.List<ProjectFrameHelper> |
getProjectFrameHelpers() |
java.awt.Rectangle |
getScreenBounds() |
java.awt.Rectangle |
getScreenBounds(Project project) |
StatusBar |
getStatusBar(Project project)
Get the status bar for the project's main frame.
|
void |
hideDialog(javax.swing.JDialog dialog,
Project project)
Either dispose the dialog immediately if project's frame has focus or just hide and dispose when frame gets focus or closes.
|
boolean |
isAlphaModeEnabled(java.awt.Window window) |
boolean |
isAlphaModeSupported() |
boolean |
isFullScreenSupportedInCurrentOS() |
boolean |
isInsideScreenBounds(int x,
int y,
int width)
Tests whether the specified rectangle is inside of screen bounds.
|
void |
releaseFrame(ProjectFrameHelper frameHelper) |
void |
removeListener(WindowManagerListener listener) |
void |
resetWindow(java.awt.Window window) |
void |
setAlphaModeEnabled(java.awt.Window window,
boolean state)
Sets whether the alpha (transparent) mode is enabled for specified
window. |
void |
setAlphaModeRatio(java.awt.Window window,
float ratio)
Sets alpha (transparency) ratio for the specified
window. |
void |
setLayout(DesktopLayout layout)
Copies
layout into internal default layout. |
void |
setWindowMask(java.awt.Window window,
java.awt.Shape mask) |
void |
setWindowShadow(java.awt.Window window,
WindowManagerEx.WindowShadowMode mode) |
java.awt.Window |
suggestParentWindow(Project project)
Gets first window (starting from the active one) that can be the parent for other windows.
|
getInstanceEx, requestUserAttentiongetInstance, getStatusBarpublic final void doNotSuggestAsParent(java.awt.Window window)
doNotSuggestAsParent in class WindowManagerpublic final java.awt.Window suggestParentWindow(Project project)
WindowManagerDialog or Frame.suggestParentWindow in class WindowManagernull if there is no currently active window or there is no window that can be the parent.public final StatusBar getStatusBar(Project project)
WindowManagergetStatusBar in class WindowManagerpublic IdeFrame getIdeFrame(Project project)
getIdeFrame in class WindowManagerpublic ProjectFrameHelper findFrameHelper(Project project)
WindowManagerExfindFrameHelper in class WindowManagerExpublic ProjectFrameHelper getFrameHelper(Project project)
getFrameHelper in class WindowManagerExpublic java.awt.Rectangle getScreenBounds(Project project)
getScreenBounds in class WindowManagerExpublic void setWindowMask(java.awt.Window window,
java.awt.Shape mask)
setWindowMask in class WindowManagerExpublic void resetWindow(java.awt.Window window)
resetWindow in class WindowManagerExpublic ProjectFrameHelper [] getAllProjectFrames()
getAllProjectFrames in class WindowManagerpublic javax.swing.JFrame findVisibleFrame()
findVisibleFrame in class WindowManagerpublic final IdeFrameImpl getFrame(Project project)
getFrame in class WindowManagerExpublic final java.awt.Component getFocusedComponent(java.awt.Window window)
getFocusedComponent in class WindowManagerExpublic final java.awt.Component getFocusedComponent(Project project)
getFocusedComponent in class WindowManagerExproject - may be null when no project is opened.null.public final java.awt.Window getMostRecentFocusedWindow()
getMostRecentFocusedWindow in class WindowManagerExpublic IdeFrame findFrameFor(Project project)
findFrameFor in class WindowManagerExpublic DesktopLayout getLayout()
getLayout in class WindowManagerExpublic final void setLayout(DesktopLayout layout)
WindowManagerExlayout into internal default layout.setLayout in class WindowManagerExpublic final void dispatchComponentEvent(java.awt.event.ComponentEvent e)
WindowManagerExIdeEventQueue to notify window manager that
some window activity happens. Do not invoke it in other places!!!dispatchComponentEvent in class WindowManagerExpublic final java.awt.Rectangle getScreenBounds()
getScreenBounds in class WindowManagerExx and/or y
coordinates can be negative. It depends on physical configuration of graphics devices.
For example, the left monitor has negative coordinates on Win32 platform with dual monitor support
(right monitor is the primer one) .public final boolean isInsideScreenBounds(int x,
int y,
int width)
WindowManagerMethod uses its own heuristic test. Test passes if the intersection of screen bounds and specified rectangle isn't empty and its height and width are not less than some value. Note, that all parameters are in screen coordinate system. The method properly works in a multi-monitor configuration.
isInsideScreenBounds in class WindowManagerpublic final boolean isAlphaModeSupported()
isAlphaModeSupported in class WindowManagertrue if current OS supports alpha mode for windows and all native libraries were successfully loaded.public final void setAlphaModeRatio(java.awt.Window window,
float ratio)
WindowManagerwindow.
If alpha mode isn't supported by the underlying windowing system, then the method does nothing.
The method also does nothing if alpha mode isn't enabled for the specified window.
setAlphaModeRatio in class WindowManagerwindow - window which transparency should be changed.ratio - ratio of transparency. 0 means absolutely non transparent window.
1 means absolutely transparent window.public final boolean isAlphaModeEnabled(java.awt.Window window)
isAlphaModeEnabled in class WindowManagertrue if specified window is currently is alpha mode.public final void setAlphaModeEnabled(java.awt.Window window,
boolean state)
WindowManagerwindow.
If alpha mode isn't supported by the underlying windowing system, then the method does nothing.setAlphaModeEnabled in class WindowManagerwindow - window which mode to be set.state - determines the new alpha mode.public void setWindowShadow(java.awt.Window window,
WindowManagerEx.WindowShadowMode mode)
setWindowShadow in class WindowManagerExpublic void hideDialog(javax.swing.JDialog dialog,
Project project)
WindowManagerExhideDialog in class WindowManagerExdialog - to hide and dispose laterproject - the dialog has been shown forpublic void adjustContainerWindow(java.awt.Component c,
java.awt.Dimension oldSize,
java.awt.Dimension newSize)
adjustContainerWindow in class WindowManagerExpublic void addListener(WindowManagerListener listener)
addListener in class WindowManagerpublic void removeListener(WindowManagerListener listener)
removeListener in class WindowManagerpublic boolean isFullScreenSupportedInCurrentOS()
isFullScreenSupportedInCurrentOS in class WindowManagertrue if full screen mode is supported in current OS.public void releaseFrame(ProjectFrameHelper frameHelper)
releaseFrame in class WindowManagerExpublic java.util.List<ProjectFrameHelper> getProjectFrameHelpers()
getProjectFrameHelpers in class WindowManagerExpublic IdeFrameEx findFirstVisibleFrameHelper()
WindowManagerExfindFirstVisibleFrameHelper in class WindowManagerEx