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


Java DarculaTextBorder類代碼示例

本文整理匯總了Java中com.intellij.ide.ui.laf.darcula.ui.DarculaTextBorder的典型用法代碼示例。如果您正苦於以下問題:Java DarculaTextBorder類的具體用法?Java DarculaTextBorder怎麽用?Java DarculaTextBorder使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


DarculaTextBorder類屬於com.intellij.ide.ui.laf.darcula.ui包,在下文中一共展示了DarculaTextBorder類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: MySearchTextField

import com.intellij.ide.ui.laf.darcula.ui.DarculaTextBorder; //導入依賴的package包/類
public MySearchTextField() {
  super(false);
  JTextField editor = getTextEditor();
  editor.setOpaque(false);
  if (SystemInfo.isMac && UIUtil.isUnderIntelliJLaF()) {
    editor.setUI((MacIntelliJTextFieldUI)MacIntelliJTextFieldUI.createUI(editor));
    editor.setBorder(new MacIntelliJTextBorder());
  } else {
    editor.setUI((DarculaTextFieldUI)DarculaTextFieldUI.createUI(editor));
    editor.setBorder(new DarculaTextBorder());
  }

  editor.putClientProperty("JTextField.Search.noBorderRing", Boolean.TRUE);
  if (UIUtil.isUnderDarcula()) {
    editor.setBackground(Gray._45);
    editor.setForeground(Gray._240);
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:19,代碼來源:SearchEverywhereAction.java

示例2: showErrorBorder

import com.intellij.ide.ui.laf.darcula.ui.DarculaTextBorder; //導入依賴的package包/類
/**
 * 顯示JTextField是否為紅色邊框
 */
protected void showErrorBorder(JTextField field, boolean show) {
    if (show) {
        field.setBorder(BorderFactory.createLineBorder(JBColor.RED));
    } else {
        field.setBorder(new DarculaTextBorder());
    }
}
 
開發者ID:hykes,項目名稱:CodeGen,代碼行數:11,代碼來源:BaseTemplateAction.java

示例3: SettingsSearch

import com.intellij.ide.ui.laf.darcula.ui.DarculaTextBorder; //導入依賴的package包/類
SettingsSearch() {
  super(false);
  addKeyListener(new KeyAdapter() {
  });
  if (Registry.is("ide.new.settings.dialog")) {
    if (!SystemInfo.isMac) {
      JTextField editor = getTextEditor();
      editor.putClientProperty("JTextField.variant", "search");
      if (!(editor.getUI() instanceof DarculaTextFieldUI)) {
        editor.setUI((DarculaTextFieldUI)DarculaTextFieldUI.createUI(editor));
        editor.setBorder(new DarculaTextBorder());
      }
    }
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:16,代碼來源:SettingsSearch.java

示例4: MyTextField

import com.intellij.ide.ui.laf.darcula.ui.DarculaTextBorder; //導入依賴的package包/類
private MyTextField() {
  super(40);
  if (!UIUtil.isUnderGTKLookAndFeel()) {
    if (SystemInfo.isMac && UIUtil.isUnderIntelliJLaF()) {
      if (!(getUI() instanceof MacIntelliJTextFieldUI)) {
        setUI(MacIntelliJTextFieldUI.createUI(this));
      }
      setBorder(new MacIntelliJTextBorder());
    } else {
      if (!(getUI() instanceof DarculaTextFieldUI)) {
        setUI(DarculaTextFieldUI.createUI(this));
      }
      setBorder(new DarculaTextBorder());
    }
  }
  enableEvents(AWTEvent.KEY_EVENT_MASK);
  myCompletionKeyStroke = getShortcut(IdeActions.ACTION_CODE_COMPLETION);
  forwardStroke = getShortcut(IdeActions.ACTION_GOTO_FORWARD);
  backStroke = getShortcut(IdeActions.ACTION_GOTO_BACK);
  setFocusTraversalKeysEnabled(false);
  putClientProperty("JTextField.variant", "search");
  setDocument(new PlainDocument() {
    @Override
    public void insertString(int offs, String str, AttributeSet a) throws BadLocationException {
      super.insertString(offs, str, a);
      if (str != null && str.length() > 1) {
        handlePaste(str);
      }
    }
  });
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:32,代碼來源:ChooseByNameBase.java


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