/** * Overridden to message super and forward the method to the tree. * Since the tree is not actually in the component hierarchy it will * never receive this unless we forward it in this manner. */ @Override public void updateUI() { super.updateUI(); if (tree != null) { tree.updateUI(); } // Use the tree's default foreground and background colors in the // table. LookAndFeel.installColorsAndFont(this, "Tree.background", "Tree.foreground", "Tree.font"); }
/** * Retourne une étiquette pour la composante spécifiée. Le texte de l'étiquette pourra * éventuellement être distribué sur plusieurs lignes. * * @param owner Composante pour laquelle on construit une étiquette. L'étiquette aura la même * largeur que {@code owner}. * @param text Texte à placer dans l'étiquette. */ public static JComponent getMultilineLabelFor(final JComponent owner, final String text) { final JTextArea label = new JTextArea(text); final Dimension size = owner.getPreferredSize(); size.height = label.getMaximumSize().height; label.setMaximumSize(size); label.setWrapStyleWord(true); label.setLineWrap(true); label.setEditable(false); label.setFocusable(false); label.setOpaque(false); label.setBorder(null); // Certains L&F placent une bordure. LookAndFeel.installColorsAndFont( label, "Label.background", "Label.foreground", "Label.font"); return label; }
protected void installDefaults() { LookAndFeel.installColorsAndFont(chooser, "ColorChooser.background", "ColorChooser.foreground", "ColorChooser.font"); }
protected void installDefaults() { LookAndFeel.installColorsAndFont(chooser, "ColorChooser.background", "ColorChooser.foreground", "ColorChooser.font"); }
protected void installDefaults() { LookAndFeel.installColorsAndFont(footer, "TableHeader.background", //$NON-NLS-1$ "TableHeader.foreground", "TableHeader.font"); //$NON-NLS-1$ //$NON-NLS-2$ LookAndFeel.installProperty(footer, "opaque", Boolean.TRUE); //$NON-NLS-1$ }
/** Installs the default colors, default font, default renderer, and default * editor into the JComboBox. */ protected void installDefaults() { LookAndFeel.installColorsAndFont( comboBox, "ComboBox.background", "ComboBox.foreground", "ComboBox.font"); LookAndFeel.installBorder(comboBox, "ComboBox.border"); }
@Override protected void installDefaults(JLabel c) { super.installDefaults(c); LookAndFeel.installColorsAndFont(c, "JideLabel.background", "JideLabel.foreground", "JideLabel.font"); }
protected void installDefaults() { // Note: Omitting the following line was a bug from v1.3.01 until v1.3.04 // Note: The following method turned out to be new in 1.5. Therefore // replaced with progressBar.setOpaque(true) //LookAndFeel.installProperty(progressBar, "opaque", Boolean.TRUE); // removed again in 1.3.7 (because opaque progress bar // fills bounds with track [background] color) //progressBar.setOpaque(true); LookAndFeel.installBorder(progressBar, "ProgressBar.border"); LookAndFeel.installColorsAndFont(progressBar, "ProgressBar.background", "ProgressBar.foreground", "ProgressBar.font"); }
protected void installDefaults(JSlider slider) { LookAndFeel.installBorder(slider, "Slider.border"); //$NON-NLS-1$ LookAndFeel.installColorsAndFont(slider, "Slider.background", //$NON-NLS-1$ "Slider.foreground", "Slider.font"); //$NON-NLS-1$ //$NON-NLS-2$ highlightColor = UIManager.getColor("Slider.highlight"); //$NON-NLS-1$ shadowColor = UIManager.getColor("Slider.shadow"); //$NON-NLS-1$ focusColor = UIManager.getColor("Slider.focus"); //$NON-NLS-1$ focusInsets = (Insets) UIManager.get("Slider.focusInsets"); //$NON-NLS-1$ }
protected void installDefaults(JSlider slider) { LookAndFeel.installBorder(slider, "Slider.border"); //$NON-NLS-1$ LookAndFeel.installColorsAndFont(slider, "Slider.background", //$NON-NLS-1$ "Slider.foreground", "Slider.font"); //$NON-NLS-1$ //$NON-NLS-2$ highlightColor = UIManager.getColor("Slider.highlight"); //$NON-NLS-1$ shadowColor = UIManager.getColor("Slider.shadow"); //$NON-NLS-1$ focusColor = UIManager.getColor("Slider.focus"); //$NON-NLS-1$ focusInsets = (Insets) UIManager.get("Slider.focusInsets"); //$NON-NLS-1$ }
protected AnimatedToolTip(JLabel label) { super(); this.iconlabel = label; LookAndFeel.installColorsAndFont(iconlabel, "ToolTip.background", "ToolTip.foreground", "ToolTip.font"); iconlabel.setOpaque(true); setLayout(new BorderLayout()); add(iconlabel); }
protected void installDefaults(HeaderBox p) { _painter = (ThemePainter) UIDefaultsLookup.get("Theme.painter"); LookAndFeel.installColorsAndFont(p, "Panel.background", "Panel.foreground", "Panel.font"); LookAndFeel.installBorder(p, "Panel.border"); }
protected void installDefaults() { LookAndFeel.installColorsAndFont(treeTable, "Table.background", "Table.foreground", "Table.font"); if (treeTable.getAlternateRowColor() == null || treeTable.getAlternateRowColor() instanceof UIResource) { Color c = UIManager.getColor("Table.alternateRowColor"); treeTable.setAlternateRowColor(c); } }
protected void installDefaults(JSyScrollPane scrollpane) { LookAndFeel.installBorder(scrollpane, "ScrollPane.border"); //$NON-NLS-1$ LookAndFeel.installColorsAndFont(scrollpane, "ScrollPane.background", //$NON-NLS-1$ "ScrollPane.foreground", "ScrollPane.font"); //$NON-NLS-1$ //$NON-NLS-2$ Border vpBorder = scrollpane.getViewportBorder(); if ((vpBorder == null) || (vpBorder instanceof UIResource)) { vpBorder = UIManager.getBorder("ScrollPane.viewportBorder"); //$NON-NLS-1$ scrollpane.setViewportBorder(vpBorder); } LookAndFeel.installProperty(scrollpane, "opaque", Boolean.TRUE); //$NON-NLS-1$ }
protected void installDefaults() { LookAndFeel.installColorsAndFont(tipPane, "TipOfTheDay.background", "TipOfTheDay.foreground", "TipOfTheDay.font"); LookAndFeel.installBorder(tipPane, "TipOfTheDay.border"); LookAndFeel.installProperty(tipPane, "opaque", Boolean.TRUE); tipFont = UIManager.getFont("TipOfTheDay.tipFont"); }
protected void installDefaults() { LookAndFeel.installColorsAndFont(tipPane, "TipOfTheDay.background", "TipOfTheDay.foreground", "TipOfTheDay.font"); LookAndFeel.installBorder(tipPane, "TipOfTheDay.border"); LookAndFeel.installProperty(tipPane, "opaque", Boolean.TRUE); tipFont = UIManager.getFont("TipOfTheDay.tipFont"); }
protected void installDefaults() { LookAndFeel.installColorsAndFont(tipPane, "TipOfTheDay.background", "TipOfTheDay.foreground", "TipOfTheDay.font"); LookAndFeel.installBorder(tipPane, "TipOfTheDay.border"); LookAndFeel.installProperty(tipPane, "opaque", Boolean.TRUE); tipFont = UIManager.getFont("TipOfTheDay.tipFont"); }
protected void installDefaults() { LookAndFeel.installColorsAndFont(tipPane, "TipOfTheDay.background", "TipOfTheDay.foreground", "TipOfTheDay.font"); LookAndFeel.installBorder(tipPane, "TipOfTheDay.border"); LookAndFeel.installProperty(tipPane, "opaque", Boolean.TRUE); tipFont = UIManager.getFont("TipOfTheDay.tipFont"); }
/** Installs the defaults */ protected void installDefaults() { super.installDefaults(); LookAndFeel.installColorsAndFont(desktopIcon, "DesktopIcon.background", "DesktopIcon.foreground", "DesktopIcon.font"); desktopIcon.setOpaque(true); width = UIManager.getInt("DesktopIcon.width"); }
protected void installDefaults() { LookAndFeel.installColorsAndFont(tabPane, "TabbedPane.background", "TabbedPane.foreground", "TabbedPane.font"); tabAreaBackground = UIManager.getColor("TabbedPane.tabAreaBackground"); selectedColor = UIManager.getColor("TabbedPane.selected"); textIconGap = UIManager.getInt("TabbedPane.textIconGap"); tabInsets = UIManager.getInsets("TabbedPane.tabInsets"); selectedTabPadInsets = UIManager.getInsets("TabbedPane.selectedTabPadInsets"); tabAreaInsets = UIManager.getInsets("TabbedPane.tabAreaInsets"); contentBorderInsets = UIManager.getInsets("TabbedPane.contentBorderInsets"); tabRunOverlay = UIManager.getInt("TabbedPane.tabRunOverlay"); tabPane.setBorder(UIManager.getBorder("TabbedPane.boder")); }