sun.font.FontManagerForSGE Java Examples
The following examples show how to use
sun.font.FontManagerForSGE.
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: SunGraphicsEnvironment.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Returns all fonts available in this environment. */ public Font[] getAllFonts() { FontManagerForSGE fm = getFontManagerForSGE(); Font[] installedFonts = fm.getAllInstalledFonts(); Font[] created = fm.getCreatedFonts(); if (created == null || created.length == 0) { return installedFonts; } else { int newlen = installedFonts.length + created.length; Font [] fonts = java.util.Arrays.copyOf(installedFonts, newlen); System.arraycopy(created, 0, fonts, installedFonts.length, created.length); return fonts; } }
Example #2
Source File: SunGraphicsEnvironment.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
public String[] getAvailableFontFamilyNames(Locale requestedLocale) { FontManagerForSGE fm = getFontManagerForSGE(); String[] installed = fm.getInstalledFontFamilyNames(requestedLocale); /* Use a new TreeMap as used in getInstalledFontFamilyNames * and insert all the keys in lower case, so that the sort order * is the same as the installed families. This preserves historical * behaviour and inserts new families in the right place. * It would have been marginally more efficient to directly obtain * the tree map and just insert new entries, but not so much as * to justify the extra internal interface. */ TreeMap<String, String> map = fm.getCreatedFontFamilyNames(); if (map == null || map.size() == 0) { return installed; } else { for (int i=0; i<installed.length; i++) { map.put(installed[i].toLowerCase(requestedLocale), installed[i]); } String[] retval = new String[map.size()]; Object [] keyNames = map.keySet().toArray(); for (int i=0; i < keyNames.length; i++) { retval[i] = (String)map.get(keyNames[i]); } return retval; } }
Example #3
Source File: SunGraphicsEnvironment.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
/** * Returns all fonts available in this environment. */ public Font[] getAllFonts() { FontManagerForSGE fm = getFontManagerForSGE(); Font[] installedFonts = fm.getAllInstalledFonts(); Font[] created = fm.getCreatedFonts(); if (created == null || created.length == 0) { return installedFonts; } else { int newlen = installedFonts.length + created.length; Font [] fonts = java.util.Arrays.copyOf(installedFonts, newlen); System.arraycopy(created, 0, fonts, installedFonts.length, created.length); return fonts; } }
Example #4
Source File: SunGraphicsEnvironment.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public String[] getAvailableFontFamilyNames(Locale requestedLocale) { FontManagerForSGE fm = getFontManagerForSGE(); String[] installed = fm.getInstalledFontFamilyNames(requestedLocale); /* Use a new TreeMap as used in getInstalledFontFamilyNames * and insert all the keys in lower case, so that the sort order * is the same as the installed families. This preserves historical * behaviour and inserts new families in the right place. * It would have been marginally more efficient to directly obtain * the tree map and just insert new entries, but not so much as * to justify the extra internal interface. */ TreeMap<String, String> map = fm.getCreatedFontFamilyNames(); if (map == null || map.size() == 0) { return installed; } else { for (int i=0; i<installed.length; i++) { map.put(installed[i].toLowerCase(requestedLocale), installed[i]); } String[] retval = new String[map.size()]; Object [] keyNames = map.keySet().toArray(); for (int i=0; i < keyNames.length; i++) { retval[i] = (String)map.get(keyNames[i]); } return retval; } }
Example #5
Source File: SunGraphicsEnvironment.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * Returns all fonts available in this environment. */ public Font[] getAllFonts() { FontManagerForSGE fm = getFontManagerForSGE(); Font[] installedFonts = fm.getAllInstalledFonts(); Font[] created = fm.getCreatedFonts(); if (created == null || created.length == 0) { return installedFonts; } else { int newlen = installedFonts.length + created.length; Font [] fonts = java.util.Arrays.copyOf(installedFonts, newlen); System.arraycopy(created, 0, fonts, installedFonts.length, created.length); return fonts; } }
Example #6
Source File: SunGraphicsEnvironment.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public String[] getAvailableFontFamilyNames(Locale requestedLocale) { FontManagerForSGE fm = getFontManagerForSGE(); String[] installed = fm.getInstalledFontFamilyNames(requestedLocale); /* Use a new TreeMap as used in getInstalledFontFamilyNames * and insert all the keys in lower case, so that the sort order * is the same as the installed families. This preserves historical * behaviour and inserts new families in the right place. * It would have been marginally more efficient to directly obtain * the tree map and just insert new entries, but not so much as * to justify the extra internal interface. */ TreeMap<String, String> map = fm.getCreatedFontFamilyNames(); if (map == null || map.size() == 0) { return installed; } else { for (int i=0; i<installed.length; i++) { map.put(installed[i].toLowerCase(requestedLocale), installed[i]); } String[] retval = new String[map.size()]; Object [] keyNames = map.keySet().toArray(); for (int i=0; i < keyNames.length; i++) { retval[i] = (String)map.get(keyNames[i]); } return retval; } }
Example #7
Source File: SunGraphicsEnvironment.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Returns all fonts available in this environment. */ public Font[] getAllFonts() { FontManagerForSGE fm = getFontManagerForSGE(); Font[] installedFonts = fm.getAllInstalledFonts(); Font[] created = fm.getCreatedFonts(); if (created == null || created.length == 0) { return installedFonts; } else { int newlen = installedFonts.length + created.length; Font [] fonts = java.util.Arrays.copyOf(installedFonts, newlen); System.arraycopy(created, 0, fonts, installedFonts.length, created.length); return fonts; } }
Example #8
Source File: SunGraphicsEnvironment.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public String[] getAvailableFontFamilyNames(Locale requestedLocale) { FontManagerForSGE fm = getFontManagerForSGE(); String[] installed = fm.getInstalledFontFamilyNames(requestedLocale); /* Use a new TreeMap as used in getInstalledFontFamilyNames * and insert all the keys in lower case, so that the sort order * is the same as the installed families. This preserves historical * behaviour and inserts new families in the right place. * It would have been marginally more efficient to directly obtain * the tree map and just insert new entries, but not so much as * to justify the extra internal interface. */ TreeMap<String, String> map = fm.getCreatedFontFamilyNames(); if (map == null || map.size() == 0) { return installed; } else { for (int i=0; i<installed.length; i++) { map.put(installed[i].toLowerCase(requestedLocale), installed[i]); } String[] retval = new String[map.size()]; Object [] keyNames = map.keySet().toArray(); for (int i=0; i < keyNames.length; i++) { retval[i] = (String)map.get(keyNames[i]); } return retval; } }
Example #9
Source File: SunGraphicsEnvironment.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Returns all fonts available in this environment. */ public Font[] getAllFonts() { FontManagerForSGE fm = getFontManagerForSGE(); Font[] installedFonts = fm.getAllInstalledFonts(); Font[] created = fm.getCreatedFonts(); if (created == null || created.length == 0) { return installedFonts; } else { int newlen = installedFonts.length + created.length; Font [] fonts = java.util.Arrays.copyOf(installedFonts, newlen); System.arraycopy(created, 0, fonts, installedFonts.length, created.length); return fonts; } }
Example #10
Source File: SunGraphicsEnvironment.java From hottub with GNU General Public License v2.0 | 5 votes |
public String[] getAvailableFontFamilyNames(Locale requestedLocale) { FontManagerForSGE fm = getFontManagerForSGE(); String[] installed = fm.getInstalledFontFamilyNames(requestedLocale); /* Use a new TreeMap as used in getInstalledFontFamilyNames * and insert all the keys in lower case, so that the sort order * is the same as the installed families. This preserves historical * behaviour and inserts new families in the right place. * It would have been marginally more efficient to directly obtain * the tree map and just insert new entries, but not so much as * to justify the extra internal interface. */ TreeMap<String, String> map = fm.getCreatedFontFamilyNames(); if (map == null || map.size() == 0) { return installed; } else { for (int i=0; i<installed.length; i++) { map.put(installed[i].toLowerCase(requestedLocale), installed[i]); } String[] retval = new String[map.size()]; Object [] keyNames = map.keySet().toArray(); for (int i=0; i < keyNames.length; i++) { retval[i] = (String)map.get(keyNames[i]); } return retval; } }
Example #11
Source File: SunGraphicsEnvironment.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Returns all fonts available in this environment. */ public Font[] getAllFonts() { FontManagerForSGE fm = getFontManagerForSGE(); Font[] installedFonts = fm.getAllInstalledFonts(); Font[] created = fm.getCreatedFonts(); if (created == null || created.length == 0) { return installedFonts; } else { int newlen = installedFonts.length + created.length; Font [] fonts = java.util.Arrays.copyOf(installedFonts, newlen); System.arraycopy(created, 0, fonts, installedFonts.length, created.length); return fonts; } }
Example #12
Source File: SunGraphicsEnvironment.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public String[] getAvailableFontFamilyNames(Locale requestedLocale) { FontManagerForSGE fm = getFontManagerForSGE(); String[] installed = fm.getInstalledFontFamilyNames(requestedLocale); /* Use a new TreeMap as used in getInstalledFontFamilyNames * and insert all the keys in lower case, so that the sort order * is the same as the installed families. This preserves historical * behaviour and inserts new families in the right place. * It would have been marginally more efficient to directly obtain * the tree map and just insert new entries, but not so much as * to justify the extra internal interface. */ TreeMap<String, String> map = fm.getCreatedFontFamilyNames(); if (map == null || map.size() == 0) { return installed; } else { for (int i=0; i<installed.length; i++) { map.put(installed[i].toLowerCase(requestedLocale), installed[i]); } String[] retval = new String[map.size()]; Object [] keyNames = map.keySet().toArray(); for (int i=0; i < keyNames.length; i++) { retval[i] = (String)map.get(keyNames[i]); } return retval; } }
Example #13
Source File: SunGraphicsEnvironment.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * Returns all fonts available in this environment. */ public Font[] getAllFonts() { FontManagerForSGE fm = getFontManagerForSGE(); Font[] installedFonts = fm.getAllInstalledFonts(); Font[] created = fm.getCreatedFonts(); if (created == null || created.length == 0) { return installedFonts; } else { int newlen = installedFonts.length + created.length; Font [] fonts = java.util.Arrays.copyOf(installedFonts, newlen); System.arraycopy(created, 0, fonts, installedFonts.length, created.length); return fonts; } }
Example #14
Source File: SunGraphicsEnvironment.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public String[] getAvailableFontFamilyNames(Locale requestedLocale) { FontManagerForSGE fm = getFontManagerForSGE(); String[] installed = fm.getInstalledFontFamilyNames(requestedLocale); /* Use a new TreeMap as used in getInstalledFontFamilyNames * and insert all the keys in lower case, so that the sort order * is the same as the installed families. This preserves historical * behaviour and inserts new families in the right place. * It would have been marginally more efficient to directly obtain * the tree map and just insert new entries, but not so much as * to justify the extra internal interface. */ TreeMap<String, String> map = fm.getCreatedFontFamilyNames(); if (map == null || map.size() == 0) { return installed; } else { for (int i=0; i<installed.length; i++) { map.put(installed[i].toLowerCase(requestedLocale), installed[i]); } String[] retval = new String[map.size()]; Object [] keyNames = map.keySet().toArray(); for (int i=0; i < keyNames.length; i++) { retval[i] = map.get(keyNames[i]); } return retval; } }
Example #15
Source File: SunGraphicsEnvironment.java From Bytecoder with Apache License 2.0 | 5 votes |
public String[] getAvailableFontFamilyNames(Locale requestedLocale) { FontManagerForSGE fm = getFontManagerForSGE(); String[] installed = fm.getInstalledFontFamilyNames(requestedLocale); /* Use a new TreeMap as used in getInstalledFontFamilyNames * and insert all the keys in lower case, so that the sort order * is the same as the installed families. This preserves historical * behaviour and inserts new families in the right place. * It would have been marginally more efficient to directly obtain * the tree map and just insert new entries, but not so much as * to justify the extra internal interface. */ TreeMap<String, String> map = fm.getCreatedFontFamilyNames(); if (map == null || map.size() == 0) { return installed; } else { for (int i=0; i<installed.length; i++) { map.put(installed[i].toLowerCase(requestedLocale), installed[i]); } String[] retval = new String[map.size()]; Object [] keyNames = map.keySet().toArray(); for (int i=0; i < keyNames.length; i++) { retval[i] = map.get(keyNames[i]); } return retval; } }
Example #16
Source File: SunGraphicsEnvironment.java From Bytecoder with Apache License 2.0 | 5 votes |
/** * Returns all fonts available in this environment. */ public Font[] getAllFonts() { FontManagerForSGE fm = getFontManagerForSGE(); Font[] installedFonts = fm.getAllInstalledFonts(); Font[] created = fm.getCreatedFonts(); if (created == null || created.length == 0) { return installedFonts; } else { int newlen = installedFonts.length + created.length; Font [] fonts = java.util.Arrays.copyOf(installedFonts, newlen); System.arraycopy(created, 0, fonts, installedFonts.length, created.length); return fonts; } }
Example #17
Source File: SunGraphicsEnvironment.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public String[] getAvailableFontFamilyNames(Locale requestedLocale) { FontManagerForSGE fm = getFontManagerForSGE(); String[] installed = fm.getInstalledFontFamilyNames(requestedLocale); /* Use a new TreeMap as used in getInstalledFontFamilyNames * and insert all the keys in lower case, so that the sort order * is the same as the installed families. This preserves historical * behaviour and inserts new families in the right place. * It would have been marginally more efficient to directly obtain * the tree map and just insert new entries, but not so much as * to justify the extra internal interface. */ TreeMap<String, String> map = fm.getCreatedFontFamilyNames(); if (map == null || map.size() == 0) { return installed; } else { for (int i=0; i<installed.length; i++) { map.put(installed[i].toLowerCase(requestedLocale), installed[i]); } String[] retval = new String[map.size()]; Object [] keyNames = map.keySet().toArray(); for (int i=0; i < keyNames.length; i++) { retval[i] = (String)map.get(keyNames[i]); } return retval; } }
Example #18
Source File: SunGraphicsEnvironment.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
/** * Returns all fonts available in this environment. */ public Font[] getAllFonts() { FontManagerForSGE fm = getFontManagerForSGE(); Font[] installedFonts = fm.getAllInstalledFonts(); Font[] created = fm.getCreatedFonts(); if (created == null || created.length == 0) { return installedFonts; } else { int newlen = installedFonts.length + created.length; Font [] fonts = java.util.Arrays.copyOf(installedFonts, newlen); System.arraycopy(created, 0, fonts, installedFonts.length, created.length); return fonts; } }
Example #19
Source File: SunGraphicsEnvironment.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
public String[] getAvailableFontFamilyNames(Locale requestedLocale) { FontManagerForSGE fm = getFontManagerForSGE(); String[] installed = fm.getInstalledFontFamilyNames(requestedLocale); /* Use a new TreeMap as used in getInstalledFontFamilyNames * and insert all the keys in lower case, so that the sort order * is the same as the installed families. This preserves historical * behaviour and inserts new families in the right place. * It would have been marginally more efficient to directly obtain * the tree map and just insert new entries, but not so much as * to justify the extra internal interface. */ TreeMap<String, String> map = fm.getCreatedFontFamilyNames(); if (map == null || map.size() == 0) { return installed; } else { for (int i=0; i<installed.length; i++) { map.put(installed[i].toLowerCase(requestedLocale), installed[i]); } String[] retval = new String[map.size()]; Object [] keyNames = map.keySet().toArray(); for (int i=0; i < keyNames.length; i++) { retval[i] = (String)map.get(keyNames[i]); } return retval; } }
Example #20
Source File: SunGraphicsEnvironment.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Returns all fonts available in this environment. */ public Font[] getAllFonts() { FontManagerForSGE fm = getFontManagerForSGE(); Font[] installedFonts = fm.getAllInstalledFonts(); Font[] created = fm.getCreatedFonts(); if (created == null || created.length == 0) { return installedFonts; } else { int newlen = installedFonts.length + created.length; Font [] fonts = java.util.Arrays.copyOf(installedFonts, newlen); System.arraycopy(created, 0, fonts, installedFonts.length, created.length); return fonts; } }
Example #21
Source File: SunGraphicsEnvironment.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public String[] getAvailableFontFamilyNames(Locale requestedLocale) { FontManagerForSGE fm = getFontManagerForSGE(); String[] installed = fm.getInstalledFontFamilyNames(requestedLocale); /* Use a new TreeMap as used in getInstalledFontFamilyNames * and insert all the keys in lower case, so that the sort order * is the same as the installed families. This preserves historical * behaviour and inserts new families in the right place. * It would have been marginally more efficient to directly obtain * the tree map and just insert new entries, but not so much as * to justify the extra internal interface. */ TreeMap<String, String> map = fm.getCreatedFontFamilyNames(); if (map == null || map.size() == 0) { return installed; } else { for (int i=0; i<installed.length; i++) { map.put(installed[i].toLowerCase(requestedLocale), installed[i]); } String[] retval = new String[map.size()]; Object [] keyNames = map.keySet().toArray(); for (int i=0; i < keyNames.length; i++) { retval[i] = (String)map.get(keyNames[i]); } return retval; } }
Example #22
Source File: SunGraphicsEnvironment.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Returns all fonts available in this environment. */ public Font[] getAllFonts() { FontManagerForSGE fm = getFontManagerForSGE(); Font[] installedFonts = fm.getAllInstalledFonts(); Font[] created = fm.getCreatedFonts(); if (created == null || created.length == 0) { return installedFonts; } else { int newlen = installedFonts.length + created.length; Font [] fonts = java.util.Arrays.copyOf(installedFonts, newlen); System.arraycopy(created, 0, fonts, installedFonts.length, created.length); return fonts; } }
Example #23
Source File: SunGraphicsEnvironment.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public String[] getAvailableFontFamilyNames(Locale requestedLocale) { FontManagerForSGE fm = getFontManagerForSGE(); String[] installed = fm.getInstalledFontFamilyNames(requestedLocale); /* Use a new TreeMap as used in getInstalledFontFamilyNames * and insert all the keys in lower case, so that the sort order * is the same as the installed families. This preserves historical * behaviour and inserts new families in the right place. * It would have been marginally more efficient to directly obtain * the tree map and just insert new entries, but not so much as * to justify the extra internal interface. */ TreeMap<String, String> map = fm.getCreatedFontFamilyNames(); if (map == null || map.size() == 0) { return installed; } else { for (int i=0; i<installed.length; i++) { map.put(installed[i].toLowerCase(requestedLocale), installed[i]); } String[] retval = new String[map.size()]; Object [] keyNames = map.keySet().toArray(); for (int i=0; i < keyNames.length; i++) { retval[i] = (String)map.get(keyNames[i]); } return retval; } }
Example #24
Source File: SunGraphicsEnvironment.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Returns all fonts available in this environment. */ public Font[] getAllFonts() { FontManagerForSGE fm = getFontManagerForSGE(); Font[] installedFonts = fm.getAllInstalledFonts(); Font[] created = fm.getCreatedFonts(); if (created == null || created.length == 0) { return installedFonts; } else { int newlen = installedFonts.length + created.length; Font [] fonts = java.util.Arrays.copyOf(installedFonts, newlen); System.arraycopy(created, 0, fonts, installedFonts.length, created.length); return fonts; } }
Example #25
Source File: SunGraphicsEnvironment.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public String[] getAvailableFontFamilyNames(Locale requestedLocale) { FontManagerForSGE fm = getFontManagerForSGE(); String[] installed = fm.getInstalledFontFamilyNames(requestedLocale); /* Use a new TreeMap as used in getInstalledFontFamilyNames * and insert all the keys in lower case, so that the sort order * is the same as the installed families. This preserves historical * behaviour and inserts new families in the right place. * It would have been marginally more efficient to directly obtain * the tree map and just insert new entries, but not so much as * to justify the extra internal interface. */ TreeMap<String, String> map = fm.getCreatedFontFamilyNames(); if (map == null || map.size() == 0) { return installed; } else { for (int i=0; i<installed.length; i++) { map.put(installed[i].toLowerCase(requestedLocale), installed[i]); } String[] retval = new String[map.size()]; Object [] keyNames = map.keySet().toArray(); for (int i=0; i < keyNames.length; i++) { retval[i] = (String)map.get(keyNames[i]); } return retval; } }
Example #26
Source File: SunGraphicsEnvironment.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Returns all fonts available in this environment. */ public Font[] getAllFonts() { FontManagerForSGE fm = getFontManagerForSGE(); Font[] installedFonts = fm.getAllInstalledFonts(); Font[] created = fm.getCreatedFonts(); if (created == null || created.length == 0) { return installedFonts; } else { int newlen = installedFonts.length + created.length; Font [] fonts = java.util.Arrays.copyOf(installedFonts, newlen); System.arraycopy(created, 0, fonts, installedFonts.length, created.length); return fonts; } }
Example #27
Source File: SunGraphicsEnvironment.java From hottub with GNU General Public License v2.0 | 4 votes |
public static FontManagerForSGE getFontManagerForSGE() { FontManager fm = FontManagerFactory.getInstance(); return (FontManagerForSGE) fm; }
Example #28
Source File: SunGraphicsEnvironment.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
public static FontManagerForSGE getFontManagerForSGE() { FontManager fm = FontManagerFactory.getInstance(); return (FontManagerForSGE) fm; }
Example #29
Source File: SunGraphicsEnvironment.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public static FontManagerForSGE getFontManagerForSGE() { FontManager fm = FontManagerFactory.getInstance(); return (FontManagerForSGE) fm; }
Example #30
Source File: SunGraphicsEnvironment.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
public static FontManagerForSGE getFontManagerForSGE() { FontManager fm = FontManagerFactory.getInstance(); return (FontManagerForSGE) fm; }