Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.control.CheckMenuItem;
import javafx.scene.control.MenuItem;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;
Expand All @@ -16,6 +17,12 @@ public class RootLayoutHandler extends DataHandler {
@FXML
private MenuItem aboutMenuItem;

@FXML
private CheckMenuItem englishCheckItem;

@FXML
private CheckMenuItem russianCheckItem;

@FXML
private void createLocalCommunity(){
terminateObserver();
Expand Down Expand Up @@ -65,6 +72,16 @@ private void showInfoWindow(){
launchDialog();
aboutMenuItem.setDisable(true);
}
//TODO activate one menuItem and set unselected others + change the whole page view
@FXML
private void chooseRussianLanguage(){

}
//TODO activate one menuItem and set unselected others + change the whole page view
@FXML
private void chooseEnglishLanguage(){

}

private void launchDialog(){
FXMLLoader loader = new FXMLLoader();
Expand Down
11 changes: 11 additions & 0 deletions src/main/java/org/javaFX/view/rootLayout.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@
<MenuItem fx:id="aboutMenuItem" mnemonicParsing="false" onAction="#showInfoWindow" text="Info" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Settings">
<items>
<Menu mnemonicParsing="false" text="Language">
<items>
<CheckMenuItem fx:id="englishCheckItem" mnemonicParsing="false" onAction="#chooseEnglishLanguage" text="English" />
<CheckMenuItem fx:id="russianCheckItem" mnemonicParsing="false" onAction="#chooseRussianLanguage" text="Russian" />
</items>
</Menu>
<MenuItem mnemonicParsing="false" text="Action 1" />
</items>
</Menu>
</menus>
</MenuBar>
</top>
Expand Down