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


Java JBCheckBox.setOpaque方法代码示例

本文整理汇总了Java中com.intellij.ui.components.JBCheckBox.setOpaque方法的典型用法代码示例。如果您正苦于以下问题:Java JBCheckBox.setOpaque方法的具体用法?Java JBCheckBox.setOpaque怎么用?Java JBCheckBox.setOpaque使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.ui.components.JBCheckBox的用法示例。


在下文中一共展示了JBCheckBox.setOpaque方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: RepositoryWithBranchPanel

import com.intellij.ui.components.JBCheckBox; //导入方法依赖的package包/类
public RepositoryWithBranchPanel(@NotNull final Project project, @NotNull String repoName,
                                 @NotNull String sourceName, @NotNull PushTargetPanel<T> destPushTargetPanelComponent) {
  super();
  setLayout(new BorderLayout());
  myRepositoryCheckbox = new JBCheckBox();
  myRepositoryCheckbox.setFocusable(false);
  myRepositoryCheckbox.setOpaque(false);
  myRepositoryCheckbox.setBorder(null);
  myRepositoryCheckbox.addActionListener(new ActionListener() {
    @Override
    public void actionPerformed(@NotNull ActionEvent e) {
      fireOnSelectionChange(myRepositoryCheckbox.isSelected());
    }
  });
  myRepositoryLabel = new JLabel(repoName);
  myLocalBranch = new JBLabel(sourceName);
  myArrowLabel = new JLabel(" " + UIUtil.rightArrow() + " ");
  myDestPushTargetPanelComponent = destPushTargetPanelComponent;
  myTextRenderer = new ColoredTreeCellRenderer() {
    public void customizeCellRenderer(@NotNull JTree tree,
                                      Object value,
                                      boolean selected,
                                      boolean expanded,
                                      boolean leaf,
                                      int row,
                                      boolean hasFocus) {

    }
  };
  myTextRenderer.setOpaque(false);
  layoutComponents();

  setInputVerifier(new InputVerifier() {
    @Override
    public boolean verify(JComponent input) {
      ValidationInfo error = myDestPushTargetPanelComponent.verify();
      if (error != null) {
        //noinspection ConstantConditions
        PopupUtil.showBalloonForComponent(error.component, error.message, MessageType.WARNING, false, project);
      }
      return error == null;
    }
  });

  JCheckBox emptyBorderCheckBox = new JCheckBox();
  emptyBorderCheckBox.setBorder(null);
  Dimension size = emptyBorderCheckBox.getPreferredSize();
  myCheckBoxWidth = size.width;
  myCheckBoxHeight = size.height;
  myLoadingIcon = LoadingIcon.create(myCheckBoxWidth, size.height);
  myCheckBoxLoadingIconGapH = myCheckBoxWidth - myLoadingIcon.getIconWidth();
  myCheckBoxLoadingIconGapV = size.height - myLoadingIcon.getIconHeight();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:54,代码来源:RepositoryWithBranchPanel.java

示例2: RepositoryWithBranchPanel

import com.intellij.ui.components.JBCheckBox; //导入方法依赖的package包/类
public RepositoryWithBranchPanel(@Nonnull final Project project, @Nonnull String repoName,
                                 @Nonnull String sourceName, @Nonnull PushTargetPanel<T> destPushTargetPanelComponent) {
  super();
  setLayout(new BorderLayout());
  myRepositoryCheckbox = new JBCheckBox();
  myRepositoryCheckbox.setFocusable(false);
  myRepositoryCheckbox.setOpaque(false);
  myRepositoryCheckbox.setBorder(null);
  myRepositoryCheckbox.addActionListener(new ActionListener() {
    @Override
    public void actionPerformed(@Nonnull ActionEvent e) {
      fireOnSelectionChange(myRepositoryCheckbox.isSelected());
    }
  });
  myRepositoryLabel = new JLabel(repoName);
  myLocalBranch = new JBLabel(sourceName);
  myArrowLabel = new JLabel(" " + UIUtil.rightArrow() + " ");
  myDestPushTargetPanelComponent = destPushTargetPanelComponent;
  myTextRenderer = new ColoredTreeCellRenderer() {
    @RequiredDispatchThread
    @Override
    public void customizeCellRenderer(@Nonnull JTree tree,
                                      Object value,
                                      boolean selected,
                                      boolean expanded,
                                      boolean leaf,
                                      int row,
                                      boolean hasFocus) {

    }
  };
  myTextRenderer.setOpaque(false);
  layoutComponents();

  setInputVerifier(new InputVerifier() {
    @Override
    public boolean verify(JComponent input) {
      ValidationInfo error = myDestPushTargetPanelComponent.verify();
      if (error != null) {
        //noinspection ConstantConditions
        PopupUtil.showBalloonForComponent(error.component, error.message, MessageType.WARNING, false, project);
      }
      return error == null;
    }
  });

  JCheckBox emptyBorderCheckBox = new JCheckBox();
  emptyBorderCheckBox.setBorder(null);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:50,代码来源:RepositoryWithBranchPanel.java


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