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 Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { JTextField l = ((TreeFromFile) value).getLabel(); l.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); l.setOpaque(true); if(cellHasFocus || isSelected) { l.setBackground(highlightColor); } else { l.setBackground(Color.WHITE); } return l; }
private void initGeneratePanel(PsiFile file) { generateClassTF.setBackground(errorLB.getBackground()); currentClass = ((PsiJavaFileImpl) file).getPackageName() + "." + file.getName().split("\\.")[0]; generateClassLB.setText(currentClass);
rTextArea.setCaretPosition(forward ? 0 : rTextArea.getDocument().getLength() - 1); search(direction); searchField.setBackground(COLOR_BG_WARN); return; searchField.setBackground(COLOR_BG_ERROR); } else { searchField.setBackground(COLOR_BG_NORMAL);
txtField.setBackground(Color.white); input.add(txtField);
setBackground(ColorScheme.DARK_GRAY_COLOR); input.setBackground(ColorScheme.DARKER_GRAY_COLOR); input.setPreferredSize(new Dimension(35, 30)); input.setBorder(new EmptyBorder(5, 5, 5, 5));
/** * Adds the given tree to the display without removing already * displayed trees * @param match tree to be added */ private void addMatch(TreeFromFile match, List<Tree> matchedParts) { JPanel treeDisplay = new JPanel(new BorderLayout()); JTextField filename = new JTextField("From file: " + match.getFilename()); filename.setEditable(false); MouseInputAdapter listener = new FilenameMouseInputAdapter(filename); filename.addMouseListener(listener); filename.addMouseMotionListener(listener); treeDisplay.add(filename, BorderLayout.NORTH); if(TregexGUI.getInstance().isTdiffEnabled()) { tjp = getTreeJPanel(match.getDiffDecoratedTree(), matchedParts); tjp.setDiffConstituents(match.getDiffConstituents()); } else { tjp = getTreeJPanel(match.getTree(), matchedParts); } matchedPartCoordinates = tjp.getMatchedPartCoordinates(); matchedPartCoordinateIdx = -1; treeDisplay.add(tjp, BorderLayout.CENTER); filename.setOpaque(true); filename.setBackground(tjp.getBackground()); filename.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); scroller.setViewportView(treeDisplay); this.revalidate(); this.repaint(); }
hexInput.setBackground(ColorScheme.DARKER_GRAY_COLOR);
saveMsgField.setBackground(bg);
textIP.setBackground(new Color(100, 255, 170)); textOSCPort.setBackground(new Color(100, 255, 170)); textSerialPort.setBackground(new Color(100, 255, 170));
hexField.setForeground(Theme.TEXT_NORMAL_COLOR); hexField.setHorizontalAlignment(JTextField.CENTER); hexField.setBackground(null); hexPanel.add(hexField); hexField.setBounds(0, 10, 110, 22);
@Override public void focusLost(FocusEvent e) { svgPath.setBackground(JBColor.WHITE); } });
@Override public void focusLost(FocusEvent e) { xmlName.setBackground(JBColor.WHITE); } });
@Override public void insertUpdate(DocumentEvent e) { textField.setBackground(editingColor); deleyedSwingInvoke.performAction(); }
protected void toggleSearchField(JTextField textToFindField, boolean matchFound) { if(!matchFound) { textToFindField.setBackground(LIGHT_RED); textToFindField.setForeground(Color.WHITE); } else { textToFindField.setBackground(Color.WHITE); textToFindField.setForeground(Color.BLACK); } }
@Override public void windowClosing(WindowEvent e) { g.resetSearch(owner); searchText.setText(null); searchText.setBackground(COLOR_NORMAL); } });
@Override public void actionPerformed(ActionEvent e) { if (!g.search(owner, searchText.getText())) { searchText.setBackground(COLOR_NO_RESULT); timer.restart(); } } };
/** Creates new form PackagingAddingFilesProgressPanel */ public PackagingAddingFilesProgressPanel(JButton stopButton) { this.stopButton = stopButton; initComponents(); progressBar.setIndeterminate(true); fileTextField.setBackground(getBackground()); }
@Override public void setBackground(Color color) { if(renderer == null) super.setBackground(color); else { renderer.setBackground(color); textField.setBackground(color); } }
JComboBox cb = ...; ... cb.setEditable(true); ComboBoxEditor editor = cb.getEditor() JTextField etf = (JTextField)etf.getEditorComponent() etf.setDisabledTextColor(UIManager.getColor("ComboBox.foreground")); etf.setBackground(UIManager.getColor("ComboBox.background")); // editor.setItem(format(obj)); cb.setEnabled(false);