rows.setBackground(textColor); rows.setCellRenderer(new ImageRenderer()); rows.ensureIndexIsVisible(rows.getModel().getSize());
/** * Set the background color for this component and the list * * @param c the background color to use */ @Override public void setBackground(Color c) { super.setBackground(c); if (m_List != null) { m_List.setBackground(c); } }
/** * Set the background color for this component and the list * * @param c the background color to use */ @Override public void setBackground(Color c) { super.setBackground(c); if (m_List != null) { m_List.setBackground(c); } }
/******************************************************************************************************************* * ******************************************************************************************************************/ @Override public void setBackground (final @Nonnull Color color) { super.setBackground(color); if (list != null) { list.setBackground(color); } }
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { JPanel panel = (JPanel)value; panel.setFocusable(false); if (isSelected) { panel.setForeground((Color)UIManager.get("List.selectionForeground")); panel.setBackground((Color)UIManager.get("List.selectionBackground")); panel.setBorder(BorderFactory.createLineBorder((Color)UIManager.get("List.selectionBorder"))); } else { panel.setBackground(list.getBackground()); panel.setForeground(list.getForeground()); panel.setBorder(BorderFactory.createLineBorder((Color)UIManager.get("ContactItem.background"))); } list.setBackground((Color)UIManager.get("ContactItem.background")); return panel; } }
/** * Creates combo popup for the specified combobox. * * @param combo * Combobox. */ public SubstanceComboPopup(JComboBox combo) { super(combo); // fix for defect 154 this.setOpaque(true); this.list.setBackground(combo.getBackground()); }
/** * Creates combo popup for the specified combobox. * * @param combo * Combobox. */ public SubstanceComboPopup(JComboBox combo) { super(combo); // fix for defect 154 this.setOpaque(true); this.list.setBackground(combo.getBackground()); }
public void propertyChange(PropertyChangeEvent e) { super.propertyChange(e); String propertyName = e.getPropertyName(); if (propertyName.equals("background")) { Color color = (Color)e.getNewValue(); arrowButton.setBackground(color); listBox.setBackground(color); } else if (propertyName.equals("foreground")) { Color color = (Color)e.getNewValue(); arrowButton.setForeground(color); listBox.setForeground(color); } } }
/** Creates new form EditorListPanel */ public StyleEditorListPanel(StyleBuilderPanel mainPanel, CssStyleData styleData) { cssStyleData = styleData; styleBuilderPanel = mainPanel; initComponents(); // Set the background of the List to panel background // (light grey) instead of white. styleEditorList.setBackground(getBackground()); styleEditorList.setModel(new StyleEditorListModel()); styleEditorList.setCellRenderer(new StyleEditorListRenderer()); }
BattleStepsPanel() { setLayout(new BorderLayout()); add(list, BorderLayout.CENTER); list.setBackground(this.getBackground()); list.setSelectionModel(listSelectionModel); }
@Override public void configurarCores() { painelBarraFerramentas.setBackground(ColorController.FUNDO_ESCURO); if (WeblafUtils.weblafEstaInstalado()) { WeblafUtils.configuraWeblaf(barraFerramentas);//tira a borda dos botões principais WeblafUtils.configurarBotao(botaoFechar, ColorController.COR_PRINCIPAL, ColorController.COR_LETRA, ColorController.COR_DESTAQUE, ColorController.COR_LETRA, 5); WeblafUtils.configuraWebLaf(separador); listaPlugins.setBackground(ColorController.COR_DESTAQUE); listaPlugins.setForeground(ColorController.COR_LETRA); rotuloNome.setForeground(ColorController.COR_LETRA); } }
public JComponent overlayCreateInterface() { visibleMatchingRules = (isVStyle()?7:15); //if it's on all the time, better if there's less displayed on screen getTextComponent().addKeyListener(new MyKeyAdapter()); listModel = new DefaultListModel(); list = new JList(listModel) { public int getVisibleRowCount() { return Math.min(listModel.getSize(), visibleMatchingRules); } }; list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); list.setBackground(new Color(235, 244, 254)); list.addKeyListener(new MyKeyAdapter()); list.setPrototypeCellValue("This is a rule name g"); list.addMouseListener(new ListMouseAdapter()); JScrollPane scrollPane = new JScrollPane(list, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); scrollPane.setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED)); return scrollPane; }
public void propertyChange(PropertyChangeEvent e) { super.propertyChange(e); String propertyName = e.getPropertyName(); if ("editable".equals(propertyName)) { PgsComboBoxButtonUI button = (PgsComboBoxButtonUI) arrowButton; button.setIconOnly(comboBox.isEditable()); comboBox.repaint(); button.setFocusPainted(comboBox.isEditable()); } else if ("background".equals(propertyName)) { Color color = (Color) e.getNewValue(); arrowButton.setBackground(color); listBox.setBackground(color); } else if ("foreground".equals(propertyName)) { Color color = (Color) e.getNewValue(); arrowButton.setForeground(color); listBox.setForeground(color); } } }
public ToolTipList(ToolTipListDelegate delegate) { super(new BorderLayout()); this.delegate = delegate; tipsModel = new DefaultListModel(); tipsList = new JList(tipsModel); tipsList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); tipsList.setBackground(BACKGROUND_COLOR); tipsList.setSelectionForeground(Color.black); tipsList.setSelectionBackground(BACKGROUND_COLOR); tipsList.setPrototypeCellValue("This is a rule name g"); tipsList.addKeyListener(new MyListKeyAdapter()); tipsList.setFocusable(false); tipsScrollPane = new JScrollPane(tipsList, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); tipsScrollPane.setFocusable(false); tipsScrollPane.setBorder(BorderFactory.createLineBorder(Color.lightGray)); addMouseListener(new MyMouseAdapter()); add(tipsScrollPane, BorderLayout.CENTER); }
public AxiomAnnotationPanel(OWLEditorKit eKit) { setLayout(new BorderLayout(6, 6)); setPreferredSize(new Dimension(500, 300)); // we need to use the OWLCellRenderer, so create a singleton JList final OWLCellRenderer ren = new OWLCellRenderer(eKit); ren.setHighlightKeywords(true); model = new DefaultListModel(); JList label = new JList(model); label.setBackground(getBackground()); label.setEnabled(false); label.setOpaque(true); label.setCellRenderer(ren); annotationsComponent = new AxiomAnnotationsList(eKit); final JScrollPane scroller = new JScrollPane(annotationsComponent); add(label, BorderLayout.NORTH); add(scroller, BorderLayout.CENTER); setVisible(true); }
public QuickSearchPopup (AbstractQuickSearchComboBar comboBar) { this.comboBar = comboBar; initComponents(); loadSettings(); makeResizable(); rModel = ResultsModel.getInstance(); jList1.setModel(rModel); jList1.setCellRenderer(new SearchResultRender(this)); rModel.addListDataListener(this); if( "Aqua".equals(UIManager.getLookAndFeel().getID()) ) //NOI18N jList1.setBackground(QuickSearchComboBar.getResultBackground()); updateStatusPanel(evalTask != null); setVisible(false); }
public AxiomAnnotationPanel(OWLEditorKit eKit) { setLayout(new BorderLayout(6, 6)); setPreferredSize(new Dimension(500, 300)); // we need to use the OWLCellRenderer, so create a singleton JList final OWLCellRenderer ren = new OWLCellRenderer(eKit); ren.setHighlightKeywords(true); model = new DefaultListModel(); JList label = new JList(model); label.setBackground(getBackground()); label.setEnabled(false); label.setOpaque(true); label.setCellRenderer(ren); annotationsComponent = new AxiomAnnotationsList(eKit); final JScrollPane scroller = new JScrollPane(annotationsComponent); add(label, BorderLayout.NORTH); add(scroller, BorderLayout.CENTER); setVisible(true); }
@Override protected void synchronizeEditableState() { if (listCmp != null) { boolean tableEnabled = isEditable() && isEnabled(); listCmp.setEnabled(true); listCmp.setBackground(tableEnabled ? Color.WHITE : Color.LIGHT_GRAY); listCmp.setForeground(tableEnabled ? Color.BLACK : Color.DARK_GRAY); listCmp.repaint(); } checkActionStates(); }
/******************************************************************************************************************* * ******************************************************************************************************************/ private void ensureListIsInitialized() { if (!listInitialized) { list.setOpaque(isOpaque()); list.setBackground(getBackground()); list.setForeground(getForeground()); listInitialized = true; } patchRenderer(); }
@Override public void configurarCores() { setBackground(ColorController.FUNDO_MEDIO); setForeground(ColorController.COR_LETRA); labelEditor.setForeground(ColorController.COR_LETRA); labelPS.setForeground(ColorController.COR_LETRA); listaTemas.setBackground(ColorController.FUNDO_ESCURO); listaTemas.setSelectionBackground(ColorController.FUNDO_CLARO); if(WeblafUtils.weblafEstaInstalado()) { WeblafUtils.configuraWebLaf(variavelScrollPane); WeblafUtils.configurarBotao(botaoNovoTema, ColorController.FUNDO_ESCURO, ColorController.COR_LETRA_TITULO, ColorController.FUNDO_CLARO, ColorController.COR_LETRA, 5, true); WeblafUtils.configurarBotao(botaoAplicarTema, ColorController.FUNDO_ESCURO, ColorController.COR_LETRA_TITULO, ColorController.FUNDO_CLARO, ColorController.COR_LETRA, 5, true); WeblafUtils.configurarBotao(botaoCancelar, ColorController.FUNDO_ESCURO, ColorController.COR_LETRA_TITULO, ColorController.FUNDO_CLARO, ColorController.COR_LETRA, 5, true); WeblafUtils.configurarBotao(botaoRemoverTema, ColorController.FUNDO_ESCURO, ColorController.COR_LETRA_TITULO, ColorController.FUNDO_CLARO, ColorController.COR_LETRA, 5, true); WeblafUtils.configurarBotao(botaoRenomear, ColorController.FUNDO_ESCURO, ColorController.COR_LETRA_TITULO, ColorController.FUNDO_CLARO, ColorController.COR_LETRA, 5, true); } }