Java Code Examples for com.intellij.openapi.wm.ex.WindowManagerEx#setAlphaModeRatio()
The following examples show how to use
com.intellij.openapi.wm.ex.WindowManagerEx#setAlphaModeRatio() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractPopup.java From consulo with Apache License 2.0 | 6 votes |
private Window updateMaskAndAlpha(Window window) { if (window == null) return null; if (!window.isDisplayable() || !window.isShowing()) return window; final WindowManagerEx wndManager = getWndManager(); if (wndManager == null) return window; if (!wndManager.isAlphaModeEnabled(window)) return window; if (myAlpha != myLastAlpha) { wndManager.setAlphaModeRatio(window, myAlpha); myLastAlpha = myAlpha; } if (myMaskProvider != null) { final Dimension size = window.getSize(); Shape mask = myMaskProvider.getMask(size); wndManager.setWindowMask(window, mask); } WindowManagerEx.WindowShadowMode mode = myShadowed ? WindowManagerEx.WindowShadowMode.NORMAL : WindowManagerEx.WindowShadowMode.DISABLED; WindowManagerEx.getInstanceEx().setWindowShadow(window, mode); return window; }
Example 2
Source File: DesktopFloatingDecorator.java From consulo with Apache License 2.0 | 6 votes |
@Override public final void show() { setFocusableWindowState(myInfo.isActive()); super.show(); final UISettings uiSettings = UISettings.getInstance(); if (uiSettings.ENABLE_ALPHA_MODE) { final WindowManagerEx windowManager = WindowManagerEx.getInstanceEx(); windowManager.setAlphaModeEnabled(this, true); if (myInfo.isActive()) { windowManager.setAlphaModeRatio(this, 0.0f); } else { windowManager.setAlphaModeRatio(this, uiSettings.ALPHA_MODE_RATIO); } } paint(getGraphics()); // This prevents annoying flick setFocusableWindowState(true); uiSettings.addUISettingsListener(myUISettingsListener, myDelayAlarm); }
Example 3
Source File: DesktopFloatingDecorator.java From consulo with Apache License 2.0 | 6 votes |
@Override public void uiSettingsChanged(final UISettings uiSettings) { LOG.assertTrue(isDisplayable()); LOG.assertTrue(isShowing()); final WindowManagerEx windowManager = WindowManagerEx.getInstanceEx(); myDelayAlarm.cancelAllRequests(); if (uiSettings.ENABLE_ALPHA_MODE) { if (!myInfo.isActive()) { windowManager.setAlphaModeEnabled(DesktopFloatingDecorator.this, true); windowManager.setAlphaModeRatio(DesktopFloatingDecorator.this, uiSettings.ALPHA_MODE_RATIO); } } else { windowManager.setAlphaModeEnabled(DesktopFloatingDecorator.this, false); } }
Example 4
Source File: DesktopFloatingDecorator.java From consulo with Apache License 2.0 | 5 votes |
@Override public final void run() { final WindowManagerEx windowManager = WindowManagerEx.getInstanceEx(); if (isDisplayable() && isShowing()) { windowManager.setAlphaModeRatio(DesktopFloatingDecorator.this, getCurrentAlphaRatio()); } if (myCurrentFrame < TOTAL_FRAME_COUNT) { myCurrentFrame++; myFrameTicker.addRequest(myAnimator, DELAY); } else { myFrameTicker.cancelAllRequests(); } }