本文整理汇总了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();
}
示例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);
}