本文整理汇总了Java中com.intellij.ui.IdeBorderFactory.createEmptyBorder方法的典型用法代码示例。如果您正苦于以下问题:Java IdeBorderFactory.createEmptyBorder方法的具体用法?Java IdeBorderFactory.createEmptyBorder怎么用?Java IdeBorderFactory.createEmptyBorder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.ui.IdeBorderFactory
的用法示例。
在下文中一共展示了IdeBorderFactory.createEmptyBorder方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: VcsCommitInfoBalloon
import com.intellij.ui.IdeBorderFactory; //导入方法依赖的package包/类
public VcsCommitInfoBalloon(@NotNull JTree tree) {
myTree = tree;
myEditorPane = new JEditorPane(UIUtil.HTML_MIME, "");
myEditorPane.putClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES, Boolean.TRUE);
myEditorPane.setEditable(false);
myEditorPane.setBackground(HintUtil.INFORMATION_COLOR);
myEditorPane.setFont(UIUtil.getToolTipFont());
myEditorPane.setBorder(HintUtil.createHintBorder());
Border margin = IdeBorderFactory.createEmptyBorder(3, 3, 3, 3);
myEditorPane.setBorder(new CompoundBorder(myEditorPane.getBorder(), margin));
myEditorPane.addHyperlinkListener(new HyperlinkAdapter() {
@Override
protected void hyperlinkActivated(HyperlinkEvent e) {
BrowserUtil.browse(e.getURL());
}
});
myWrapper = new Wrapper(myEditorPane);
myPopupBuilder = JBPopupFactory.getInstance().createComponentPopupBuilder(myWrapper, null);
myPopupBuilder.setCancelOnClickOutside(true).setResizable(true).setMovable(true).setRequestFocus(false)
.setMinSize(new Dimension(80, 30));
}
示例2: createContentPaneBorder
import com.intellij.ui.IdeBorderFactory; //导入方法依赖的package包/类
@Nullable
@Override
protected Border createContentPaneBorder() {
return IdeBorderFactory.createEmptyBorder(0);
}
示例3: SearchFieldAction
import com.intellij.ui.IdeBorderFactory; //导入方法依赖的package包/类
public SearchFieldAction(String text) {
super("Find: ");
myField = new SearchTextField(true) {
@Override
protected boolean preprocessEventForTextField(KeyEvent e) {
if ((KeyEvent.VK_ENTER == e.getKeyCode()) || ('\n' == e.getKeyChar())) {
e.consume();
addCurrentTextToHistory();
actionPerformed(null);
}
return super.preprocessEventForTextField(e);
}
@Override
protected void onFocusLost() {
myField.addCurrentTextToHistory();
actionPerformed(null);
}
@Override
protected void onFieldCleared() {
actionPerformed(null);
}
};
Border border = myField.getBorder();
Border emptyBorder = IdeBorderFactory.createEmptyBorder(3, 0, 2, 0);
if (border instanceof CompoundBorder) {
if (!UIUtil.isUnderDarcula()) {
myField.setBorder(new CompoundBorder(emptyBorder, ((CompoundBorder)border).getInsideBorder()));
}
}
else {
myField.setBorder(emptyBorder);
}
myField.setSearchIcon(AllIcons.Actions.Filter_small);
myComponent = new JPanel();
final BoxLayout layout = new BoxLayout(myComponent, BoxLayout.X_AXIS);
myComponent.setLayout(layout);
if (text.length() > 0) {
final JLabel label = new JLabel(text);
//label.setFont(label.getFont().deriveFont(Font.ITALIC));
label.setForeground(UIUtil.isUnderDarcula() ? UIUtil.getLabelForeground() : UIUtil.getInactiveTextColor());
label.setBorder(BorderFactory.createEmptyBorder(0,3,0,0));
myComponent.add(label);
}
myComponent.add(myField);
}