198 @Override |
198 @Override |
199 public boolean isDisplayLocal() { |
199 public boolean isDisplayLocal() { |
200 return true; |
200 return true; |
201 } |
201 } |
202 |
202 |
203 private Font[] allFontsWithLogical; |
|
204 static String[] sLogicalFonts = { "Serif", "SansSerif", "Monospaced", "Dialog", "DialogInput" }; |
203 static String[] sLogicalFonts = { "Serif", "SansSerif", "Monospaced", "Dialog", "DialogInput" }; |
205 |
204 |
206 @Override |
205 @Override |
207 public Font[] getAllFonts() { |
206 public Font[] getAllFonts() { |
208 if (allFontsWithLogical == null) |
207 |
|
208 Font[] newFonts; |
|
209 Font[] superFonts = super.getAllFonts(); |
|
210 |
|
211 int numLogical = sLogicalFonts.length; |
|
212 int numOtherFonts = superFonts.length; |
|
213 |
|
214 newFonts = new Font[numOtherFonts + numLogical]; |
|
215 System.arraycopy(superFonts,0,newFonts,numLogical,numOtherFonts); |
|
216 |
|
217 for (int i = 0; i < numLogical; i++) |
209 { |
218 { |
210 Font[] newFonts; |
219 newFonts[i] = new Font(sLogicalFonts[i], Font.PLAIN, 1); |
211 Font[] superFonts = super.getAllFonts(); |
220 } |
212 |
221 return newFonts; |
213 int numLogical = sLogicalFonts.length; |
|
214 int numOtherFonts = superFonts.length; |
|
215 |
|
216 newFonts = new Font[numOtherFonts + numLogical]; |
|
217 System.arraycopy(superFonts,0,newFonts,numLogical,numOtherFonts); |
|
218 |
|
219 for (int i = 0; i < numLogical; i++) |
|
220 { |
|
221 newFonts[i] = new Font(sLogicalFonts[i], Font.PLAIN, 1); |
|
222 } |
|
223 allFontsWithLogical = newFonts; |
|
224 } |
|
225 return java.util.Arrays.copyOf(allFontsWithLogical, allFontsWithLogical.length); |
|
226 } |
222 } |
227 |
223 |
228 } |
224 } |