MCPcopy Create free account
hub / github.com/DeNA/PacketProxy / setLookandFeel

Method setLookandFeel

src/main/java/core/packetproxy/gui/GUIMain.java:179–207  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

177 }
178
179 private void setLookandFeel() throws Exception {
180 if (PacketProxyUtility.getInstance().isUnix()) {
181
182 System.setProperty("awt.useSystemAAFontSettings", "on");
183 System.setProperty("swing.aatext", "true");
184 }
185
186 for (LookAndFeelInfo clInfo : UIManager.getInstalledLookAndFeels()) {
187
188 if ("Nimbus".equals(clInfo.getName())) {
189
190 UIManager.setLookAndFeel(clInfo.getClassName());
191 break;
192 }
193 }
194
195 // フォント設定をデフォルトに復元(シンタックスハイライト機能による影響を防ぐため)
196 FontManager.getInstance().restoreUIFont();
197 FontManager.getInstance().restoreFont();
198
199 UIManager.getLookAndFeelDefaults().put("defaultFont", FontManager.getInstance().getUIFont());
200 // OptionPaneのロケール
201 JOptionPane.setDefaultLocale(I18nString.getLocale());
202
203 setIconForWindows();
204 addShortcutForWindows();
205 addShortcutForMac();
206 addDockIconForMac();
207 }
208
209 /**
210 * Windowsにアイコンを表示する

Callers 1

GUIMainMethod · 0.95

Calls 14

getInstanceMethod · 0.95
getInstanceMethod · 0.95
getLocaleMethod · 0.95
setIconForWindowsMethod · 0.95
addShortcutForWindowsMethod · 0.95
addShortcutForMacMethod · 0.95
addDockIconForMacMethod · 0.95
isUnixMethod · 0.80
restoreUIFontMethod · 0.80
restoreFontMethod · 0.80
getUIFontMethod · 0.80
getNameMethod · 0.65

Tested by

no test coverage detected