MCPcopy Index your code
hub / github.com/adolfintel/NoteBot / main

Method main

StickyNotes/src/com/dosse/stickynotes/Main.java:356–514  ·  view source on GitHub ↗
(String args[])

Source from the content-addressed store, hash-verified

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 }

Callers

nothing calls this directly

Calls 4

alreadyRunningMethod · 0.95
loadStateMethod · 0.95
newNoteMethod · 0.95
saveStateMethod · 0.95

Tested by

no test coverage detected