本文整理了Java中javax.swing.JLabel.isOpaque()
方法的一些代码示例,展示了JLabel.isOpaque()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JLabel.isOpaque()
方法的具体详情如下:
包路径:javax.swing.JLabel
类名称:JLabel
方法名:isOpaque
暂无
代码示例来源:origin: haraldk/TwelveMonkeys
@Override
public boolean isOpaque() {
return opaque && super.isOpaque();
}
代码示例来源:origin: magefree/mage
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
// get table text cell settings
DefaultTableCellRenderer baseRenderer = (DefaultTableCellRenderer) table.getDefaultRenderer(String.class);
JLabel baseComp = (JLabel) baseRenderer.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
String skillCode = baseComp.getText();
// apply settings to render panel from parent
renderPanel.setOpaque(baseComp.isOpaque());
renderPanel.setForeground(CardRendererUtils.copyColor(baseComp.getForeground()));
renderPanel.setBackground(CardRendererUtils.copyColor(baseComp.getBackground()));
renderPanel.setBorder(baseComp.getBorder());
// create each skill symbol as child label
renderPanel.removeAll();
renderPanel.setLayout(new BoxLayout(renderPanel, BoxLayout.X_AXIS));
for (char skillSymbol : skillCode.toCharArray()) {
JLabel symbolLabel = new JLabel();
symbolLabel.setBorder(new EmptyBorder(0, 3, 0, 0));
symbolLabel.setIcon(skillIcon);
renderPanel.add(symbolLabel);
}
return renderPanel;
}
};
代码示例来源:origin: magefree/mage
renderPanel.setOpaque(baseComp.isOpaque());
renderPanel.setForeground(CardRendererUtils.copyColor(baseComp.getForeground()));
renderPanel.setBackground(CardRendererUtils.copyColor(baseComp.getBackground()));
symbolLabel.setOpaque(baseComp.isOpaque());
symbolLabel.setForeground(baseComp.getForeground());
symbolLabel.setBackground(baseComp.getBackground());
代码示例来源:origin: com.haulmont.thirdparty/swingx-core
@Override
public boolean isOpaque() {
return painting ? false : super.isOpaque();
}
代码示例来源:origin: org.bidib.jbidib.swinglabs.swingx/swingx-core
@Override
public boolean isOpaque() {
return painting ? false : super.isOpaque();
}
代码示例来源:origin: org.swinglabs.swingx/swingx-all
@Override
public boolean isOpaque() {
return painting ? false : super.isOpaque();
}
代码示例来源:origin: org.swinglabs.swingx/swingx-core
@Override
public boolean isOpaque() {
return painting ? false : super.isOpaque();
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-desktop
@Override
public boolean isOpaque() {
return painting ? false : super.isOpaque();
}
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu
public boolean isOpaque()
{
if((delegate_==this)||(delegate_==null))
return super.isOpaque();
return delegate_.isOpaque();
}
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@ScriptFunction(jsDoc = OPAQUE_TEXT_JSDOC)
@Override
public boolean getOpaque() {
return super.isOpaque();
}
代码示例来源:origin: com.twelvemonkeys.servlet/servlet
@Override
public boolean isOpaque() {
return opaque && super.isOpaque();
}
代码示例来源:origin: stackoverflow.com
JTextArea ta = new JTextArea(text);
ta.setEditable(false);
ta.setLineWrap(true);
ta.setWrapStyleWord(true);
JLabel lb = new JLabel();
Font f = lb.getFont();
ta.setFont(f.deriveFont(f.getSize2D() * 0.9f));
ta.setBorder(lb.getBorder());
ta.setBackground(new Color(lb.getBackground().getRGB(), true));
ta.setForeground(new Color(lb.getForeground().getRGB(), true));
ta.setOpaque(lb.isOpaque());
代码示例来源:origin: org.codehaus.jtstand/jtstand-desktop
/**
* Overridden for performance reasons.<p>
* PENDING: Think about Painters and opaqueness?
*
*/
@Override
public boolean isOpaque() {
Color back = getBackground();
Component p = getParent();
if (p != null) {
p = p.getParent();
}
// p should now be the JTable.
boolean colorMatch = (back != null) && (p != null) &&
back.equals(p.getBackground()) &&
p.isOpaque();
return !colorMatch && super.isOpaque();
}
代码示例来源:origin: jrtom/jung
/**
* Overridden for performance reasons. See the <a href="#override">Implementation Note</a> for
* more information.
*/
@Override
public boolean isOpaque() {
Color back = getBackground();
Component p = getParent();
if (p != null) {
p = p.getParent();
}
boolean colorMatch =
(back != null) && (p != null) && back.equals(p.getBackground()) && p.isOpaque();
return !colorMatch && super.isOpaque();
}
代码示例来源:origin: net.sf.jung/jung-visualization
/**
* Overridden for performance reasons.
* See the <a href="#override">Implementation Note</a>
* for more information.
*/
@Override
public boolean isOpaque() {
Color back = getBackground();
Component p = getParent();
if (p != null) {
p = p.getParent();
}
boolean colorMatch = (back != null) && (p != null) &&
back.equals(p.getBackground()) &&
p.isOpaque();
return !colorMatch && super.isOpaque();
}
代码示例来源:origin: net.sf.jung/jung-visualization
/**
* Overridden for performance reasons.
* See the <a href="#override">Implementation Note</a>
* for more information.
*/
@Override
public boolean isOpaque() {
Color back = getBackground();
Component p = getParent();
if (p != null) {
p = p.getParent();
}
boolean colorMatch = (back != null) && (p != null) &&
back.equals(p.getBackground()) &&
p.isOpaque();
return !colorMatch && super.isOpaque();
}
代码示例来源:origin: jrtom/jung
/**
* Overridden for performance reasons. See the <a href="#override">Implementation Note</a> for
* more information.
*/
@Override
public boolean isOpaque() {
Color back = getBackground();
Component p = getParent();
if (p != null) {
p = p.getParent();
}
boolean colorMatch =
(back != null) && (p != null) && back.equals(p.getBackground()) && p.isOpaque();
return !colorMatch && super.isOpaque();
}
代码示例来源:origin: jrtom/jung
/**
* Overridden for performance reasons. See the <a href="#override">Implementation Note</a> for
* more information.
*/
@Override
public boolean isOpaque() {
Color back = getBackground();
Component p = getParent();
if (p != null) {
p = p.getParent();
}
boolean colorMatch =
(back != null) && (p != null) && back.equals(p.getBackground()) && p.isOpaque();
return !colorMatch && super.isOpaque();
}
代码示例来源:origin: net.sf.jung/jung-visualization
/**
* Overridden for performance reasons.
* See the <a href="#override">Implementation Note</a>
* for more information.
*/
@Override
public boolean isOpaque() {
Color back = getBackground();
Component p = getParent();
if (p != null) {
p = p.getParent();
}
boolean colorMatch =
(back != null) && (p != null)
&& back.equals(p.getBackground()) && p.isOpaque();
return !colorMatch && super.isOpaque();
}
代码示例来源:origin: jewes/gchisto
/**
* It creates a new status label manager instance.
*
* @param statusLabel The label to be managed.
*/
public StatusLabelManager(JLabel statusLabel) {
ArgumentChecking.notNull(statusLabel, "statusLabel");
this.statusLabel = statusLabel;
this.originalText = statusLabel.getText();
this.originalIsOpaque = statusLabel.isOpaque();
this.originalFGColor = statusLabel.getForeground();
this.originalBGColor = statusLabel.getBackground();
updateTimeStamp();
new Thread(new Deamon(this)).start();
}
}
内容来源于网络,如有侵权,请联系作者删除!