Java 类com.intellij.ui.components.panels.OpaquePanel 实例源码

项目:consulo    文件:BranchActionGroupPopup.java   
@Override
protected JComponent createItemComponent() {
  myTextLabel = new ErrorLabel();
  myTextLabel.setOpaque(true);
  myTextLabel.setBorder(JBUI.Borders.empty(1));

  myInfoLabel = new ErrorLabel();
  myInfoLabel.setOpaque(true);
  myInfoLabel.setBorder(JBUI.Borders.empty(1, DEFAULT_HGAP, 1, 1));
  myInfoLabel.setFont(FontUtil.minusOne(myInfoLabel.getFont()));

  JPanel compoundPanel = new OpaquePanel(new BorderLayout(), JBColor.WHITE);
  myIconLabel = new IconComponent();
  myInfoLabel.setHorizontalAlignment(SwingConstants.RIGHT);
  JPanel compoundTextPanel = new OpaquePanel(new BorderLayout(), compoundPanel.getBackground());
  JPanel textPanel = new OpaquePanel(new BorderLayout(), compoundPanel.getBackground());
  compoundPanel.add(myIconLabel, BorderLayout.WEST);
  textPanel.add(myTextLabel, BorderLayout.WEST);
  textPanel.add(myInfoLabel, BorderLayout.CENTER);
  compoundTextPanel.add(textPanel, BorderLayout.CENTER);
  compoundPanel.add(compoundTextPanel, BorderLayout.CENTER);
  return layoutComponent(compoundPanel);
}
项目:intellij-ce-playground    文件:GroupedItemsListRenderer.java   
protected final JComponent layoutComponent(JComponent middleItemComponent) {
  JPanel result = new OpaquePanel(Registry.is("ide.new.project.settings") ? new BorderLayout(0, 0) : new BorderLayout(4, 4), Color.white);

  myNextStepLabel = new JLabel();
  myNextStepLabel.setOpaque(true);

  result.add(middleItemComponent, BorderLayout.CENTER);
  result.add(myNextStepLabel, BorderLayout.EAST);

  result.setBorder(getDefaultItemComponentBorder());

  return result;
}
项目:tools-idea    文件:GroupedItemsListRenderer.java   
protected final JComponent layoutComponent(JComponent middleItemComponent) {
  JPanel result = new OpaquePanel(new BorderLayout(4, 4), Color.white);

  myNextStepLabel = new JLabel();
  myNextStepLabel.setOpaque(true);

  result.add(middleItemComponent, BorderLayout.CENTER);
  result.add(myNextStepLabel, BorderLayout.EAST);

  result.setBorder(getDefaultItemComponentBorder());

  return result;
}