/** * Returns the font used by this console. Must be called in the UI thread. * * @return font used by this console */ public Font getFont() { if (fFont == null) { fFont = getDefaultFont(); } return fFont; }
/** * Returns the font used by this console. Must be called in the UI thread. * * @return font used by this console */ public Font getFont() { if (fFont == null) { fFont = getDefaultFont(); } return fFont; }
/** * Sets the font used by this console. Specify <code>null</code> to use * the default text font. * * @param newFont font, or <code>null</code> to indicate the default font */ public void setFont(Font newFont) { // ensure font is initialized getFont(); // translate null to default font if (newFont == null) { newFont = getDefaultFont(); } // fire property change if required if (!fFont.equals(newFont)) { Font old = fFont; fFont = newFont; firePropertyChange(this, IConsoleConstants.P_FONT, old, fFont); } }
/** * Sets the font used by this console. Specify <code>null</code> to use * the default text font. * * @param newFont font, or <code>null</code> to indicate the default font */ public void setFont(Font newFont) { // ensure font is initialized getFont(); // translate null to default font Font font = newFont; if (font == null) { font = getDefaultFont(); } // fire property change if required if (!fFont.equals(font)) { Font old = fFont; fFont = font; firePropertyChange(this, IConsoleConstants.P_FONT, old, fFont); } }