List of utility methods to do Swing Font
T | mildFont(T comp) mild Font comp.setFont(comp.getFont().deriveFont(Font.PLAIN, 12f));
return comp;
|
JLabel | modifyLabelFont(JLabel label, int style, int delta) modify Label Font Font font = label.getFont(); label.setFont(font.deriveFont(style, font.getSize() + delta)); label.setForeground(new Color(140, 140, 140)); return label; |
JLabel | newLabel(String text, int fontStyle) new Label JLabel label = new JLabel(text); label.setFont(label.getFont().deriveFont(fontStyle)); return label; |
void | renderComponent(JComponent comp, Font f, Color foregroundColor, boolean opaque) render Component comp.setForeground(foregroundColor); comp.setFont(f); comp.setBackground(BG_COLOR); comp.setOpaque(opaque); |
void | renderContainerComponents(JComponent comp, Font f, Color foregroundColor, Color backgroundColor) render Container Components for (Component c : getComponents(comp)) {
c.setForeground(foregroundColor);
c.setFont(f);
c.setBackground(backgroundColor);
((JComponent) c).setOpaque(true);
|
void | scaleFontIfApplicable(javax.swing.UIDefaults uiDefaults, java.util.Map.Entry scale Font If Applicable Object value = entry.getValue(); if (value instanceof javax.swing.UIDefaults.ActiveValue) { javax.swing.UIDefaults.ActiveValue activeValue = (javax.swing.UIDefaults.ActiveValue) value; value = activeValue.createValue(uiDefaults); if (value instanceof javax.swing.plaf.FontUIResource) { scaleFontIfApplicable(uiDefaults, entry.getKey(), (javax.swing.plaf.FontUIResource) value, scale); |
void | unBoldAllFonts() un Bold All Fonts UIManager.put("swing.boldMetal", Boolean.FALSE);
|
Font | updateFont(JComponent comp, Font f, boolean b) update Font return null;
|