List of usage examples for java.awt Font toString
public String toString()
From source file:Main.java
public void paint(Graphics g) { Font f = g.getFont(); System.out.println(f.toString()); g.drawString("java2s.com", 4, 16); }
From source file:ca.phon.ipamap.IpaMap.java
/** * set font pref/*from w w w .j av a 2 s .co m*/ */ private static void setFontPref(Font font) { PrefHelper.getUserPreferences().put(FONT_PROP, font.toString()); }
From source file:freemind.controller.Controller.java
public Font getFontThroughMap(Font font) { if (!fontMap.containsKey(font.toString())) { fontMap.put(font.toString(), font); }//w ww . java 2 s .c om return (Font) fontMap.get(font.toString()); }
From source file:test.uk.co.modularaudio.util.swing.lwtc.TestShowLWTCButton.java
public TestShowLWTCButton() { tdb = new LWTCButton(LWTCControlConstants.STD_BUTTON_COLOURS, "Kill A", false) { private static final long serialVersionUID = 4471589131574821185L; @Override/*from ww w .j ava 2s .c om*/ public void receiveClick() { log.debug("Received click!"); } }; tdb.setMinimumSize(new Dimension(75, 30)); otherButton = new JButton("Kill B"); otherButton.setMinimumSize(new Dimension(75, 30)); final Font f = otherButton.getFont(); log.debug("Regular button font size = " + f.toString()); otherButton.addActionListener(new ActionListener() { @Override public void actionPerformed(final ActionEvent arg0) { log.debug("Received action performed"); } }); }
From source file:test.uk.co.modularaudio.util.swing.lwtc.TestShowLWTCToggleButton.java
public TestShowLWTCToggleButton() { tdb = new LWTCToggleButton(LWTCControlConstants.STD_TOGGLE_BUTTON_COLOURS, "Kill A", false, false) { private static final long serialVersionUID = -359196738631950261L; @Override/*from www .j a va 2 s. c om*/ public void receiveUpdateEvent(final boolean previousValue, final boolean newValue) { log.debug("Received update event from " + previousValue + " to " + newValue); } }; tdb.setMinimumSize(new Dimension(75, 30)); otherButton = new JToggleButton("Kill B", false); otherButton.setMinimumSize(new Dimension(75, 30)); final Font f = otherButton.getFont(); log.debug("Regular button font size = " + f.toString()); otherButton.addActionListener(new ActionListener() { @Override public void actionPerformed(final ActionEvent e) { log.debug("Received action event: " + e.toString()); } }); tdb.setSelected(true); otherButton.setSelected(true); }