本文整理汇总了Java中com.intellij.ui.SideBorder类的典型用法代码示例。如果您正苦于以下问题:Java SideBorder类的具体用法?Java SideBorder怎么用?Java SideBorder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SideBorder类属于com.intellij.ui包,在下文中一共展示了SideBorder类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:21,代码来源:UIDesignerToolWindowManager.java
示例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);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:EditorComposite.java
示例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;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:ParameterInfoComponent.java
示例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();
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:AbstractConsoleRunnerWithHistory.java
示例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;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:PythonPathDialog.java
示例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;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:41,代码来源:AndroidDesignerActionPanel.java
示例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();
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:32,代码来源:GradleToolWindowPanel.java
示例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);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:DesignerToolWindow.java
示例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;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:DesignerActionPanel.java
示例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);
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:15,代码来源:EditorComposite.java
示例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));
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:12,代码来源:ParameterInfoComponent.java
示例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);
}
}
});
}
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:30,代码来源:DesignerToolWindow.java
示例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;
}
开发者ID:chrimm,项目名称:cordovastudio,代码行数:12,代码来源:CordovaDesignerActionPanel.java
示例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);
}
}
});
}
}
开发者ID:chrimm,项目名称:cordovastudio,代码行数:30,代码来源:CordovaDesignerToolWindow.java
示例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);
}
开发者ID:consulo,项目名称:consulo-ui-designer,代码行数:15,代码来源:DesignerToolWindow.java
示例16: createTopBottomSideBorder
import com.intellij.ui.SideBorder; //导入依赖的package包/类
@Nonnull
private static SideBorder createTopBottomSideBorder(boolean top) {
return 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;
}
};
}
开发者ID:consulo,项目名称:consulo,代码行数:11,代码来源:EditorComposite.java
示例17: initAndRun
import com.intellij.ui.SideBorder; //导入依赖的package包/类
/**
* Launch process, setup history, actions etc.
*
* @throws ExecutionException
*/
public void initAndRun() throws ExecutionException {
// Create Server process
final Process process = createProcess();
UIUtil.invokeLaterIfNeeded(() -> {
// 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();
});
}
开发者ID:consulo,项目名称:consulo,代码行数:38,代码来源:AbstractConsoleRunnerWithHistory.java
示例18: ThreadDumpPanel
import com.intellij.ui.SideBorder; //导入依赖的package包/类
public ThreadDumpPanel(Project project, final ConsoleView consoleView, final DefaultActionGroup toolbarActions, final List<ThreadState> threadDump) {
super(new BorderLayout());
final ThreadState[] data = threadDump.toArray(new ThreadState[threadDump.size()]);
DefaultListModel model = new DefaultListModel();
for (ThreadState threadState : data) {
model.addElement(threadState);
}
myThreadList = new JBList(model);
myThreadList.setCellRenderer(new ThreadListCellRenderer());
myThreadList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
myThreadList.addListSelectionListener(new ListSelectionListener() {
public void valueChanged(final ListSelectionEvent e) {
int index = myThreadList.getSelectedIndex();
if (index >= 0) {
ThreadState selection = (ThreadState)myThreadList.getModel().getElementAt(index);
AnalyzeStacktraceUtil.printStacktrace(consoleView, selection.getStackTrace());
}
else {
AnalyzeStacktraceUtil.printStacktrace(consoleView, "");
}
myThreadList.repaint();
}
});
toolbarActions.add(new CopyToClipboardAction(threadDump, project));
toolbarActions.add(new SortThreadsAction());
//toolbarActions.add(new ShowRecentlyChanged());
add(ActionManager.getInstance().createActionToolbar(ActionPlaces.UNKNOWN, toolbarActions, false).getComponent(), BorderLayout.WEST);
final Splitter splitter = new Splitter(false, 0.3f);
splitter.setFirstComponent(ScrollPaneFactory.createScrollPane(myThreadList, SideBorder.LEFT | SideBorder.RIGHT));
splitter.setSecondComponent(consoleView.getComponent());
add(splitter, BorderLayout.CENTER);
new ListSpeedSearch(myThreadList).setComparator(new SpeedSearchComparator(false, true));
}
开发者ID:consulo,项目名称:consulo-java,代码行数:37,代码来源:ThreadDumpPanel.java
示例19: NewErrorTreeViewPanel
import com.intellij.ui.SideBorder; //导入依赖的package包/类
public NewErrorTreeViewPanel(Project project, String helpId, boolean createExitAction, boolean createToolbar, @Nullable Runnable rerunAction) {
myProject = project;
myHelpId = helpId;
myCreateExitAction = createExitAction;
myConfiguration = ErrorTreeViewConfiguration.getInstance(project);
setLayout(new BorderLayout());
myAutoScrollToSourceHandler = new AutoScrollToSourceHandler() {
@Override
protected boolean isAutoScrollMode() {
return myConfiguration.isAutoscrollToSource();
}
@Override
protected void setAutoScrollMode(boolean state) {
myConfiguration.setAutoscrollToSource(state);
}
};
myMessagePanel = new JPanel(new BorderLayout());
myErrorViewStructure = new ErrorViewStructure(project, canHideWarnings());
DefaultMutableTreeNode root = new DefaultMutableTreeNode();
root.setUserObject(myErrorViewStructure.createDescriptor(myErrorViewStructure.getRootElement(), null));
final DefaultTreeModel treeModel = new DefaultTreeModel(root);
myTree = new Tree(treeModel) {
@Override
public void setRowHeight(int i) {
super.setRowHeight(0);
// this is needed in order to make UI calculate the height for each particular row
}
};
myBuilder = new ErrorViewTreeBuilder(myTree, treeModel, myErrorViewStructure);
myExporterToTextFile = new ErrorViewTextExporter(myErrorViewStructure);
myOccurrenceNavigatorSupport = new MyOccurrenceNavigatorSupport(myTree);
myAutoScrollToSourceHandler.install(myTree);
TreeUtil.installActions(myTree);
UIUtil.setLineStyleAngled(myTree);
myTree.setRootVisible(false);
myTree.setShowsRootHandles(true);
myTree.setLargeModel(true);
JScrollPane scrollPane = NewErrorTreeRenderer.install(myTree);
scrollPane.setBorder(IdeBorderFactory.createBorder(SideBorder.LEFT));
myMessagePanel.add(scrollPane, BorderLayout.CENTER);
if (createToolbar) {
add(createToolbarPanel(rerunAction), BorderLayout.WEST);
}
add(myMessagePanel, BorderLayout.CENTER);
myTree.addKeyListener(new KeyAdapter() {
@Override
public void keyPressed(KeyEvent e) {
if (e.getKeyCode() == KeyEvent.VK_ENTER) {
navigateToSource(false);
}
}
});
myTree.addMouseListener(new PopupHandler() {
@Override
public void invokePopup(Component comp, int x, int y) {
popupInvoked(comp, x, y);
}
});
EditSourceOnDoubleClickHandler.install(myTree);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:73,代码来源:NewErrorTreeViewPanel.java
示例20: setChangeDetailsPanel
import com.intellij.ui.SideBorder; //导入依赖的package包/类
private void setChangeDetailsPanel(@Nullable final JComponent component) {
mySplitter.setSecondComponent(component);
mySplitter.getFirstComponent().setBorder(component == null ? null : IdeBorderFactory.createBorder(SideBorder.RIGHT));
mySplitter.revalidate();
mySplitter.repaint();
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:ChangesViewManager.java
注:本文中的com.intellij.ui.SideBorder类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论