本文整理了Java中javax.swing.AbstractButton.isOpaque()
方法的一些代码示例,展示了AbstractButton.isOpaque()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AbstractButton.isOpaque()
方法的具体详情如下:
包路径:javax.swing.AbstractButton
类名称:AbstractButton
方法名:isOpaque
暂无
代码示例来源:origin: it.tidalwave.netbeans/it-tidalwave-netbeans-lookandfeel
@Override
protected void paintButtonPressed (Graphics g, AbstractButton b)
{
if (!b.isOpaque())
{
return;
}
if (b.isContentAreaFilled())
{
Graphics2D g2D = (Graphics2D) g;
g2D.setColor(Color.BLUE);
// g2D.setColor(NimRODUtils.getColorAlfa(selectColor, 100));
RoundRectangle2D.Float button = hasButton(b);
g2D.fill(button);
}
}
代码示例来源:origin: it.tidalwave.solidblue/it-tidalwave-netbeans-lookandfeel
@Override
protected void paintButtonPressed (Graphics g, AbstractButton b)
{
if (!b.isOpaque())
{
return;
}
if (b.isContentAreaFilled())
{
Graphics2D g2D = (Graphics2D) g;
g2D.setColor(Color.BLUE);
// g2D.setColor(NimRODUtils.getColorAlfa(selectColor, 100));
RoundRectangle2D.Float button = hasButton(b);
g2D.fill(button);
}
}
代码示例来源:origin: net.sf.nimrod/nimrod-laf
public void installDefaults( AbstractButton b) {
super.installDefaults( b);
oldOpaque = b.isOpaque();
b.setOpaque( false);
icon = NimRODIconFactory.getCheckBoxIcon();
}
代码示例来源:origin: com.github.arnabk/pgslookandfeel
protected void paintButtonPressed(Graphics g, AbstractButton b) {
if (b.isOpaque() && b.isContentAreaFilled()) {
if (Boolean.TRUE.equals(b.getClientProperty("pgs.isFlat"))) {
g.setColor(getSelectColor());
g.fillRect(0, 0, b.getWidth(), b.getHeight());
} else {
PgsUtils.drawGradient(g, b, "selected");
}
}
}
代码示例来源:origin: net.sf.nimrod/nimrod-laf
public void installDefaults( AbstractButton b) {
super.installDefaults( b);
oldOpaque = b.isOpaque();
b.setOpaque( false);
icon = NimRODIconFactory.getRadioButtonIcon();
}
代码示例来源:origin: com.github.arnabk/pgslookandfeel
size.height - ins.top - ins.bottom - 2);
if (menuItem.isOpaque()) {
g.setColor(menuItem.getBackground());
g.fillRect(0, 0, size.width, size.height);
代码示例来源:origin: it.tidalwave.netbeans/it-tidalwave-netbeans-lookandfeel
@Override
protected void paintFocus (Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
{
if (!b.isFocusPainted() || !b.isOpaque())
{
return;
}
if (b.getParent() instanceof JToolBar)
{
return;
}
g.setColor(getFocusColor());
g.drawRoundRect(2, 2, b.getWidth() - 6, b.getHeight() - 6, 5, 5);
g.drawRoundRect(3, 3, b.getWidth() - 6, b.getHeight() - 6, 4, 4);
}
代码示例来源:origin: it.tidalwave.solidblue/it-tidalwave-netbeans-lookandfeel
@Override
protected void paintFocus (Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
{
if (!b.isFocusPainted() || !b.isOpaque())
{
return;
}
if (b.getParent() instanceof JToolBar)
{
return;
}
g.setColor(getFocusColor());
g.drawRoundRect(2, 2, b.getWidth() - 6, b.getHeight() - 6, 5, 5);
g.drawRoundRect(3, 3, b.getWidth() - 6, b.getHeight() - 6, 4, 4);
}
代码示例来源:origin: com.jidesoft/jide-oss
paintBackground = b.isOpaque();
代码示例来源:origin: com.github.insubstantial/substance
@Override
protected void installDefaults(AbstractButton b) {
super.installDefaults(b);
if (b.getClientProperty(SubstanceButtonUI.BORDER_ORIGINAL) == null)
b.putClientProperty(SubstanceButtonUI.BORDER_ORIGINAL, b
.getBorder());
SubstanceButtonShaper shaper = SubstanceCoreUtilities
.getButtonShaper(b);
if (b.getClientProperty(SubstanceButtonUI.BORDER_COMPUTED) == null) {
b.setBorder(shaper.getButtonBorder(b));
} else {
Border currBorder = b.getBorder();
if (!(currBorder instanceof SubstanceButtonBorder)) {
b.setBorder(shaper.getButtonBorder(b));
} else {
SubstanceButtonBorder sbCurrBorder = (SubstanceButtonBorder) currBorder;
if (shaper.getClass() != sbCurrBorder.getButtonShaperClass())
b.setBorder(shaper.getButtonBorder(b));
}
}
b.putClientProperty(SubstanceButtonUI.OPACITY_ORIGINAL, b.isOpaque());
b.setOpaque(false);
b.setRolloverEnabled(true);
LookAndFeel.installProperty(b, "iconTextGap", SubstanceSizeUtils
.getTextIconGap(SubstanceSizeUtils.getComponentFontSize(b)));
if (Boolean.TRUE.equals(b
.getClientProperty(SubstanceLookAndFeel.WINDOW_MODIFIED))) {
trackModificationFlag();
}
}
代码示例来源:origin: org.java.net.substance/substance
@Override
protected void installDefaults(AbstractButton b) {
super.installDefaults(b);
if (b.getClientProperty(SubstanceButtonUI.BORDER_ORIGINAL) == null)
b.putClientProperty(SubstanceButtonUI.BORDER_ORIGINAL, b
.getBorder());
SubstanceButtonShaper shaper = SubstanceCoreUtilities
.getButtonShaper(b);
if (b.getClientProperty(SubstanceButtonUI.BORDER_COMPUTED) == null) {
b.setBorder(shaper.getButtonBorder(b));
} else {
Border currBorder = b.getBorder();
if (!(currBorder instanceof SubstanceButtonBorder)) {
b.setBorder(shaper.getButtonBorder(b));
} else {
SubstanceButtonBorder sbCurrBorder = (SubstanceButtonBorder) currBorder;
if (shaper.getClass() != sbCurrBorder.getButtonShaperClass())
b.setBorder(shaper.getButtonBorder(b));
}
}
b.putClientProperty(SubstanceButtonUI.OPACITY_ORIGINAL, b.isOpaque());
b.setOpaque(false);
b.setRolloverEnabled(true);
LookAndFeel.installProperty(b, "iconTextGap", SubstanceSizeUtils
.getTextIconGap(SubstanceSizeUtils.getComponentFontSize(b)));
if (Boolean.TRUE.equals(b
.getClientProperty(SubstanceLookAndFeel.WINDOW_MODIFIED))) {
trackModificationFlag();
}
}
代码示例来源:origin: com.github.insubstantial/substance
@Override
public void installDefaults(AbstractButton b) {
super.installDefaults(b);
if (b.getClientProperty(SubstanceButtonUI.BORDER_ORIGINAL) == null)
b.putClientProperty(SubstanceButtonUI.BORDER_ORIGINAL, b
.getBorder());
if (b.getClientProperty(SubstanceButtonUI.BORDER_ORIGINAL) == null)
b.putClientProperty(SubstanceButtonUI.BORDER_ORIGINAL, b
.getBorder());
SubstanceButtonShaper shaper = SubstanceCoreUtilities
.getButtonShaper(b);
if (b.getClientProperty(SubstanceButtonUI.BORDER_COMPUTED) == null) {
b.setBorder(shaper.getButtonBorder(b));
} else {
Border currBorder = b.getBorder();
if (!(currBorder instanceof SubstanceButtonBorder)) {
b.setBorder(shaper.getButtonBorder(b));
} else {
SubstanceButtonBorder sbCurrBorder = (SubstanceButtonBorder) currBorder;
if (shaper.getClass() != sbCurrBorder.getButtonShaperClass())
b.setBorder(shaper.getButtonBorder(b));
}
}
b.putClientProperty(SubstanceButtonUI.OPACITY_ORIGINAL, b.isOpaque());
// fix for defect 140
b.setOpaque(false);
b.setRolloverEnabled(true);
LookAndFeel.installProperty(b, "iconTextGap", SubstanceSizeUtils
.getTextIconGap(SubstanceSizeUtils.getComponentFontSize(b)));
}
代码示例来源:origin: org.java.net.substance/substance
@Override
public void installDefaults(AbstractButton b) {
super.installDefaults(b);
if (b.getClientProperty(SubstanceButtonUI.BORDER_ORIGINAL) == null)
b.putClientProperty(SubstanceButtonUI.BORDER_ORIGINAL, b
.getBorder());
if (b.getClientProperty(SubstanceButtonUI.BORDER_ORIGINAL) == null)
b.putClientProperty(SubstanceButtonUI.BORDER_ORIGINAL, b
.getBorder());
SubstanceButtonShaper shaper = SubstanceCoreUtilities
.getButtonShaper(b);
if (b.getClientProperty(SubstanceButtonUI.BORDER_COMPUTED) == null) {
b.setBorder(shaper.getButtonBorder(b));
} else {
Border currBorder = b.getBorder();
if (!(currBorder instanceof SubstanceButtonBorder)) {
b.setBorder(shaper.getButtonBorder(b));
} else {
SubstanceButtonBorder sbCurrBorder = (SubstanceButtonBorder) currBorder;
if (shaper.getClass() != sbCurrBorder.getButtonShaperClass())
b.setBorder(shaper.getButtonBorder(b));
}
}
b.putClientProperty(SubstanceButtonUI.OPACITY_ORIGINAL, b.isOpaque());
// fix for defect 140
b.setOpaque(false);
b.setRolloverEnabled(true);
LookAndFeel.installProperty(b, "iconTextGap", SubstanceSizeUtils
.getTextIconGap(SubstanceSizeUtils.getComponentFontSize(b)));
}
内容来源于网络,如有侵权,请联系作者删除!