當前位置: 首頁>>代碼示例>>Java>>正文


Java UIUtil.isUnderAlloyLookAndFeel方法代碼示例

本文整理匯總了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());
    }
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:13,代碼來源:IdeMenuBar.java

示例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);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:7,代碼來源:IdeRootPane.java

示例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);
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:75,代碼來源:FrameWrapper.java

示例4: getSelectionAlpha

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
@Override
public short getSelectionAlpha() {
  return (short)(UIUtil.isUnderAlloyLookAndFeel() && !UIUtil.isUnderAlloyIDEALookAndFeel() ? 255 : 150);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:5,代碼來源:AbstractNavBarUI.java

示例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;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:6,代碼來源:RichTextControlBuilder.java


注:本文中的com.intellij.util.ui.UIUtil.isUnderAlloyLookAndFeel方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。