-
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.
- Loading branch information
Showing
8 changed files
with
46 additions
and
55 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
Binary file not shown.
Binary file not shown.
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,30 +1,19 @@ | ||
package controller; | ||
|
||
import javafx.beans.property.ObjectProperty; | ||
import javafx.beans.property.SimpleObjectProperty; | ||
import javafx.scene.layout.GridPane; | ||
|
||
/** | ||
* Base class for all panes that are to be shown inside main window | ||
* Base class for all regions controlled by our main controller | ||
*/ | ||
public class ControlledGridPane extends GridPane{ | ||
// Observable main controller object | ||
protected ObjectProperty<UserAccountControl> mainController = new SimpleObjectProperty<>(); | ||
public class ControlledGridPane extends GridPane{ | ||
protected UserAccountControl mainController; // Reference to main controller | ||
|
||
public void setMainController(UserAccountControl c) { | ||
this.mainController.set(c); | ||
this.mainController = c; | ||
} | ||
|
||
public UserAccountControl getMainController() { | ||
return this.mainController.get(); | ||
} | ||
|
||
public final ObjectProperty<UserAccountControl> getMainControllerPropery() { | ||
return this.mainController; | ||
} | ||
|
||
public ControlledGridPane() { | ||
this.needsLayoutProperty().addListener((e)->this.requestFocus()); | ||
} | ||
} | ||
|
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
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