本文整理汇总了Java中com.intellij.ui.SideBorder类的典型用法代码示例。如果您正苦于以下问题:Java SideBorder类的具体用法?Java SideBorder怎么用?Java SideBorder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SideBorder类属于com.intellij.ui包,在下文中一共展示了SideBorder类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initToolWindow
import com.intellij.ui.SideBorder; //导入依赖的package包/类
private void initToolWindow() {
myToolWindowPanel = new MyToolWindowPanel();
myComponentTree = new ComponentTree(myProject);
for (TreeSelectionListener listener : myPendingListeners) {
myComponentTree.addTreeSelectionListener(listener);
}
myPendingListeners.clear();
final JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myComponentTree);
scrollPane.setBorder(IdeBorderFactory.createBorder(SideBorder.BOTTOM));
scrollPane.setPreferredSize(new Dimension(250, -1));
myComponentTree.initQuickFixManager(scrollPane.getViewport());
myPropertyInspector= new PropertyInspector(myProject, myComponentTree);
myToolWindowPanel.setFirstComponent(scrollPane);
myToolWindowPanel.setSecondComponent(myPropertyInspector);
myToolWindow = ToolWindowManager.getInstance(myProject).registerToolWindow(UIDesignerBundle.message("toolwindow.ui.designer"),
myToolWindowPanel,
ToolWindowAnchor.LEFT, myProject, true);
myToolWindow.setIcon(UIDesignerIcons.ToolWindowUIDesigner);
myToolWindow.setAvailable(false, null);
}
示例2: TopBottomComponentWrapper
import com.intellij.ui.SideBorder; //导入依赖的package包/类
public TopBottomComponentWrapper(JComponent component, boolean top) {
super(new BorderLayout());
myWrappee = component;
setOpaque(false);
setBorder(new SideBorder(null, top ? SideBorder.BOTTOM : SideBorder.TOP) {
@Override
public Color getLineColor() {
Color result = EditorColorsManager.getInstance().getGlobalScheme().getColor(EditorColors.TEARLINE_COLOR);
return result == null ? JBColor.BLACK : result;
}
});
add(component);
}
示例3: setupUIComponentPresentation
import com.intellij.ui.SideBorder; //导入依赖的package包/类
@Override
public String setupUIComponentPresentation(String text,
int highlightStartOffset,
int highlightEndOffset,
boolean isDisabled,
boolean strikeout,
boolean isDisabledBeforeHighlight,
Color background) {
final String resultedText =
myPanels[i].setup(text, myEscapeFunction, highlightStartOffset, highlightEndOffset, isDisabled, strikeout, isDisabledBeforeHighlight, background);
myPanels[i].setBorder(isLastParameterOwner() ? BACKGROUND_BORDER : new SideBorder(new JBColor(JBColor.LIGHT_GRAY, Gray._90), SideBorder.BOTTOM));
return resultedText;
}
示例4: initConsoleUI
import com.intellij.ui.SideBorder; //导入依赖的package包/类
private void initConsoleUI(Process process) {
// Init console view
myConsoleView = createConsoleView();
if (myConsoleView instanceof JComponent) {
((JComponent)myConsoleView).setBorder(new SideBorder(JBColor.border(), SideBorder.LEFT));
}
myProcessHandler = createProcessHandler(process);
myConsoleExecuteActionHandler = createExecuteActionHandler();
ProcessTerminatedListener.attach(myProcessHandler);
myProcessHandler.addProcessListener(new ProcessAdapter() {
@Override
public void processTerminated(ProcessEvent event) {
finishConsole();
}
});
// Attach to process
myConsoleView.attachToProcess(myProcessHandler);
// Runner creating
createContentDescriptorAndActions();
// Run
myProcessHandler.startNotify();
}
示例5: createCenterPanel
import com.intellij.ui.SideBorder; //导入依赖的package包/类
@Override
protected JComponent createCenterPanel() {
JComponent mainPanel = myEditor.createComponent();
mainPanel.setPreferredSize(new Dimension(600, 400));
mainPanel.setBorder(IdeBorderFactory.createBorder(SideBorder.ALL));
return mainPanel;
}
示例6: createToolbar
import com.intellij.ui.SideBorder; //导入依赖的package包/类
@Override
protected JComponent createToolbar() {
JPanel panel = new JPanel(new BorderLayout());
panel.setBorder(IdeBorderFactory.createBorder(SideBorder.BOTTOM));
// Create a layout where there are three toolbars:
// +----------------------------------------------------------------------------+
// | Normal toolbar, minus dynamic actions |
// +---------------------------------------------+------------------------------+
// | Dynamic layout actions | Zoom actions and file status |
// +---------------------------------------------+------------------------------+
ActionManager actionManager = ActionManager.getInstance();
ActionToolbar actionToolbar = actionManager.createActionToolbar(TOOLBAR, getActionGroup(), true);
actionToolbar.setLayoutPolicy(ActionToolbar.WRAP_LAYOUT_POLICY);
panel.add(actionToolbar.getComponent(), BorderLayout.NORTH);
ActionToolbar layoutToolBar = actionManager.createActionToolbar(TOOLBAR, getDynamicActionGroup(), true);
layoutToolBar.setLayoutPolicy(ActionToolbar.WRAP_LAYOUT_POLICY);
// The default toolbar layout adds too much spacing between the buttons. Switch to mini mode,
// but also set a minimum size which will add *some* padding for our 16x16 icons.
layoutToolBar.setMiniMode(true);
layoutToolBar.setMinimumButtonSize(new Dimension(22, 24));
ActionToolbar zoomToolBar = actionManager.createActionToolbar(TOOLBAR, getRhsActions(), true);
JPanel bottom = new JPanel(new BorderLayout());
bottom.add(layoutToolBar.getComponent(), BorderLayout.WEST);
RenderContext context = (AndroidDesignerEditorPanel)myDesigner;
RenderOptionsMenuBuilder optionsMenuBuilder = RenderOptionsMenuBuilder.create(context);
ActionToolbar optionsToolBar = optionsMenuBuilder.addPreferXmlOption().addDeviceFrameOption().addRetinaOption().build();
JPanel combined = new JPanel(new BorderLayout());
combined.add(zoomToolBar.getComponent(), BorderLayout.WEST);
combined.add(optionsToolBar.getComponent(), BorderLayout.EAST);
bottom.add(combined, BorderLayout.EAST);
panel.add(bottom, BorderLayout.SOUTH);
return panel;
}
示例7: initContent
import com.intellij.ui.SideBorder; //导入依赖的package包/类
public void initContent() {
final ActionManager actionManager = ActionManager.getInstance();
final ActionGroup actionGroup = (ActionGroup)actionManager.getAction(TOOL_WINDOW_TOOLBAR_ID);
ActionToolbar actionToolbar = actionManager.createActionToolbar(myPlace, actionGroup, true);
JPanel toolbarControl = new JPanel(new GridBagLayout());
GridBagConstraints constraints = new GridBagConstraints();
constraints.gridwidth = GridBagConstraints.REMAINDER;
constraints.weightx = 1;
constraints.fill = GridBagConstraints.HORIZONTAL;
constraints.anchor = GridBagConstraints.WEST;
toolbarControl.add(actionToolbar.getComponent(), constraints);
for (JComponent component : getToolbarControls()) {
component.setBorder(IdeBorderFactory.createBorder(SideBorder.TOP));
toolbarControl.add(component, constraints);
}
setToolbar(toolbarControl);
final JComponent payloadControl = buildContent();
JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(payloadControl);
JScrollBar scrollBar = scrollPane.getVerticalScrollBar();
scrollBar.setUnitIncrement(scrollBar.getUnitIncrement() * 7);
myContent.add(scrollPane, CONTENT_CARD_NAME);
RichTextControlBuilder builder = new RichTextControlBuilder();
builder.setBackgroundColor(payloadControl.getBackground());
builder.setForegroundColor(UIUtil.getInactiveTextColor());
builder.setFont(payloadControl.getFont());
builder.setText(GradleBundle.message("gradle.toolwindow.text.no.linked.project"));
final JComponent noLinkedProjectControl = builder.build();
myContent.add(noLinkedProjectControl, NON_LINKED_CARD_NAME);
update();
}
示例8: DesignerToolWindow
import com.intellij.ui.SideBorder; //导入依赖的package包/类
public DesignerToolWindow(Project project) {
myComponentTree = new ComponentTree(project);
JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myComponentTree);
scrollPane.setBorder(IdeBorderFactory.createBorder(SideBorder.BOTTOM));
scrollPane.setPreferredSize(new Dimension(250, -1));
myComponentTree.initQuickFixManager(scrollPane.getViewport());
myPropertyInspector = new PropertyInspector(project, myComponentTree);
myToolWindowPanel.setFirstComponent(scrollPane);
myToolWindowPanel.setSecondComponent(myPropertyInspector);
}
示例9: createToolbar
import com.intellij.ui.SideBorder; //导入依赖的package包/类
protected JComponent createToolbar() {
ActionManager actionManager = ActionManager.getInstance();
ActionToolbar actionToolbar = actionManager.createActionToolbar(TOOLBAR, myActionGroup, true);
actionToolbar.setLayoutPolicy(ActionToolbar.WRAP_LAYOUT_POLICY);
JComponent toolbar = actionToolbar.getComponent();
toolbar.setBorder(IdeBorderFactory.createBorder(SideBorder.BOTTOM));
toolbar.setVisible(false);
return toolbar;
}
示例10: TopBottomComponentWrapper
import com.intellij.ui.SideBorder; //导入依赖的package包/类
public TopBottomComponentWrapper(JComponent component, boolean top) {
super(new BorderLayout());
setOpaque(false);
setBorder(new SideBorder(null, top ? SideBorder.BOTTOM : SideBorder.TOP, true) {
@Override
public Color getLineColor() {
Color result = EditorColorsManager.getInstance().getGlobalScheme().getColor(EditorColors.TEARLINE_COLOR);
return result == null ? Color.black : result;
}
});
add(component);
}
示例11: setupUIComponentPresentation
import com.intellij.ui.SideBorder; //导入依赖的package包/类
@Override
public void setupUIComponentPresentation(String text,
int highlightStartOffset,
int highlightEndOffset,
boolean isDisabled,
boolean strikeout,
boolean isDisabledBeforeHighlight,
Color background) {
myPanels[i].setup(text, highlightStartOffset, highlightEndOffset, isDisabled, strikeout, isDisabledBeforeHighlight, background);
myPanels[i].setBorder(isLastParameterOwner() ? BACKGROUND_BORDER : new SideBorder(new JBColor(JBColor.LIGHT_GRAY, Gray._90), SideBorder.BOTTOM));
}
示例12: DesignerToolWindow
import com.intellij.ui.SideBorder; //导入依赖的package包/类
public DesignerToolWindow(Project project, boolean updateOrientation) {
myComponentTree = new ComponentTree();
JScrollPane treeScrollPane = ScrollPaneFactory.createScrollPane(myComponentTree);
treeScrollPane.setBorder(IdeBorderFactory.createBorder(SideBorder.BOTTOM));
treeScrollPane.setPreferredSize(new Dimension(250, -1));
myComponentTree.initQuickFixManager(treeScrollPane.getViewport());
myPropertyTablePanel = new PropertyTablePanel(project);
myToolWindowPanel = new Splitter(true, 0.42f);
myToolWindowPanel.setDividerWidth(3);
myToolWindowPanel.setShowDividerControls(false);
myToolWindowPanel.setShowDividerIcon(false);
myToolWindowPanel.setFirstComponent(treeScrollPane);
myToolWindowPanel.setSecondComponent(myPropertyTablePanel);
if (updateOrientation) {
myToolWindowPanel.addComponentListener(new ComponentAdapter() {
@Override
public void componentResized(ComponentEvent e) {
Dimension size = myToolWindowPanel.getSize();
boolean newVertical = size.width < size.height;
if (myToolWindowPanel.getOrientation() != newVertical) {
myToolWindowPanel.setOrientation(newVertical);
}
}
});
}
}
示例13: createToolbar
import com.intellij.ui.SideBorder; //导入依赖的package包/类
protected JComponent createToolbar() {
ActionManager actionManager = ActionManager.getInstance();
ActionToolbar actionToolbar = actionManager.createActionToolbar(TOOLBAR, myActionGroup, true);
actionToolbar.setLayoutPolicy(ActionToolbar.WRAP_LAYOUT_POLICY);
JComponent toolbar = actionToolbar.getComponent();
toolbar.setBorder(IdeBorderFactory.createBorder(SideBorder.BOTTOM));
toolbar.setVisible(false);
return toolbar;
}
示例14: CordovaDesignerToolWindow
import com.intellij.ui.SideBorder; //导入依赖的package包/类
public CordovaDesignerToolWindow(Project project, boolean updateOrientation) {
myComponentTree = new ComponentTree();
JScrollPane treeScrollPane = ScrollPaneFactory.createScrollPane(myComponentTree);
treeScrollPane.setBorder(IdeBorderFactory.createBorder(SideBorder.BOTTOM));
treeScrollPane.setPreferredSize(new Dimension(250, -1));
myComponentTree.initQuickFixManager(treeScrollPane.getViewport());
myPropertyTablePanel = new PropertyTablePanel(project);
myToolWindowPanel = new Splitter(true, 0.42f);
myToolWindowPanel.setDividerWidth(3);
myToolWindowPanel.setShowDividerControls(false);
myToolWindowPanel.setShowDividerIcon(false);
myToolWindowPanel.setFirstComponent(treeScrollPane);
myToolWindowPanel.setSecondComponent(myPropertyTablePanel);
if (updateOrientation) {
myToolWindowPanel.addComponentListener(new ComponentAdapter() {
@Override
public void componentResized(ComponentEvent e) {
Dimension size = myToolWindowPanel.getSize();
boolean newVertical = size.width < size.height;
if (myToolWindowPanel.getOrientation() != newVertical) {
myToolWindowPanel.setOrientation(newVertical);
}
}
});
}
}
示例15: DesignerToolWindow
import com.intellij.ui.SideBorder; //导入依赖的package包/类
public DesignerToolWindow(Project project)
{
myComponentTree = new ComponentTree(project);
JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myComponentTree);
scrollPane.setBorder(IdeBorderFactory.createBorder(SideBorder.BOTTOM));
scrollPane.setPreferredSize(new Dimension(250, -1));
myComponentTree.initQuickFixManager(scrollPane.getViewport());
myPropertyInspector = new PropertyInspector(project, myComponentTree);
myToolWindowPanel.setFirstComponent(scrollPane);
myToolWindowPanel.setSecondComponent(myPropertyInspector);
}