MCPcopy Create free account
hub / github.com/catabriga/graphwar / setScreen

Method setScreen

src/Graphwar/GraphUI.java:62–84  ·  view source on GitHub ↗
(int screenNum)

Source from the content-addressed store, hash-verified

60 }
61
62 public void setScreen(int screenNum)
63 {
64 if(currentScreenIndex != screenNum)
65 {
66 if(currentScreen instanceof StartStopPanel)
67 {
68 ((StartStopPanel) currentScreen).stopPanel();
69 }
70
71 this.removeAll();
72 this.add(screens[screenNum]);
73 this.revalidate();
74 this.repaint();
75
76 currentScreen = screens[screenNum];
77 currentScreenIndex = screenNum;
78
79 if(currentScreen instanceof StartStopPanel)
80 {
81 ((StartStopPanel) currentScreen).startPanel();
82 }
83 }
84 }
85
86 public JPanel getScreen(int screenNum)
87 {

Callers 11

actionPerformedMethod · 0.80
initMethod · 0.80
joinGlobalMethod · 0.80
createGameMethod · 0.80
actionPerformedMethod · 0.80
actionPerformedMethod · 0.80
mouseReleasedMethod · 0.80
startGameMessageMethod · 0.80
finishGameMessageMethod · 0.80
stopGameMethod · 0.80
actionPerformedMethod · 0.80

Calls 2

stopPanelMethod · 0.65
startPanelMethod · 0.65

Tested by

no test coverage detected