@Override public boolean equals(Object obj) { if (obj instanceof UFont == false) { return false; } return this.font.equals(((UFont) obj).font); }
/** * Sets the font used for line numbers. * * @param font The font to use. This cannot be <code>null</code>. * @see #getLineNumberFont() */ public void setLineNumberFont(Font font) { if (font==null) { throw new IllegalArgumentException("font cannot be null"); } if (!font.equals(lineNumberFont)) { lineNumberFont = font; if (lineNumberList!=null) { lineNumberList.setFont(font); } } }
@Override public boolean equals(Object obj) { if (obj instanceof UFont == false) { return false; } return this.font.equals(((UFont) obj).font); }
/** * Sets a Font preference. If null removes it. */ public void setFont(String key, Font value) { if (value != null && !value.equals(getDefault(key))) internal.setProperty(key, value.getName()+" "+value.getSize()+" "+ value.getStyle()); else internal.remove(key); }
public void setFont(Font font) { if (!font.equals(this.font)) { flush(); this.font = font; } }
public void setHeaderFont(Font f) { if (f == null) { return; } if (f.equals(headerFont)) { return; } Font old = headerFont; headerFont = f; firePropertyChange(PROP_HEADER_FONT, old, headerFont); }
/** * Sets a Font preference. If null removes it. */ public void setFont(String key, Font value) { if (value != null && !value.equals(getDefault(key))) internal.setProperty(key, value.getName()+" "+value.getSize()+" "+ value.getStyle()); else internal.remove(key); }
/** * Derive a new coloring by changing the font and font-mode and leaving the * rest of the coloring unchanged. */ public static Coloring changeFont(Coloring c, Font newFont, int newFontMode) { if ((newFont == null && c.font == null) || (newFont != null && newFont.equals(c.font) && c.fontMode == newFontMode)) { return c; } return new Coloring(newFont, c.foreColor, c.backColor); }
/** Derive a new coloring by changing the font and font-mode and leaving * the rest of the coloring unchanged. */ public static Coloring changeFont(Coloring c, Font newFont, int newFontMode) { if ((newFont == null && c.font == null) || (newFont != null && newFont.equals(c.font) && c.fontMode == newFontMode) ) { return c; } return new Coloring(newFont, c.foreColor, c.backColor); }
public void setFooterFont(Font f) { if (f == null) { return; } if (f.equals(footerFont)) { return; } Font old = headerFont; footerFont = f; firePropertyChange(PROP_FOOTER_FONT, old, footerFont); }
public void setFont(java.awt.Font f) { if (!f.equals(myFont)) { myFont = f; myMetrics = getFontMetrics(f); layoutCache = null; size = null; } }
public TitleLabel(String htmlText) { super(htmlText); // Determine if anti-aliasing can be used Font titleFont = LanguageKey.fromLocale(Configurations.currentConfiguration.getLocale()).getTitleFont(); useAATextProperty = titleFont.equals(TitleFontDecorator.CORBEN_REGULAR) || titleFont.equals(TitleFontDecorator.OPENSANS_SEMIBOLD); }
private void setupFonts() { Font sysFont = OWLRendererPreferences.getInstance().getFont(); if(!plainFont.equals(sysFont)) { plainFont = sysFont; boldFont = plainFont.deriveFont(Font.BOLD); } }
/** * @param f the font for the footer */ public static void setFooterFont(Font f) { if (getFooterFont().equals(f)) return; getPreferences().put(PROP_FOOTER_FONT_NAME,f.getName()); getPreferences().putInt(PROP_FOOTER_FONT_STYLE,f.getStyle()); getPreferences().putInt(PROP_FOOTER_FONT_SIZE,f.getSize()); }
/** * @param f the font for the header */ public static void setHeaderFont(Font f) { if (getHeaderFont().equals(f)) return; getPreferences().put(PROP_HEADER_FONT_NAME,f.getName()); getPreferences().putInt(PROP_HEADER_FONT_STYLE,f.getStyle()); getPreferences().putInt(PROP_HEADER_FONT_SIZE,f.getSize()); }
public void setFont(Font font) { if (!getFont().equals(font)) { super.setFont(font); chartDataChanged(); } }
@Override public void stateChanged(ChangeEvent e) { if (!nodeRenderer.getFont().equals(model.getNodeFont())) { nodeRenderer.setFont(model.getNodeFont()); } if (!edgeRenderer.getFont().equals(model.getEdgeFont())) { edgeRenderer.setFont(model.getEdgeFont()); } nodeRefresh = true; edgeRefresh = true; } });
public void setFont(final Font _v) { if (!getFont().equals(_v)) { final Font vp = getFont(); lbExemple_.setFont(_v); setSize(getPreferredSize()); revalidate(); firePropertyChange("font", vp, getFont()); } } }
public void setFont(java.awt.Font f) { super.setFont(f); if (!f.equals(myFont)) { myFont = f; myMetrics = (myFont != null || ((myFont = getFont()) != null)) ? getFontMetrics(myFont) : null; layoutCache = null; calculateSize(); invalidate(); } }
public void setFontForFlechLegend(Font _f) { Font old = getFontForFlechLegend(); if (!old.equals(_f)) { scale_.setScaleFont(_f); if (flecheLegend_ != null) { flecheLegend_.lbInfo_.setFont(_f); getLegende().repaint(); firePropertyChange("scale.font", old, _f); } } }