@Override public void setForeground(Color color) { undimmedForeground = color; dimmedForeground = color.darker(); super.setForeground(color); }
private void uiStyle () { contentPane.setBackground(new Color(36, 36, 36)); topPanel.setBackground(new Color(36, 36, 36)); topPanel.setForeground(new Color(255, 255, 255)); table.setBackground(new Color(46, 46, 46)); table.setForeground(new Color(255, 255, 255)); bottomPanel.setBackground(new Color(36, 36, 36)); bottomPanel.setForeground(new Color(255, 255, 255)); buttonPanel.setBackground(new Color(36, 36, 36)); buttonPanel.setForeground(new Color(255, 255, 255)); scrollPane.setBorder(BorderFactory.createEmptyBorder()); scrollPane.setBackground(new Color(36, 36, 36)); scrollPane.getViewport().setBackground(new Color(36, 36, 36)); warningNotice.setForeground(new Color(255, 20, 20)); warningNotice2.setForeground(new Color(255, 20, 20)); }
/** * Dimming sets all parts of this component with darker colors except for the central label * This is useful for showing that progress is paused * Setting dim to false will restore the original colors from before the component was dimmed. * @param dimmed */ public void setDimmed(boolean dimmed) { this.dimmed = dimmed; if (dimmed) { super.setBackground(dimmedBackground); super.setForeground(dimmedForeground); } else { super.setBackground(undimmedBackground); super.setForeground(undimmedForeground); } } }
private void uiStyle () { content.setBackground(new Color(36, 36, 36)); content.setForeground(new Color(255, 255, 255)); bottomPanel.setBackground(new Color(36, 36, 36)); bottomPanel.setForeground(new Color(255, 255, 255)); buttonPanel.setBackground(new Color(36, 36, 36)); buttonPanel.setForeground(new Color(255, 255, 255)); linkText.setForeground(new Color(20, 150, 20)); contentPane.setBackground(new Color(36, 36, 36)); Border line = BorderFactory.createLineBorder(new Color(80, 80, 80)); Border empty = new EmptyBorder(4, 4, 4, 4); CompoundBorder border = new CompoundBorder(line, empty); mavenTextField.setBorder(border); mavenTextField.setCaretColor(new Color(255, 255, 255)); mavenTextField.setBackground(new Color(46, 46, 46)); mavenTextField.setForeground(new Color(255, 255, 255)); }
@Override public void setForeground(Color color) { super.setForeground(color); setBackground(color.darker()); }
treeContainer.setForeground(new java.awt.Color(0, 0, 0)); treeContainer.setPreferredSize(new java.awt.Dimension(200, 200)); treePanel = new TreeJPanel();
@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.setForeground(CardRendererUtils.copyColor(baseComp.getForeground())); renderPanel.setBackground(CardRendererUtils.copyColor(baseComp.getBackground())); renderPanel.setBorder(baseComp.getBorder());
private void applyUIStyle() { JXMonthView monthView = getMonthView(); monthView.setMonthStringBackground(backgroundColor); monthView.setMonthStringForeground(monthForegroundColor); monthView.setSelectionBackground(selectionBackgroundColor); monthView.setSelectionForeground(selectionForegroundColor); monthView.setDaysOfTheWeekForeground(dayOfTheWeekForegroundColor); monthView.setBackground(backgroundColor); monthView.setForeground(foregroundColor); monthView.setTodayBackground(todayBackgroundColor); getLinkPanel().setBackground(backgroundColor); getLinkPanel().setForeground(foregroundColor); } }
/** * Overrides <code>JComponent.setForeground</code> to assign * the unselected-foreground color to the specified color. * * @param c set the foreground color to this value */ @Override public void setForeground(Color c) { super.setForeground(c); unselectedForeground = c; }
@Override public void configurarCores() { abaContainer.setBackground(ColorController.COR_CONSOLE); abaContainer.setForeground(ColorController.COR_LETRA); cabecalhosContainer.setBackground(ColorController.COR_PRINCIPAL); cabecalhosContainer.setForeground(ColorController.COR_LETRA); espacador.setBackground(ColorController.COR_PRINCIPAL); espacador.setForeground(ColorController.COR_LETRA); } /**
@Override public void setForeground(Color value) { super.setForeground(value); if (jCheckBox1 != null) { jCheckBox1.setForeground(value); } }
private void clearAttribute() { super.setFont(null); super.setBackground(null); super.setForeground(null); }
@ScriptFunction @Override public void setForeground(Color aValue) { super.setForeground(aValue); }
@ScriptFunction @Override public void setForeground(Color aValue) { super.setForeground(aValue); }
JLabel label= new JLabel( "hello" ); label.setForeground( null ); label.setFont( null ); JTextField textField = new JTextField(10); textField.setForeground( null ); textField.setFont( null ); JPanel panel = new JPanel(); panel.setForeground( Color.RED ); panel.setFont( new Font("monospaced", Font.PLAIN, 24) ); panel.add( label ); panel.add( textField );
@Override public void configurarCores() { getEspacador().setBackground(ColorController.FUNDO_ESCURO); getEspacador().setForeground(ColorController.COR_LETRA); getEspacador().setPreferredSize(new Dimension(130, 30)); }
@ScriptFunction @Override public void setForeground(Color aValue) { super.setForeground(aValue); applyForeground(); }
public void setForeground(Color col) { super.setForeground(col); Component[] c = getComponents(); for (int i = 0; i < c.length; i++) { c[i].setForeground(col); } }
public void setForeground(Color col) { super.setForeground(col); Component[] c = getComponents(); for (int i=0; i < c.length; i++) { c[i].setForeground(col); } }