Java Code Examples for java.awt.peer.MenuComponentPeer#setFont()
The following examples show how to use
java.awt.peer.MenuComponentPeer#setFont() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MenuComponent.java From jdk8u-jdk with GNU General Public License v2.0 | 3 votes |
/** * Sets the font to be used for this menu component to the specified * font. This font is also used by all subcomponents of this menu * component, unless those subcomponents specify a different font. * <p> * Some platforms may not support setting of all font attributes * of a menu component; in such cases, calling <code>setFont</code> * will have no effect on the unsupported font attributes of this * menu component. Unless subcomponents of this menu component * specify a different font, this font will be used by those * subcomponents if supported by the underlying platform. * * @param f the font to be set * @see #getFont * @see Font#getAttributes * @see java.awt.font.TextAttribute */ public void setFont(Font f) { font = f; //Fixed 6312943: NullPointerException in method MenuComponent.setFont(Font) MenuComponentPeer peer = this.peer; if (peer != null) { peer.setFont(f); } }
Example 2
Source File: MenuComponent.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 3 votes |
/** * Sets the font to be used for this menu component to the specified * font. This font is also used by all subcomponents of this menu * component, unless those subcomponents specify a different font. * <p> * Some platforms may not support setting of all font attributes * of a menu component; in such cases, calling <code>setFont</code> * will have no effect on the unsupported font attributes of this * menu component. Unless subcomponents of this menu component * specify a different font, this font will be used by those * subcomponents if supported by the underlying platform. * * @param f the font to be set * @see #getFont * @see Font#getAttributes * @see java.awt.font.TextAttribute */ public void setFont(Font f) { font = f; //Fixed 6312943: NullPointerException in method MenuComponent.setFont(Font) MenuComponentPeer peer = this.peer; if (peer != null) { peer.setFont(f); } }
Example 3
Source File: MenuComponent.java From jdk-1.7-annotated with Apache License 2.0 | 3 votes |
/** * Sets the font to be used for this menu component to the specified * font. This font is also used by all subcomponents of this menu * component, unless those subcomponents specify a different font. * <p> * Some platforms may not support setting of all font attributes * of a menu component; in such cases, calling <code>setFont</code> * will have no effect on the unsupported font attributes of this * menu component. Unless subcomponents of this menu component * specify a different font, this font will be used by those * subcomponents if supported by the underlying platform. * * @param f the font to be set * @see #getFont * @see Font#getAttributes * @see java.awt.font.TextAttribute */ public void setFont(Font f) { font = f; //Fixed 6312943: NullPointerException in method MenuComponent.setFont(Font) MenuComponentPeer peer = (MenuComponentPeer)this.peer; if (peer != null) { peer.setFont(f); } }
Example 4
Source File: MenuComponent.java From jdk8u-jdk with GNU General Public License v2.0 | 3 votes |
/** * Sets the font to be used for this menu component to the specified * font. This font is also used by all subcomponents of this menu * component, unless those subcomponents specify a different font. * <p> * Some platforms may not support setting of all font attributes * of a menu component; in such cases, calling <code>setFont</code> * will have no effect on the unsupported font attributes of this * menu component. Unless subcomponents of this menu component * specify a different font, this font will be used by those * subcomponents if supported by the underlying platform. * * @param f the font to be set * @see #getFont * @see Font#getAttributes * @see java.awt.font.TextAttribute */ public void setFont(Font f) { font = f; //Fixed 6312943: NullPointerException in method MenuComponent.setFont(Font) MenuComponentPeer peer = this.peer; if (peer != null) { peer.setFont(f); } }
Example 5
Source File: MenuComponent.java From jdk8u_jdk with GNU General Public License v2.0 | 3 votes |
/** * Sets the font to be used for this menu component to the specified * font. This font is also used by all subcomponents of this menu * component, unless those subcomponents specify a different font. * <p> * Some platforms may not support setting of all font attributes * of a menu component; in such cases, calling <code>setFont</code> * will have no effect on the unsupported font attributes of this * menu component. Unless subcomponents of this menu component * specify a different font, this font will be used by those * subcomponents if supported by the underlying platform. * * @param f the font to be set * @see #getFont * @see Font#getAttributes * @see java.awt.font.TextAttribute */ public void setFont(Font f) { synchronized (getTreeLock()) { font = f; //Fixed 6312943: NullPointerException in method MenuComponent.setFont(Font) MenuComponentPeer peer = this.peer; if (peer != null) { peer.setFont(f); } } }
Example 6
Source File: MenuComponent.java From openjdk-8 with GNU General Public License v2.0 | 3 votes |
/** * Sets the font to be used for this menu component to the specified * font. This font is also used by all subcomponents of this menu * component, unless those subcomponents specify a different font. * <p> * Some platforms may not support setting of all font attributes * of a menu component; in such cases, calling <code>setFont</code> * will have no effect on the unsupported font attributes of this * menu component. Unless subcomponents of this menu component * specify a different font, this font will be used by those * subcomponents if supported by the underlying platform. * * @param f the font to be set * @see #getFont * @see Font#getAttributes * @see java.awt.font.TextAttribute */ public void setFont(Font f) { font = f; //Fixed 6312943: NullPointerException in method MenuComponent.setFont(Font) MenuComponentPeer peer = this.peer; if (peer != null) { peer.setFont(f); } }
Example 7
Source File: MenuComponent.java From openjdk-8-source with GNU General Public License v2.0 | 3 votes |
/** * Sets the font to be used for this menu component to the specified * font. This font is also used by all subcomponents of this menu * component, unless those subcomponents specify a different font. * <p> * Some platforms may not support setting of all font attributes * of a menu component; in such cases, calling <code>setFont</code> * will have no effect on the unsupported font attributes of this * menu component. Unless subcomponents of this menu component * specify a different font, this font will be used by those * subcomponents if supported by the underlying platform. * * @param f the font to be set * @see #getFont * @see Font#getAttributes * @see java.awt.font.TextAttribute */ public void setFont(Font f) { font = f; //Fixed 6312943: NullPointerException in method MenuComponent.setFont(Font) MenuComponentPeer peer = this.peer; if (peer != null) { peer.setFont(f); } }
Example 8
Source File: MenuComponent.java From hottub with GNU General Public License v2.0 | 3 votes |
/** * Sets the font to be used for this menu component to the specified * font. This font is also used by all subcomponents of this menu * component, unless those subcomponents specify a different font. * <p> * Some platforms may not support setting of all font attributes * of a menu component; in such cases, calling <code>setFont</code> * will have no effect on the unsupported font attributes of this * menu component. Unless subcomponents of this menu component * specify a different font, this font will be used by those * subcomponents if supported by the underlying platform. * * @param f the font to be set * @see #getFont * @see Font#getAttributes * @see java.awt.font.TextAttribute */ public void setFont(Font f) { font = f; //Fixed 6312943: NullPointerException in method MenuComponent.setFont(Font) MenuComponentPeer peer = this.peer; if (peer != null) { peer.setFont(f); } }
Example 9
Source File: MenuComponent.java From Java8CN with Apache License 2.0 | 3 votes |
/** * Sets the font to be used for this menu component to the specified * font. This font is also used by all subcomponents of this menu * component, unless those subcomponents specify a different font. * <p> * Some platforms may not support setting of all font attributes * of a menu component; in such cases, calling <code>setFont</code> * will have no effect on the unsupported font attributes of this * menu component. Unless subcomponents of this menu component * specify a different font, this font will be used by those * subcomponents if supported by the underlying platform. * * @param f the font to be set * @see #getFont * @see Font#getAttributes * @see java.awt.font.TextAttribute */ public void setFont(Font f) { font = f; //Fixed 6312943: NullPointerException in method MenuComponent.setFont(Font) MenuComponentPeer peer = this.peer; if (peer != null) { peer.setFont(f); } }
Example 10
Source File: MenuComponent.java From jdk1.8-source-analysis with Apache License 2.0 | 3 votes |
/** * Sets the font to be used for this menu component to the specified * font. This font is also used by all subcomponents of this menu * component, unless those subcomponents specify a different font. * <p> * Some platforms may not support setting of all font attributes * of a menu component; in such cases, calling <code>setFont</code> * will have no effect on the unsupported font attributes of this * menu component. Unless subcomponents of this menu component * specify a different font, this font will be used by those * subcomponents if supported by the underlying platform. * * @param f the font to be set * @see #getFont * @see Font#getAttributes * @see java.awt.font.TextAttribute */ public void setFont(Font f) { synchronized (getTreeLock()) { font = f; //Fixed 6312943: NullPointerException in method MenuComponent.setFont(Font) MenuComponentPeer peer = this.peer; if (peer != null) { peer.setFont(f); } } }
Example 11
Source File: MenuComponent.java From openjdk-jdk9 with GNU General Public License v2.0 | 3 votes |
/** * Sets the font to be used for this menu component to the specified * font. This font is also used by all subcomponents of this menu * component, unless those subcomponents specify a different font. * <p> * Some platforms may not support setting of all font attributes * of a menu component; in such cases, calling {@code setFont} * will have no effect on the unsupported font attributes of this * menu component. Unless subcomponents of this menu component * specify a different font, this font will be used by those * subcomponents if supported by the underlying platform. * * @param f the font to be set * @see #getFont * @see Font#getAttributes * @see java.awt.font.TextAttribute */ public void setFont(Font f) { synchronized (getTreeLock()) { font = f; //Fixed 6312943: NullPointerException in method MenuComponent.setFont(Font) MenuComponentPeer peer = this.peer; if (peer != null) { peer.setFont(f); } } }
Example 12
Source File: MenuComponent.java From Bytecoder with Apache License 2.0 | 3 votes |
/** * Sets the font to be used for this menu component to the specified * font. This font is also used by all subcomponents of this menu * component, unless those subcomponents specify a different font. * <p> * Some platforms may not support setting of all font attributes * of a menu component; in such cases, calling {@code setFont} * will have no effect on the unsupported font attributes of this * menu component. Unless subcomponents of this menu component * specify a different font, this font will be used by those * subcomponents if supported by the underlying platform. * * @param f the font to be set * @see #getFont * @see Font#getAttributes * @see java.awt.font.TextAttribute */ public void setFont(Font f) { synchronized (getTreeLock()) { font = f; //Fixed 6312943: NullPointerException in method MenuComponent.setFont(Font) MenuComponentPeer peer = this.peer; if (peer != null) { peer.setFont(f); } } }
Example 13
Source File: MenuComponent.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 3 votes |
/** * Sets the font to be used for this menu component to the specified * font. This font is also used by all subcomponents of this menu * component, unless those subcomponents specify a different font. * <p> * Some platforms may not support setting of all font attributes * of a menu component; in such cases, calling <code>setFont</code> * will have no effect on the unsupported font attributes of this * menu component. Unless subcomponents of this menu component * specify a different font, this font will be used by those * subcomponents if supported by the underlying platform. * * @param f the font to be set * @see #getFont * @see Font#getAttributes * @see java.awt.font.TextAttribute */ public void setFont(Font f) { synchronized (getTreeLock()) { font = f; //Fixed 6312943: NullPointerException in method MenuComponent.setFont(Font) MenuComponentPeer peer = this.peer; if (peer != null) { peer.setFont(f); } } }
Example 14
Source File: MenuComponent.java From openjdk-jdk8u with GNU General Public License v2.0 | 3 votes |
/** * Sets the font to be used for this menu component to the specified * font. This font is also used by all subcomponents of this menu * component, unless those subcomponents specify a different font. * <p> * Some platforms may not support setting of all font attributes * of a menu component; in such cases, calling <code>setFont</code> * will have no effect on the unsupported font attributes of this * menu component. Unless subcomponents of this menu component * specify a different font, this font will be used by those * subcomponents if supported by the underlying platform. * * @param f the font to be set * @see #getFont * @see Font#getAttributes * @see java.awt.font.TextAttribute */ public void setFont(Font f) { synchronized (getTreeLock()) { font = f; //Fixed 6312943: NullPointerException in method MenuComponent.setFont(Font) MenuComponentPeer peer = this.peer; if (peer != null) { peer.setFont(f); } } }
Example 15
Source File: MenuComponent.java From JDKSourceCode1.8 with MIT License | 3 votes |
/** * Sets the font to be used for this menu component to the specified * font. This font is also used by all subcomponents of this menu * component, unless those subcomponents specify a different font. * <p> * Some platforms may not support setting of all font attributes * of a menu component; in such cases, calling <code>setFont</code> * will have no effect on the unsupported font attributes of this * menu component. Unless subcomponents of this menu component * specify a different font, this font will be used by those * subcomponents if supported by the underlying platform. * * @param f the font to be set * @see #getFont * @see Font#getAttributes * @see java.awt.font.TextAttribute */ public void setFont(Font f) { synchronized (getTreeLock()) { font = f; //Fixed 6312943: NullPointerException in method MenuComponent.setFont(Font) MenuComponentPeer peer = this.peer; if (peer != null) { peer.setFont(f); } } }
Example 16
Source File: MenuComponent.java From jdk8u60 with GNU General Public License v2.0 | 3 votes |
/** * Sets the font to be used for this menu component to the specified * font. This font is also used by all subcomponents of this menu * component, unless those subcomponents specify a different font. * <p> * Some platforms may not support setting of all font attributes * of a menu component; in such cases, calling <code>setFont</code> * will have no effect on the unsupported font attributes of this * menu component. Unless subcomponents of this menu component * specify a different font, this font will be used by those * subcomponents if supported by the underlying platform. * * @param f the font to be set * @see #getFont * @see Font#getAttributes * @see java.awt.font.TextAttribute */ public void setFont(Font f) { font = f; //Fixed 6312943: NullPointerException in method MenuComponent.setFont(Font) MenuComponentPeer peer = this.peer; if (peer != null) { peer.setFont(f); } }
Example 17
Source File: MenuComponent.java From TencentKona-8 with GNU General Public License v2.0 | 3 votes |
/** * Sets the font to be used for this menu component to the specified * font. This font is also used by all subcomponents of this menu * component, unless those subcomponents specify a different font. * <p> * Some platforms may not support setting of all font attributes * of a menu component; in such cases, calling <code>setFont</code> * will have no effect on the unsupported font attributes of this * menu component. Unless subcomponents of this menu component * specify a different font, this font will be used by those * subcomponents if supported by the underlying platform. * * @param f the font to be set * @see #getFont * @see Font#getAttributes * @see java.awt.font.TextAttribute */ public void setFont(Font f) { synchronized (getTreeLock()) { font = f; //Fixed 6312943: NullPointerException in method MenuComponent.setFont(Font) MenuComponentPeer peer = this.peer; if (peer != null) { peer.setFont(f); } } }
Example 18
Source File: MenuComponent.java From dragonwell8_jdk with GNU General Public License v2.0 | 3 votes |
/** * Sets the font to be used for this menu component to the specified * font. This font is also used by all subcomponents of this menu * component, unless those subcomponents specify a different font. * <p> * Some platforms may not support setting of all font attributes * of a menu component; in such cases, calling <code>setFont</code> * will have no effect on the unsupported font attributes of this * menu component. Unless subcomponents of this menu component * specify a different font, this font will be used by those * subcomponents if supported by the underlying platform. * * @param f the font to be set * @see #getFont * @see Font#getAttributes * @see java.awt.font.TextAttribute */ public void setFont(Font f) { synchronized (getTreeLock()) { font = f; //Fixed 6312943: NullPointerException in method MenuComponent.setFont(Font) MenuComponentPeer peer = this.peer; if (peer != null) { peer.setFont(f); } } }