-
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(app): update editor command manager
- Loading branch information
Showing
54 changed files
with
1,622 additions
and
623 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 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
23 changes: 0 additions & 23 deletions
23
visual-app/src/main/java/org/visual/app/component/EditorContainer.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
44 changes: 18 additions & 26 deletions
44
visual-app/src/main/java/org/visual/app/util/CreateDiagram.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 |
---|---|---|
@@ -1,34 +1,26 @@ | ||
package org.visual.app.util; | ||
|
||
import lombok.experimental.UtilityClass; | ||
import lombok.val; | ||
import org.visual.data.structure.diagram.VisualDiagram; | ||
import org.visual.data.structure.diagram.VisualDiagramMetadata; | ||
import org.visual.data.structure.graph.VisualGraphicalObject; | ||
import org.visual.data.structure.graph.VisualProperties; | ||
|
||
import java.util.Date; | ||
import java.util.UUID; | ||
|
||
@UtilityClass | ||
public class CreateDiagram { | ||
|
||
public VisualDiagram createDefaultDiagram() { | ||
val meta = VisualDiagramMetadata.builder().createAt(new Date()) | ||
.lastModifiedAt(new Date()) | ||
.title("untitled") | ||
.build(); | ||
val prop = VisualProperties | ||
.builder() | ||
.color("red") | ||
.borderWidth(1) | ||
.borderColor("non") | ||
.width(20.0) | ||
.height(20.0) | ||
.build(); | ||
VisualGraphicalObject.builder().id(UUID.randomUUID().toString()).type("rec").x(20).y(20).properties(prop).build(); | ||
return VisualDiagram.builder().version("0.1") | ||
.metadata(meta) | ||
.build(); | ||
} | ||
// public VisualDiagram createDefaultDiagram() { | ||
// val meta = VisualDiagramMetadata.builder().createAt(new Date()) | ||
// .lastModifiedAt(new Date()) | ||
// .title("untitled") | ||
// .build(); | ||
// val prop = VisualProperties | ||
// .builder() | ||
// .color("red") | ||
// .borderWidth(1) | ||
// .borderColor("non") | ||
// .width(20.0) | ||
// .height(20.0) | ||
// .build(); | ||
// VisualGraphicalObject.builder().id(UUID.randomUUID().toString()).type("rec").x(20).y(20).properties(prop).build(); | ||
// return VisualDiagram.builder().version("0.1") | ||
// .metadata(meta) | ||
// .build(); | ||
// } | ||
} |
15 changes: 2 additions & 13 deletions
15
visual-app/src/main/resources/org/visual/app/view/workspace/Editor.fxml
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,23 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<?import javafx.scene.control.Button?> | ||
<?import javafx.scene.control.ScrollPane?> | ||
<?import javafx.scene.layout.AnchorPane?> | ||
<?import javafx.scene.layout.StackPane?> | ||
<?import org.visual.app.component.GridBackground?> | ||
<?import org.visual.app.component.EditorContainer?> | ||
<?import javafx.scene.control.Label?> | ||
<?import javafx.scene.Group?> | ||
<?import org.visual.editor.view.EditorContainer?> | ||
<StackPane xmlns="http://javafx.com/javafx" | ||
xmlns:fx="http://javafx.com/fxml" | ||
fx:controller="org.visual.app.controller.workspace.EditorController" | ||
style="-fx-background-color: white;" | ||
> | ||
<ScrollPane fx:id="root" fitToHeight="true" fitToWidth="true" vbarPolicy="ALWAYS" hbarPolicy="ALWAYS"> | ||
<Group> | ||
<EditorContainer fx:id="container"/> | ||
</Group> | ||
</ScrollPane> | ||
<Button text="floating" StackPane.alignment="TOP_RIGHT" fx:id="floatingButton"/> | ||
|
||
<EditorContainer fx:id="container" minWidth="0" minHeight="0" maxWidth="+Infinity" maxHeight="+Infinity"/> | ||
</StackPane> |
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
5 changes: 5 additions & 0 deletions
5
visual-data-structure/src/main/java/org/visual/data/structure/graph/Classifiable.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,5 @@ | ||
package org.visual.data.structure.graph; | ||
|
||
public interface Classifiable { | ||
String type(); | ||
} |
16 changes: 16 additions & 0 deletions
16
visual-data-structure/src/main/java/org/visual/data/structure/graph/Connection.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,16 @@ | ||
package org.visual.data.structure.graph; | ||
|
||
import org.immutables.value.Value; | ||
import org.visual.data.structure.style.VisualDataStructureStyle; | ||
|
||
import java.util.List; | ||
|
||
@Value.Immutable | ||
@VisualDataStructureStyle | ||
public interface Connection extends Identifiable, Classifiable { | ||
Connector source(); | ||
|
||
Connector target(); | ||
|
||
List<Joint> joints(); | ||
} |
16 changes: 16 additions & 0 deletions
16
visual-data-structure/src/main/java/org/visual/data/structure/graph/Connector.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,16 @@ | ||
package org.visual.data.structure.graph; | ||
|
||
import java.util.List; | ||
|
||
public interface Connector extends GraphicalObject { | ||
|
||
Node parent(); | ||
|
||
List<Connection> connections(); | ||
|
||
void addConnection(Connection connection); | ||
|
||
void removeConnection(Connection connection); | ||
|
||
Boolean isConnectionDetachedOnDrag(); | ||
} |
Oops, something went wrong.