public void run() {
SubstanceLookAndFeel.setFontPolicy(null);
final FontSet substanceCoreFontSet = SubstanceLookAndFeel
.getFontPolicy().getFontSet("Substance",
null);
FontPolicy newFontPolicy = new FontPolicy() {
public FontSet getFontSet(String lafName,
UIDefaults table) {
return new WrapperFontSet(
substanceCoreFontSet, newValue);
}
};
SubstanceLookAndFeel.setFontPolicy(newFontPolicy);
fontSizeLabel.setText(SubstanceLookAndFeel
.getFontPolicy().getFontSet("Substance",
null).getControlFont().getSize()
+ " pt.");
}
});
}
}
});
builder.append(fontSizeSlider);
Icon zoomInIcon = new ImageIcon(Thread.currentThread()
.getContextClassLoader().getResource(
"test/check/icons/16/zoom_in.png"));
JLabel zoomInLabel = new JLabel(zoomInIcon);
builder.append(zoomInLabel);
JButton tahoma = new JButton("Tahoma 11");
tahoma.putClientProperty(
SubstanceLookAndFeel.BUTTON_NO_MIN_SIZE_PROPERTY, Boolean.TRUE);
tahoma.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
SubstanceLookAndFeel.setFontPolicy(null);
FontPolicy newFontPolicy = new FontPolicy() {
public FontSet getFontSet(String lafName,
UIDefaults table) {
return new Tahoma11FontSet();
}
};