4848public class MainController {
4949
5050 List <String > registered_projects = new ArrayList <>();
51- String current_project_path = "" ;
51+ String currentProjectPath = "" ;
5252
5353 @ FXML
54- private Button date_button ;
54+ private Button dateButton ;
5555
5656 @ FXML
57- private Button time_button ;
57+ private Button timeButton ;
5858
5959 @ FXML
6060 private TreeView <File > file_explorer ;
6161
6262 @ FXML
63- private TabPane tab_pane ;
63+ private TabPane tabPane ;
6464
6565 @ FXML
6666 private Menu RegisteredProjectsListMenu ;
@@ -100,7 +100,7 @@ public void run() {
100100 });
101101 }
102102
103- void add_subdirs (String directory , TreeItem <File > treeItem ) throws IOException {
103+ void addSubdirs (String directory , TreeItem <File > treeItem ) throws IOException {
104104 // List all sub dirs
105105 File [] directories = new File (directory ).listFiles (File ::isDirectory );
106106 for (File dir : directories ) {
@@ -119,7 +119,7 @@ void add_subdirs(String directory, TreeItem<File> treeItem) throws IOException {
119119 }
120120 }
121121
122- void open_registered_project (String directory ) {
122+ void openRegisteredProject (String directory ) {
123123 current_project_path = directory ;
124124 Path rootFile = Paths .get (directory );
125125 TreeItem <File > rootItem = new TreeItem <>(new File (directory ));
@@ -134,7 +134,7 @@ void open_registered_project(String directory) {
134134 }
135135
136136 @ FXML
137- void add_project (ActionEvent event ) {
137+ void addProject (ActionEvent event ) {
138138 // Register a new project and open it
139139 DirectoryChooser chooser = new DirectoryChooser ();
140140 File project = chooser .showDialog (null );
@@ -144,7 +144,7 @@ void add_project(ActionEvent event) {
144144 projectMenuItem .setText (Paths .get (project .toString ()).getFileName ().toString ());
145145 projectMenuItem .setOnAction (e -> {
146146 // Set open action to open the project, when clicked
147- open_registered_project (project .toString ());
147+ openRegisteredProject (project .toString ());
148148 });
149149 RegisteredProjectsListMenu .getItems ().add (projectMenuItem );
150150 open_registered_project (project .toString ());
@@ -157,7 +157,7 @@ void add_project(ActionEvent event) {
157157 }
158158
159159 @ FXML
160- void delete_current_project (ActionEvent event ) {
160+ void deleteCurrentProject (ActionEvent event ) {
161161 // Remove the current project from the registered list
162162 registered_projects .remove (current_project_path );
163163 createProjectList ();
@@ -186,70 +186,70 @@ void createProjectList() {
186186 }
187187
188188 @ FXML
189- void close_current_project (ActionEvent event ) {
189+ void closeCurrentProject (ActionEvent event ) {
190190 close_project ();
191191 }
192192
193- void close_project () {
193+ void closeProject () {
194194 // Close the file explorer
195- file_explorer .setRoot (null );
196- current_project_path = "" ;
195+ fileExplorer .setRoot (null );
196+ currentProjectPath = "" ;
197197 }
198198
199199 @ FXML
200- void open_new_window (ActionEvent event ) {
200+ void openNewWindow (ActionEvent event ) {
201201 try {
202202 // Open a new window in same process
203203 Parent root = FXMLLoader .load (getClass ().getResource ("/fxml/MainView.fxml" ));
204204 Scene scene = new Scene (root , 640 , 480 );
205205 Stage stage = new Stage ();
206206 stage .setScene (scene );
207- stage .setTitle ("Ainm - 0.01 / Todolist " );
207+ stage .setTitle ("Idaes - 0.8 - Alpha " );
208208 stage .show ();
209209 } catch (IOException e ) {
210210 e .printStackTrace ();
211211 }
212212 }
213213
214214 @ FXML
215- void show_github_site (ActionEvent event ) throws IOException , URISyntaxException {
215+ void showGithubSite (ActionEvent event ) throws IOException , URISyntaxException {
216216 // Shows the github side of the project in the current standard browser
217217 if (Desktop .isDesktopSupported () && Desktop .getDesktop ().isSupported (Desktop .Action .BROWSE )) {
218218 Desktop .getDesktop ().browse (new URI ("https://github.com/BenHerbst/ainm" ));
219219 }
220220 }
221221
222222 @ FXML
223- void close_current_window (ActionEvent event ) {
223+ void closeCurrentWindow (ActionEvent event ) {
224224 // Close the current stage
225- date_button .getScene ().getWindow ().hide ();
225+ dateButton .getScene ().getWindow ().hide ();
226226 }
227227
228228 @ FXML
229- void close_app (ActionEvent event ) {
229+ void closeApp (ActionEvent event ) {
230230 // Fully close the app
231231 Platform .exit ();
232232 System .exit (0 );
233233 }
234234
235235 @ FXML
236- void open_default_browser (ActionEvent event ) throws IOException , URISyntaxException {
236+ void openDefaultBrowser (ActionEvent event ) throws IOException , URISyntaxException {
237237 // Shows the github side of the project in the current standard browser
238238 if (Desktop .isDesktopSupported () && Desktop .getDesktop ().isSupported (Desktop .Action .BROWSE )) {
239239 Desktop .getDesktop ().browse (new URI ("https://duckduckgo.com/" ));
240240 }
241241 }
242242
243243 @ FXML
244- void open_default_mail (ActionEvent event ) throws IOException , URISyntaxException {
244+ void openDefautMail (ActionEvent event ) throws IOException , URISyntaxException {
245245 // Shows the github side of the project in the current standard browser
246246 if (Desktop .isDesktopSupported () && Desktop .getDesktop ().isSupported (Desktop .Action .BROWSE )) {
247247 Desktop .getDesktop ().mail ();
248248 }
249249 }
250250
251251 @ FXML
252- void open_file_explorer (ActionEvent event ) {
252+ void openFileExplorer (ActionEvent event ) {
253253 // Open the file explorer in the user directory
254254 File file = new File (System .getProperty ("user.home" ));
255255 try {
@@ -263,7 +263,7 @@ void open_file_explorer(ActionEvent event) {
263263 }
264264
265265 @ FXML
266- void add_tab (ActionEvent event ) throws IOException {
266+ void addTab (ActionEvent event ) throws IOException {
267267 // Open a new empty tab
268268 Tab newTab = new Tab ();
269269 newTab .setText ("New tab" );
@@ -274,27 +274,27 @@ void add_tab(ActionEvent event) throws IOException {
274274 }
275275
276276 @ FXML
277- void close_current_tab (ActionEvent event ) {
277+ void closeCurrentTab (ActionEvent event ) {
278278 // Close the current tab
279279 SingleSelectionModel <Tab > selectionModel = tab_pane .getSelectionModel ();
280280 Tab currentTab = selectionModel .getSelectedItem ();
281281 tab_pane .getTabs ().remove (currentTab );
282282 }
283283
284284 @ FXML
285- void close_all_tabs (ActionEvent event ) {
285+ void closeAllTabs (ActionEvent event ) {
286286 // Close all tabs of tabpane
287287 tab_pane .getTabs ().clear ();
288288 }
289289
290290 @ FXML
291- void close_file (ActionEvent event ) {
291+ void closeFile (ActionEvent event ) {
292292 // Closes the current file and make the tab content empty
293293 get_current_tab ().setContent (null );
294294 }
295295
296296 @ FXML
297- void new_todo_list (ActionEvent event ) throws IOException {
297+ void newTosoList (ActionEvent event ) throws IOException {
298298 if (current_project_path != "" ) {
299299 // Shows the create a new file dialog
300300 FXMLLoader loader = new FXMLLoader ();
0 commit comments