本文整理匯總了Java中com.intellij.util.ui.UIUtil.isUnderAlloyLookAndFeel方法的典型用法代碼示例。如果您正苦於以下問題:Java UIUtil.isUnderAlloyLookAndFeel方法的具體用法?Java UIUtil.isUnderAlloyLookAndFeel怎麽用?Java UIUtil.isUnderAlloyLookAndFeel使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.intellij.util.ui.UIUtil
的用法示例。
在下文中一共展示了UIUtil.isUnderAlloyLookAndFeel方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: fixMenuBackground
import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
/**
* Hacks a problem under Alloy LaF which draws menu bar in different background menu items are drawn in.
*/
private void fixMenuBackground() {
if (UIUtil.isUnderAlloyLookAndFeel() && getMenuCount() > 0) {
final JMenu menu = getMenu(0);
if (menu != null) { // hack for Substance LAF compatibility
menu.updateUI();
setBackground(menu.getBackground());
}
}
}
示例2: setLayout
import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
@Override
public void setLayout(LayoutManager mgr) {
//First time mgr comes from createRootLayout(), it's OK. But then Alloy spoils it and breaks FullScreen mode under Windows
if (getLayout() != null && UIUtil.isUnderAlloyLookAndFeel()) return;
super.setLayout(mgr);
}
示例3: show
import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
public void show(boolean restoreBounds) {
myFocusedCallback = new ActionCallback();
if (myProject != null) {
IdeFocusManager.getInstance(myProject).typeAheadUntil(myFocusedCallback);
}
final Window frame = getFrame();
if (myStatusBar != null) {
myStatusBar.install((IdeFrame)frame);
}
myFocusTrackback = new FocusTrackback(this, IdeFocusManager.findInstance().getFocusOwner(), true);
if (frame instanceof JFrame) {
((JFrame)frame).setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
} else {
((JDialog)frame).setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
}
final WindowAdapter focusListener = new WindowAdapter() {
public void windowOpened(WindowEvent e) {
IdeFocusManager fm = IdeFocusManager.getInstance(myProject);
JComponent toFocus = myPreferedFocus;
if (toFocus == null) {
toFocus = fm.getFocusTargetFor(myComponent);
}
if (toFocus != null) {
fm.requestFocus(toFocus, true).notify(myFocusedCallback);
} else {
myFocusedCallback.setRejected();
}
}
};
frame.addWindowListener(focusListener);
Disposer.register(this, new Disposable() {
@Override
public void dispose() {
frame.removeWindowListener(focusListener);
}
});
if (myCloseOnEsc) addCloseOnEsc((RootPaneContainer)frame);
((RootPaneContainer)frame).getContentPane().add(myComponent, BorderLayout.CENTER);
if (frame instanceof JFrame) {
((JFrame)frame).setTitle(myTitle);
} else {
((JDialog)frame).setTitle(myTitle);
}
if (myImageWasChanged) {
frame.setIconImage(myImage);
}
else {
AppUIUtil.updateWindowIcon(myFrame);
}
if (restoreBounds) {
loadFrameState();
}
myFocusWatcher = new FocusWatcher() {
protected void focusLostImpl(final FocusEvent e) {
myFocusTrackback.consume();
}
};
myFocusWatcher.install(myComponent);
myShown = true;
frame.setVisible(true);
if (UIUtil.isUnderAlloyLookAndFeel() && frame instanceof JFrame) {
//please ask [kb] before remove it
((JFrame)frame).setMaximizedBounds(null);
}
}
示例4: getSelectionAlpha
import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
@Override
public short getSelectionAlpha() {
return (short)(UIUtil.isUnderAlloyLookAndFeel() && !UIUtil.isUnderAlloyIDEALookAndFeel() ? 255 : 150);
}
示例5: getGapToUse
import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
private static int getGapToUse(int gap) {
// There is a problem with flow layout controls paint under Alloy LAF - it looks like it doesn't take given gaps into consideration.
// Alloy LAF sources are closed, so we use this dirty hack here.
return UIUtil.isUnderAlloyLookAndFeel() ? gap - 4 : gap;
}