public abstract class WindowManager
extends java.lang.Object
Constructor and Description |
---|
WindowManager() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addListener(WindowManagerListener listener) |
abstract void |
doNotSuggestAsParent(java.awt.Window window) |
abstract javax.swing.JFrame |
findVisibleFrame() |
abstract IdeFrame [] |
getAllProjectFrames() |
abstract javax.swing.JFrame |
getFrame(Project project) |
abstract IdeFrame |
getIdeFrame(Project project) |
static WindowManager |
getInstance() |
StatusBar |
getStatusBar(java.awt.Component c,
Project project) |
abstract StatusBar |
getStatusBar(Project project)
Get the status bar for the project's main frame.
|
abstract boolean |
isAlphaModeEnabled(java.awt.Window window) |
abstract boolean |
isAlphaModeSupported() |
abstract boolean |
isFullScreenSupportedInCurrentOS() |
abstract boolean |
isInsideScreenBounds(int x,
int y,
int width)
Tests whether the specified rectangle is inside of screen bounds.
|
abstract void |
removeListener(WindowManagerListener listener) |
abstract void |
requestUserAttention(IdeFrame frame,
boolean critical) |
abstract void |
setAlphaModeEnabled(java.awt.Window window,
boolean state)
Sets whether the alpha (transparent) mode is enabled for specified
window . |
abstract void |
setAlphaModeRatio(java.awt.Window window,
float ratio)
Sets alpha (transparency) ratio for the specified
window . |
abstract java.awt.Window |
suggestParentWindow(Project project)
Gets first window (starting from the active one) that can be the parent for other windows.
|
public static WindowManager getInstance()
public abstract boolean isAlphaModeSupported()
true
if current OS supports alpha mode for windows and all native libraries were successfully loaded.public abstract void setAlphaModeRatio(java.awt.Window window, float ratio)
window
.
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
.
window
- window
which transparency should be changed.ratio
- ratio of transparency. 0
means absolutely non transparent window.
1
means absolutely transparent window.java.lang.IllegalArgumentException
- if window
is not displayable or not showing, or if ration
isn't in [0..1]
range.public abstract boolean isAlphaModeEnabled(java.awt.Window window)
true
if specified window
is currently is alpha mode.public abstract void setAlphaModeEnabled(java.awt.Window window, boolean state)
window
.
If alpha mode isn't supported by the underlying windowing system, then the method does nothing.window
- window which mode to be set.state
- determines the new alpha mode.public abstract void doNotSuggestAsParent(java.awt.Window window)
public abstract java.awt.Window suggestParentWindow(Project project)
Dialog
or Frame
.null
if there is no currently active window or there is no window that can be the parent.public abstract StatusBar getStatusBar(Project project)
public abstract javax.swing.JFrame getFrame(Project project)
public abstract boolean isInsideScreenBounds(int x, int y, int width)
Method 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.
public abstract IdeFrame [] getAllProjectFrames()
public abstract javax.swing.JFrame findVisibleFrame()
public abstract void addListener(WindowManagerListener listener)
public abstract void removeListener(WindowManagerListener listener)
public abstract boolean isFullScreenSupportedInCurrentOS()
true
if full screen mode is supported in current OS.public abstract void requestUserAttention(IdeFrame frame, boolean critical)