@Override public boolean isOpaque() { return opaque && super.isOpaque(); }
@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; } };
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());
@Override public boolean isOpaque() { return painting ? false : super.isOpaque(); }
@Override public boolean isOpaque() { return painting ? false : super.isOpaque(); }
@Override public boolean isOpaque() { return painting ? false : super.isOpaque(); }
@Override public boolean isOpaque() { return painting ? false : super.isOpaque(); }
@Override public boolean isOpaque() { return painting ? false : super.isOpaque(); }
public boolean isOpaque() { if((delegate_==this)||(delegate_==null)) return super.isOpaque(); return delegate_.isOpaque(); }
@ScriptFunction(jsDoc = OPAQUE_TEXT_JSDOC) @Override public boolean getOpaque() { return super.isOpaque(); }
@Override public boolean isOpaque() { return opaque && super.isOpaque(); }
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());
/** * 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(); }
/** * 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(); }
/** * 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(); }
/** * 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(); }
/** * 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(); }
/** * 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(); }
/** * 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(); }
/** * 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(); } }