-
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.
feat(getting started): add NavigationPane functional
- Loading branch information
Showing
27 changed files
with
344 additions
and
163 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
This file was deleted.
Oops, something went wrong.
30 changes: 0 additions & 30 deletions
30
document/src/main/java/org/visual/document/FindDocument.java
This file was deleted.
Oops, something went wrong.
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
35 changes: 35 additions & 0 deletions
35
visual-app/src/main/java/org/visual/app/component/NavigationBar.java
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package org.visual.app.component; | ||
|
||
import javafx.event.ActionEvent; | ||
import javafx.event.EventHandler; | ||
import javafx.geometry.Pos; | ||
import javafx.scene.control.Button; | ||
import javafx.scene.layout.HBox; | ||
import javafx.scene.layout.Region; | ||
import lombok.Getter; | ||
|
||
import static javafx.scene.layout.Priority.ALWAYS; | ||
|
||
@Getter | ||
public class NavigationBar extends HBox { | ||
|
||
private final Button backButton = new Button("Back"); | ||
private final Button forwardButton = new Button("Forward"); | ||
|
||
private final Region spacer = new Region(); | ||
|
||
public NavigationBar() { | ||
super(20); | ||
setAlignment(Pos.CENTER); | ||
HBox.setHgrow(spacer, ALWAYS); | ||
getChildren().addAll(backButton, spacer, forwardButton); | ||
} | ||
|
||
public void setOnForward(EventHandler<ActionEvent> event) { | ||
forwardButton.setOnAction(event); | ||
} | ||
|
||
public void setOnBack(EventHandler<ActionEvent> event) { | ||
backButton.setOnAction(event); | ||
} | ||
} |
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
18 changes: 18 additions & 0 deletions
18
visual-app/src/main/java/org/visual/app/component/OnlyOneStackPane.java
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package org.visual.app.component; | ||
|
||
import javafx.scene.Node; | ||
import javafx.scene.layout.StackPane; | ||
import lombok.extern.slf4j.Slf4j; | ||
|
||
@Slf4j | ||
public class OnlyOneStackPane extends StackPane { | ||
|
||
public void setContent(Node content) { | ||
getChildren().clear(); | ||
getChildren().addFirst(content); | ||
} | ||
|
||
public Node getContent() { | ||
return getChildren().getFirst(); | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
visual-app/src/main/java/org/visual/app/component/Route.java
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package org.visual.app.component; | ||
|
||
import javafx.beans.DefaultProperty; | ||
import javafx.beans.property.ObjectProperty; | ||
import javafx.beans.property.SimpleObjectProperty; | ||
import javafx.beans.property.SimpleStringProperty; | ||
import javafx.beans.property.StringProperty; | ||
import javafx.scene.Node; | ||
import lombok.EqualsAndHashCode; | ||
|
||
@DefaultProperty("content") | ||
@EqualsAndHashCode | ||
public class Route { | ||
private final StringProperty path = new SimpleStringProperty(); | ||
|
||
private final ObjectProperty<Node> content = new SimpleObjectProperty<>(); | ||
|
||
public String getPath() { | ||
return path.get(); | ||
} | ||
|
||
public void setPath(String path) { | ||
this.path.set(path); | ||
} | ||
|
||
public Node getContent() { | ||
return content.get(); | ||
} | ||
|
||
public void setContent(Node content) { | ||
this.content.set(content); | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
visual-app/src/main/java/org/visual/app/constant/EventBusNaming.java
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package org.visual.app.constant; | ||
|
||
public interface EventBusNaming { | ||
|
||
String CLOSE_GETTING_START_WINDOW = "CLOSE.GETTING.START.WINDOW"; | ||
} |
Oops, something went wrong.