-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* bind top menu to application resize * bind tree view to application resize
- Loading branch information
Showing
3 changed files
with
79 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,30 @@ | ||
package gui; | ||
|
||
public class Controller { | ||
import javafx.fxml.FXML; | ||
import javafx.scene.control.MenuItem; | ||
|
||
import java.util.ResourceBundle; | ||
|
||
public class Controller{ | ||
@FXML | ||
private MenuItem menuOpen; | ||
|
||
@FXML private ResourceBundle resources; | ||
|
||
/*@FXML | ||
private void initialize() { | ||
menuOpen.setOnAction(openMenu()); | ||
} | ||
private EventHandler<ActionEvent> openMenu() { | ||
EventHandler<ActionEvent> evenHand = new EventHandler<ActionEvent>() { | ||
@Override | ||
public void handle(ActionEvent event) { | ||
menuOpen.setText("Somewhat right..."); | ||
} | ||
}; | ||
return evenHand; | ||
}*/ | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,46 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<?import javafx.scene.control.*?> | ||
<?import javafx.scene.layout.AnchorPane?> | ||
<!--suppress JavaFxDefaultTag, JavaFxDefaultTag, JavaFxDefaultTag, JavaFxDefaultTag, JavaFxDefaultTag, JavaFxDefaultTag --> | ||
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" | ||
prefWidth="600.0" xmlns="http://javafx.com/javafx/8"> | ||
<MenuBar prefHeight="25.0" prefWidth="600.0"> | ||
<!--suppress JavaFxDefaultTag --> | ||
<menus> | ||
<Menu mnemonicParsing="false" text="File"> | ||
<!--suppress JavaFxDefaultTag --> | ||
<items> | ||
<MenuItem mnemonicParsing="false" text="Close"/> | ||
</items> | ||
</Menu> | ||
<Menu mnemonicParsing="false" text="Edit"> | ||
<!--suppress JavaFxDefaultTag --> | ||
<items> | ||
<MenuItem mnemonicParsing="false" text="Delete"/> | ||
</items> | ||
</Menu> | ||
<Menu mnemonicParsing="false" text="View"> | ||
<!--suppress JavaFxDefaultTag --> | ||
<items> | ||
<MenuItem mnemonicParsing="false" text="About"/> | ||
</items> | ||
</Menu> | ||
<Menu mnemonicParsing="false" text="Window"> | ||
<!--suppress JavaFxDefaultTag --> | ||
<items> | ||
<MenuItem mnemonicParsing="false" text="Action 1"/> | ||
</items> | ||
</Menu> | ||
<Menu mnemonicParsing="false" text="Help"> | ||
<!--suppress JavaFxDefaultTag --> | ||
<items> | ||
<MenuItem mnemonicParsing="false" text="Action 1"/> | ||
</items> | ||
</Menu> | ||
</menus> | ||
</MenuBar> | ||
|
||
<?import javafx.scene.control.*?> | ||
<?import javafx.scene.layout.*?> | ||
<AnchorPane xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gui.Controller"> | ||
<children> | ||
<MenuBar prefHeight="25.0" prefWidth="789.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> | ||
<!--suppress JavaFxDefaultTag --> | ||
<menus> | ||
<Menu mnemonicParsing="false" text="File"> | ||
<!--suppress JavaFxDefaultTag --> | ||
<items> | ||
<MenuItem fx:id="menuOpen" mnemonicParsing="false" text="Open" /> | ||
</items> | ||
</Menu> | ||
<Menu mnemonicParsing="false" text="Edit"> | ||
<!--suppress JavaFxDefaultTag --> | ||
<items> | ||
<MenuItem mnemonicParsing="false" text="Delete" /> | ||
</items> | ||
</Menu> | ||
<Menu mnemonicParsing="false" text="View"> | ||
<!--suppress JavaFxDefaultTag --> | ||
<items> | ||
<MenuItem mnemonicParsing="false" text="About" /> | ||
</items> | ||
</Menu> | ||
<Menu mnemonicParsing="false" text="Window"> | ||
<!--suppress JavaFxDefaultTag --> | ||
<items> | ||
<MenuItem mnemonicParsing="false" text="Action 1" /> | ||
</items> | ||
</Menu> | ||
<Menu mnemonicParsing="false" text="Help"> | ||
<!--suppress JavaFxDefaultTag --> | ||
<items> | ||
<MenuItem mnemonicParsing="false" text="Action 1" /> | ||
</items> | ||
</Menu> | ||
</menus> | ||
</MenuBar> | ||
<TreeView layoutY="25.0" prefHeight="552.0" prefWidth="200.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="25.0" /> | ||
</children> | ||
</AnchorPane> |