(String args[])
| 354 | DEFAULT_BACKGROUND = new ColorUIResource(255, 255, 255); |
| 355 | |
| 356 | public static void main(String args[]) { |
| 357 | if (alreadyRunning()) { //if the app is already running, it terminates the current instance |
| 358 | System.exit(1); |
| 359 | } |
| 360 | if (args.length == 1 && args[0].equalsIgnoreCase("-autostartup")) { //if the app is started with the -autostartup flag, it doesn't create an empty note (on windows the app is run when the system starts and it would be silly to create a new note when the system boots and there are no saved notes) |
| 361 | noAutoCreate = true; |
| 362 | } |
| 363 | //apply swing MetalTheme, scroll down and ignore |
| 364 | try { |
| 365 | //<editor-fold defaultstate="collapsed" desc="MetalTheme"> |
| 366 | MetalLookAndFeel.setCurrentTheme(new MetalTheme() { |
| 367 | @Override |
| 368 | protected ColorUIResource getPrimary1() { |
| 369 | return METAL_PRIMARY1; |
| 370 | } |
| 371 | |
| 372 | @Override |
| 373 | protected ColorUIResource getPrimary2() { |
| 374 | return METAL_PRIMARY2; |
| 375 | } |
| 376 | |
| 377 | @Override |
| 378 | protected ColorUIResource getPrimary3() { |
| 379 | return METAL_PRIMARY3; |
| 380 | } |
| 381 | |
| 382 | @Override |
| 383 | protected ColorUIResource getSecondary1() { |
| 384 | return METAL_SECONDARY1; |
| 385 | } |
| 386 | |
| 387 | @Override |
| 388 | protected ColorUIResource getSecondary2() { |
| 389 | return METAL_SECONDARY2; |
| 390 | } |
| 391 | |
| 392 | @Override |
| 393 | protected ColorUIResource getSecondary3() { |
| 394 | return DEFAULT_BACKGROUND; |
| 395 | } |
| 396 | |
| 397 | @Override |
| 398 | public String getName() { |
| 399 | return "Metal Theme"; |
| 400 | } |
| 401 | |
| 402 | private final FontUIResource REGULAR_FONT = new FontUIResource(Main.BASE_FONT), |
| 403 | SMALL_FONT = new FontUIResource(Main.SMALL_FONT); |
| 404 | |
| 405 | @Override |
| 406 | public FontUIResource getControlTextFont() { |
| 407 | return REGULAR_FONT; |
| 408 | } |
| 409 | |
| 410 | @Override |
| 411 | public FontUIResource getSystemTextFont() { |
| 412 | return REGULAR_FONT; |
| 413 | } |
nothing calls this directly
no test coverage detected