MCPcopy Create free account
hub / github.com/akeranen/the-one / init

Method init

gui/SimMenuBar.java:88–133  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

86 }
87
88 private void init() {
89 JMenu pfMenu = new JMenu("Playfield options");
90 JMenu pfToolsMenu = new JMenu("Tools");
91 JMenu help = new JMenu("Help");
92 JMenu nodeFilters = new JMenu("Add node filter");
93 Settings settings = new Settings(UNDERLAY_NS);
94
95 if (settings.contains("fileName")) {
96 // create underlay image menu item only if filename is specified
97 enableBgImage = createCheckItem(pfMenu,"Show underlay image",
98 false, null);
99 }
100
101 settings.setNameSpace(gui.MainWindow.GUI_NS);
102
103 showNodeName = createCheckItem(pfMenu, "Show node name strings",
104 true, SHOW_NODE_NAMESTR_S);
105 showNodeCoverage = createCheckItem(pfMenu,
106 "Show node radio coverages", true, SHOW_RADIO_COVERAGES_S);
107 showNodeConnections = createCheckItem(pfMenu,
108 "Show node connections", true, SHOW_CONNECTIONS_S);
109 showBuffer = createCheckItem(pfMenu,
110 "Show message buffer", true, SHOW_BUFFER_S);
111 focusOnClick = createCheckItem(pfMenu,
112 "Focus to closest node on mouse click", false,FOCUS_ON_CLICK_S);
113
114 enableMapGraphic = createCheckItem(pfMenu,"Show map graphic",
115 true, null);
116 autoClearOverlay = createCheckItem(pfMenu, "Autoclear overlay",
117 true, null);
118 clearOverlay = createMenuItem(pfToolsMenu, "Clear overlays");
119
120
121 pfToolsMenu.addSeparator();
122 addNodeMessageFilter = createMenuItem(nodeFilters, "message filter");
123 pfToolsMenu.add(nodeFilters);
124 clearNodeFilters = createMenuItem(pfToolsMenu, "Clear node filters");
125
126 updatePlayfieldSettings();
127
128 about = createMenuItem(help,"about");
129 this.add(pfMenu);
130 this.add(pfToolsMenu);
131 this.add(Box.createHorizontalGlue());
132 this.add(help);
133 }
134
135 private JMenuItem createMenuItem(Container c, String txt) {
136 JMenuItem i = new JMenuItem(txt);

Callers 1

SimMenuBarMethod · 0.95

Calls 6

containsMethod · 0.95
createCheckItemMethod · 0.95
setNameSpaceMethod · 0.95
createMenuItemMethod · 0.95
addMethod · 0.80

Tested by

no test coverage detected