当前位置: 首页>>代码示例>>Java>>正文


Java Wrapper类代码示例

本文整理汇总了Java中com.intellij.ui.components.panels.Wrapper的典型用法代码示例。如果您正苦于以下问题:Java Wrapper类的具体用法?Java Wrapper怎么用?Java Wrapper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Wrapper类属于com.intellij.ui.components.panels包,在下文中一共展示了Wrapper类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: DiffPanelBase

import com.intellij.ui.components.panels.Wrapper; //导入依赖的package包/类
public DiffPanelBase(@Nullable Project project,
                     @NotNull DataProvider provider,
                     @NotNull DiffContext context) {
  super(new BorderLayout());
  myProject = project;
  myDataProvider = provider;
  myContext = context;

  myCardLayout = new CardLayout();
  myContentPanel = new JPanel(myCardLayout);

  myNotificationsPanel = new JPanel();
  myNotificationsPanel.setLayout(new BoxLayout(myNotificationsPanel, BoxLayout.Y_AXIS));

  myNorthPanel = new Wrapper();
  mySouthPanel = new Wrapper();

  add(myContentPanel, BorderLayout.CENTER);
  add(myNorthPanel, BorderLayout.NORTH);
  add(mySouthPanel, BorderLayout.SOUTH);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:DiffPanelBase.java

示例2: MyComponent

import com.intellij.ui.components.panels.Wrapper; //导入依赖的package包/类
private MyComponent(JComponent content, BalloonImpl balloon, EmptyBorder shapeBorder) {
  setOpaque(false);
  setLayout(null);
  myBalloon = balloon;

  setFocusCycleRoot(true);
  putClientProperty(Balloon.KEY, BalloonImpl.this);

  myContent = new JPanel(new BorderLayout(2, 2));
  Wrapper contentWrapper = new Wrapper(content);
  if (myTitle != null) {
    myTitleLabel = new JLabel(myTitle, SwingConstants.CENTER);
    myTitleLabel.setForeground(UIManager.getColor("List.background"));
    myTitleLabel.setBorder(new EmptyBorder(0, 4, 0, 4));
    myContent.add(myTitleLabel, BorderLayout.NORTH);
    contentWrapper.setBorder(new EmptyBorder(1, 1, 1, 1));
  }
  myContent.add(contentWrapper, BorderLayout.CENTER);
  myContent.setBorder(shapeBorder);
  myContent.setOpaque(false);

  add(myContent);


}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:BalloonImpl.java

示例3: getComponent

import com.intellij.ui.components.panels.Wrapper; //导入依赖的package包/类
@NotNull
@Override
public JComponent getComponent() {
  if (myComponent == null) {
    myComponent = new MyNonOpaquePanel();

    myFocusProxy = new Wrapper.FocusHolder();
    myFocusProxy.setOpaque(false);
    myFocusProxy.setPreferredSize(JBUI.emptySize());

    MyContentComponent contentComponent = new MyContentComponent();
    contentComponent.setContent(myUI.getComponent());
    contentComponent.setFocusCycleRoot(true);

    myComponent.add(myFocusProxy, BorderLayout.NORTH);
    myComponent.add(contentComponent, BorderLayout.CENTER);
  }
  return myComponent;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:ContentManagerImpl.java

示例4: queueShow

import com.intellij.ui.components.panels.Wrapper; //导入依赖的package包/类
private void queueShow(final JComponent c, final MouseEvent me, final boolean toCenter, int shift, int posChangeX, int posChangeY) {
  String aText = String.valueOf(c.getToolTipText(me));
  final IdeTooltip tooltip = new IdeTooltip(c, me.getPoint(), null, /*new Object()*/c, aText) {
    @Override
    protected boolean beforeShow() {
      myCurrentEvent = me;

      if (!c.isShowing()) return false;

      String text = c.getToolTipText(myCurrentEvent);
      if (text == null || text.trim().isEmpty()) return false;

      JLayeredPane layeredPane = IJSwingUtilities.findParentOfType(c, JLayeredPane.class);

      final JEditorPane pane = initPane(text, new HintHint(me).setAwtTooltip(true), layeredPane);
      final Wrapper wrapper = new Wrapper(pane);
      setTipComponent(wrapper);
      return true;
    }
  }.setToCenter(toCenter).setCalloutShift(shift).setPositionChangeShift(posChangeX, posChangeY).setLayer(Balloon.Layer.top);

  show(tooltip, false);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:IdeTooltipManager.java

示例5: VcsCommitInfoBalloon

import com.intellij.ui.components.panels.Wrapper; //导入依赖的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));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:VcsCommitInfoBalloon.java

示例6: getTargets

import com.intellij.ui.components.panels.Wrapper; //导入依赖的package包/类
@Override
public List<SwitchTarget> getTargets(boolean onlyVisible, boolean originalProvider) {
  List<SwitchTarget> result = new ArrayList<SwitchTarget>();

  result.addAll(myTabs.getTargets(true, false));
  GridImpl grid = getSelectedGrid();
  if (grid != null) {
    result.addAll(grid.getTargets(onlyVisible));
  }

  for (Wrapper wrapper : myMinimizedButtonsPlaceholder.values()) {
    if (!wrapper.isShowing()) continue;
    JComponent target = wrapper.getTargetComponent();
    if (target instanceof ActionToolbar) {
      ActionToolbar tb = (ActionToolbar)target;
      result.addAll(tb.getTargets(onlyVisible, false));
    }
  }

  return result;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:RunnerContentUi.java

示例7: MyComponent

import com.intellij.ui.components.panels.Wrapper; //导入依赖的package包/类
private MyComponent(JComponent content, BalloonImpl balloon, EmptyBorder shapeBorder) {
  setOpaque(false);
  setLayout(null);
  myBalloon = balloon;

  setFocusCycleRoot(true);
  putClientProperty(Balloon.KEY, BalloonImpl.this);

  myContent = new JPanel(new BorderLayout(2, 2));
  Wrapper contentWrapper = new Wrapper(content);
  if (myTitle != null) {
    myTitleLabel = new JLabel(myTitle, CENTER);
    myTitleLabel.setForeground(UIManager.getColor("List.background"));
    myTitleLabel.setBorder(new EmptyBorder(0, 4, 0, 4));
    myContent.add(myTitleLabel, BorderLayout.NORTH);
    contentWrapper.setBorder(new EmptyBorder(1, 1, 1, 1));
  }
  myContent.add(contentWrapper, BorderLayout.CENTER);
  myContent.setBorder(shapeBorder);
  myContent.setOpaque(false);

  add(myContent);


}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:26,代码来源:BalloonImpl.java

示例8: queueShow

import com.intellij.ui.components.panels.Wrapper; //导入依赖的package包/类
private void queueShow(final JComponent c, final MouseEvent me, final boolean toCenter, int shift, int posChangeX, int posChangeY) {
  final IdeTooltip tooltip = new IdeTooltip(c, me.getPoint(), null, new Object()) {
    @Override
    protected boolean beforeShow() {
      myCurrentEvent = me;

      if (!c.isShowing()) return false;

      String text = c.getToolTipText(myCurrentEvent);
      if (text == null || text.trim().isEmpty()) return false;

      JLayeredPane layeredPane = IJSwingUtilities.findParentOfType(c, JLayeredPane.class);

      final JEditorPane pane = initPane(text, new HintHint(me).setAwtTooltip(true), layeredPane);
      final Wrapper wrapper = new Wrapper(pane);
      setTipComponent(wrapper);
      return true;
    }
  }.setToCenter(toCenter).setCalloutShift(shift).setPositionChangeShift(posChangeX, posChangeY).setLayer(Balloon.Layer.top);

  show(tooltip, false);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:23,代码来源:IdeTooltipManager.java

示例9: applyColors

import com.intellij.ui.components.panels.Wrapper; //导入依赖的package包/类
/**
 * Apply current colors to all open Scenario Editors
 */
private static void applyColors() {
    Project[] openProjects = ProjectManager.getInstance().getOpenProjects();
    for (Project p : openProjects) {
        FileEditor[] allEditors = FileEditorManager.getInstance(p).getAllEditors();
        for (FileEditor e : allEditors) {
            //all scenario editors are wrapped by Intellij
            if (e.getName().equals("Designer") && e.getComponent() instanceof Wrapper) {
                JComponent targetComponent = ((Wrapper) e.getComponent()).getTargetComponent();
                if (targetComponent instanceof EditorPanel) {
                    ScenarioPanel scenarioPanel = ((EditorPanel) targetComponent).getScenarioPanel();
                    updateColorAdjustableTree(new Component[]{scenarioPanel});
                }
            }
        }
    }
}
 
开发者ID:PerfCake,项目名称:PerfCakeIDEA-deprecated,代码行数:20,代码来源:ColorComponents.java

示例10: DiffPanelBase

import com.intellij.ui.components.panels.Wrapper; //导入依赖的package包/类
public DiffPanelBase(@Nullable Project project,
                     @Nonnull DataProvider provider,
                     @Nonnull DiffContext context) {
  super(new BorderLayout());
  myProject = project;
  myDataProvider = provider;
  myContext = context;

  myCardLayout = new CardLayout();
  myContentPanel = new JPanel(myCardLayout);

  myNotificationsPanel = new JPanel();
  myNotificationsPanel.setLayout(new BoxLayout(myNotificationsPanel, BoxLayout.Y_AXIS));

  myNorthPanel = new Wrapper();
  mySouthPanel = new Wrapper();

  add(myContentPanel, BorderLayout.CENTER);
  add(myNorthPanel, BorderLayout.NORTH);
  add(mySouthPanel, BorderLayout.SOUTH);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:22,代码来源:DiffPanelBase.java

示例11: VcsCommitInfoBalloon

import com.intellij.ui.components.panels.Wrapper; //导入依赖的package包/类
public VcsCommitInfoBalloon(@Nonnull 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));
}
 
开发者ID:consulo,项目名称:consulo,代码行数:22,代码来源:VcsCommitInfoBalloon.java

示例12: getTargets

import com.intellij.ui.components.panels.Wrapper; //导入依赖的package包/类
@Override
public List<SwitchTarget> getTargets(boolean onlyVisible, boolean originalProvider) {
  List<SwitchTarget> result = new ArrayList<>();

  result.addAll(myTabs.getTargets(true, false));
  GridImpl grid = getSelectedGrid();
  if (grid != null) {
    result.addAll(grid.getTargets(onlyVisible));
  }

  for (Wrapper wrapper : myMinimizedButtonsPlaceholder.values()) {
    if (!wrapper.isShowing()) continue;
    JComponent target = wrapper.getTargetComponent();
    if (target instanceof ActionToolbar) {
      ActionToolbar tb = (ActionToolbar)target;
      result.addAll(tb.getTargets(onlyVisible, false));
    }
  }

  return result;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:22,代码来源:RunnerContentUi.java

示例13: MergeRequestProcessor

import com.intellij.ui.components.panels.Wrapper; //导入依赖的package包/类
public MergeRequestProcessor(@Nullable Project project, @NotNull MergeRequest request) {
  myProject = project;
  myRequest = request;

  myContext = new MyDiffContext();
  myContext.putUserData(DiffUserDataKeys.PLACE, DiffPlaces.MERGE);

  myAvailableTools = DiffManagerEx.getInstance().getMergeTools();

  myMainPanel = new MyPanel();
  myContentPanel = new Wrapper();
  myToolbarPanel = new Wrapper();
  myToolbarPanel.setFocusable(true);
  myToolbarStatusPanel = new Wrapper();

  myPanel = JBUI.Panels.simplePanel(myMainPanel);

  JPanel topPanel = JBUI.Panels.simplePanel(myToolbarPanel).addToRight(myToolbarStatusPanel);

  myMainPanel.add(topPanel, BorderLayout.NORTH);
  myMainPanel.add(myContentPanel, BorderLayout.CENTER);

  myMainPanel.setFocusTraversalPolicyProvider(true);
  myMainPanel.setFocusTraversalPolicy(new MyFocusTraversalPolicy());

  MergeTool.MergeViewer viewer;
  try {
    viewer = getFittedTool().createComponent(myContext, myRequest);
  }
  catch (Throwable e) {
    LOG.error(e);
    viewer = ErrorMergeTool.INSTANCE.createComponent(myContext, myRequest);
  }

  myViewer = viewer;
  updateBottomActions();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:38,代码来源:MergeRequestProcessor.java

示例14: buildInProcessCount

import com.intellij.ui.components.panels.Wrapper; //导入依赖的package包/类
private void buildInProcessCount() {
  removeAll();
  setLayout(new BorderLayout());

  final JPanel progressCountPanel = new JPanel(new BorderLayout(0, 0));
  progressCountPanel.setOpaque(false);
  String processWord = myOriginals.size() == 1 ? " process" : " processes";
  final LinkLabel label = new LinkLabel(myOriginals.size() + processWord + " running...", null, new LinkListener() {
    @Override
    public void linkSelected(final LinkLabel aSource, final Object aLinkData) {
      triggerPopupShowing();
    }
  });

  if (SystemInfo.isMac) label.setFont(JBUI.Fonts.label(11));

  label.setOpaque(false);

  final Wrapper labelComp = new Wrapper(label);
  labelComp.setOpaque(false);
  progressCountPanel.add(labelComp, BorderLayout.CENTER);

  //myProgressIcon.setBorder(new IdeStatusBarImpl.MacStatusBarWidgetBorder());
  progressCountPanel.add(myProgressIcon, BorderLayout.WEST);

  add(myRefreshAndInfoPanel, BorderLayout.CENTER);

  progressCountPanel.setBorder(JBUI.Borders.emptyRight(4));
  add(progressCountPanel, BorderLayout.EAST);

  revalidate();
  repaint();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:34,代码来源:InfoAndProgressPanel.java

示例15: rebuildMinimizedActions

import com.intellij.ui.components.panels.Wrapper; //导入依赖的package包/类
private boolean rebuildMinimizedActions() {
  for (Map.Entry<GridImpl, Wrapper> entry : myMinimizedButtonsPlaceholder.entrySet()) {
    Wrapper eachPlaceholder = entry.getValue();
    ActionToolbar tb = myActionManager.createActionToolbar(ActionPlaces.DEBUGGER_TOOLBAR, myMinimizedViewActions, true);
    tb.getComponent().setBorder(null);
    tb.setReservePlaceAutoPopupIcon(false);
    JComponent minimized = tb.getComponent();
    eachPlaceholder.setContent(minimized);
  }

  myTabs.getComponent().revalidate();
  myTabs.getComponent().repaint();

  return myMinimizedViewActions.getChildrenCount() > 0;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:RunnerContentUi.java


注:本文中的com.intellij.ui.components.panels.Wrapper类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。