Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ad64f5e
Added unknown organization
RUGAlbert May 29, 2019
a2e60de
some tiny name changes and added an organization that contains all th…
rogari12 May 29, 2019
d9e798c
Refactored collapseButton
rogari12 May 31, 2019
e78ef2f
fixed unknown organizations
rogari12 May 31, 2019
6b8d21d
Added organization attributes
rogari12 May 31, 2019
60a8de1
Merge pull request #30 from emanuelean/frontend
RUGAlbert May 31, 2019
d36da90
Merge pull request #31 from emanuelean/development
BugelNiels May 31, 2019
cfed9bb
entity attributes added
rogari12 May 31, 2019
bfe017d
Tiny refactoring in entityAttributes
rogari12 May 31, 2019
b9f0b70
refactored if else in panel collapse builder
YonaBMoreda May 31, 2019
eff8386
Merge remote-tracking branch 'origin/frontend' into frontend
YonaBMoreda May 31, 2019
7effd94
node label now has a fixed width
YonaBMoreda May 31, 2019
ffa1276
fixed node label discolor problem on theme selection
YonaBMoreda Jun 3, 2019
352494c
refined the saving of theme
YonaBMoreda Jun 7, 2019
8838a6c
Add files via upload
YonaBMoreda Jun 7, 2019
7d4ec3f
Update albertDijkstra.txt
RUGAlbert Jun 11, 2019
e8be2e1
Update nielsBugel
BugelNiels Jun 11, 2019
da0bcfd
Tree view button is now hidden when clicking on an organization
rogari12 Jun 11, 2019
5f92477
Made the style of everything consistent, changed status footer to the…
rogari12 Jun 11, 2019
25797d9
updated style and added javadoc
rogari12 Jun 11, 2019
1a121c3
fixed stylesheets changing
rogari12 Jun 11, 2019
eeab18c
Merge pull request #32 from emanuelean/frontend
YonaBMoreda Jun 11, 2019
9686990
Delete vcs.xml
YonaBMoreda Jun 11, 2019
00baef9
Update EmanuelNae.txt
emanuelean Jun 11, 2019
8b489b1
Add files via upload
YonaBMoreda Jun 12, 2019
86f2251
Add files via upload
YonaBMoreda Jun 12, 2019
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
Binary file modified Architecture_Document.pdf
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,29 @@

import com.mycompany.orientdbvisualizationtool.controller.PreferencesMenuController;

public class ApperancePrefView extends View {
/**
* Used for the preference view appearance
*
* @author Yona
*/
public class AppearancePrefView extends View {

private PreferencesMenuController controller;

/**
* Constructor
*
*/
public ApperancePrefView() {
public AppearancePrefView() {
super("fxml/PreferencesMenu.fxml");
controller = fxmlLoader.getController();
}

/**
* sets the controller for the view
*
* @return controller
*/
public PreferencesMenuController getController() {
return controller;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.mycompany.orientdbvisualizationtool.View;

/**
* class for vertical and horizontal aspect ratio.
*/
public class AspectRatio {

/**
* horizontal ratio part
*/
public static int Horizontal = 16;
/**
* vertical ratio part
*/
public static int Vertical = 9;

}
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,4 @@ public Node getFirstNode() {
public Node getSecondNode() {
return secondNode;
}

/**
*
* @param firstNode start node of edge line
*/
public void setFirstNode(Node firstNode) {
this.firstNode = firstNode;
}

/**
*
* @param secondNode end node of edge line
*/
public void setSecondNode(Node secondNode) {
this.secondNode = secondNode;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
public class MainView extends View {

private MainController controller;
private boolean hasStarted = false;

/**
* Constructor
Expand All @@ -27,8 +28,11 @@ public MainView() {
*/
@Override
public void start() {
controller.setPlaceManager(PlaceManager.getInstance());
controller.addRootNodeToPane();
controller.populateTreeView("");
if (!hasStarted) {
controller.setPlaceManager(PlaceManager.getInstance());
controller.addRootNodeToPane();
controller.populateTreeView("");
hasStarted = true;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
import javafx.scene.layout.*;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
import javafx.scene.text.Font;
import javafx.scene.text.Text;

/**
* Node represents a vertex in view.
Expand All @@ -19,11 +17,8 @@
*/
public class Node extends StackPane {

private Text label;
private String nodeName;
private String nodeDisplayName;
private NodeLabel nodeLabel;
private String nodeId;
private String nodeType;
private boolean selected;
private Rectangle rectangle;
private Color DEFAULT_COLOR;
Expand All @@ -33,31 +28,23 @@ public class Node extends StackPane {
private VBox childrenVBox;
private Pane containerPane;


/**
* Constructor
*
* @param id The id of the node
* @param nodeName The name of the node
* @param NodeType The type of the node
* @param displayName The display name of the node
* @param controller The controller for this node
*/
public Node(String id, String nodeName, String NodeType, String displayName, MainController controller) {
public Node(String id, String NodeType, String displayName, MainController controller) {
this.nodeId = id;
this.selected = false;
this.expanded = false;
this.nodeName = nodeName;
this.nodeType = NodeType;
this.nodeDisplayName = displayName;
this.DEFAULT_COLOR = Color.LIGHTGRAY;
this.DEFAULT_SELECTED_COLOR = Color.LAVENDER;

this.setId("NodeStackPane");

this.label = new Text(displayName);
this.label.setFont(new Font(13));
this.label.setId("NodeLabel");

this.nodeLabel = new NodeLabel(displayName);
this.mainController = controller;
this.setRectangleProperty();
this.setLayoutProperties();
Expand All @@ -81,7 +68,6 @@ private void setLayoutProperties() {
this.containerPane = new Pane();
this.containerPane.getChildren().addAll(this, childrenVBox);
this.containerPane.layout();

}

/**
Expand All @@ -90,7 +76,7 @@ private void setLayoutProperties() {
private void setRectangleProperty() {
//rounded rectangle
this.rectangle = new Rectangle();
this.rectangle.setWidth(label.getLayoutBounds().getWidth() + 30);
this.rectangle.setWidth(nodeLabel.getMaxWidth() + 30);
this.rectangle.setHeight(40.0f);
this.rectangle.setArcWidth(40);
this.rectangle.setArcHeight(40);
Expand All @@ -99,19 +85,6 @@ private void setRectangleProperty() {
this.rectangle.setId("NodeRectangle");
}

/**
* Constructor
*
* @param id The id of the node
* @param nodeName The name of the node
* @param NodeType The type of the node
*/
public Node(String id, String nodeName, String NodeType, MainController controller) {
this(id, nodeName, NodeType, nodeName, controller);
this.DEFAULT_COLOR = Color.LIGHTGRAY;
this.DEFAULT_SELECTED_COLOR = Color.LAVENDER;
}

/**
* Sets properties for mouse events. Mouse pressed -> selection 2x Mouse
* click -> expansion of node Mouse entered/exited -> highlight node
Expand All @@ -129,17 +102,8 @@ private void setMouseListenerProperties() {
*
* @return javafx label
*/
public Text getLabel() {
return label;
}

/**
* Adds aa vertical box to a vertical box
* @param vBox The vertical box that needs to be added
*/
public void addToVBox(VBox vBox) {
vBox.getChildren().add(this);
vBox.layout();
public NodeLabel getLabel() {
return nodeLabel;
}

/**
Expand Down Expand Up @@ -182,41 +146,13 @@ public void setExpanded(Boolean expanded) {
this.expanded = expanded;
}

/**
* @param vbox The new vertical box
*/
public void setChildrenVBox(VBox vbox) {
this.childrenVBox = vbox;
}

/**
* @return The node id
*/
public String getNodeId() {
return nodeId;
}

/**
* @return The node name
*/
public String getNodeName() {
return nodeName;
}

/**
* @return The display name
*/
public String getDisplayName() {
return nodeDisplayName;
}

/**
* @return The node type
*/
public String getNodeType() {
return nodeType;
}

/**
* @return The vertical box for the children
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package com.mycompany.orientdbvisualizationtool.View;

import javafx.geometry.Pos;
import javafx.scene.control.Label;
import javafx.scene.control.OverrunStyle;
import javafx.scene.text.Font;

/**
* NodeLabel represents the label to display the name for node
*/
public class NodeLabel extends Label {

/**
* constructor
*
* @param displayName the string that the label displays
*/
public NodeLabel(String displayName) {
super();
this.setText(displayName);
this.setAlignment(Pos.CENTER);
this.setTextOverrun(OverrunStyle.LEADING_ELLIPSIS);
this.setMaxWidth(170);
this.setFont(new Font(13));
this.getStyleClass().remove("label");
this.setId("NodeLabel");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.mycompany.orientdbvisualizationtool.View;

import com.mycompany.orientdbvisualizationtool.controller.MainController;

/**
* a special control node for showing more nodes used when the number of
* children nodes is too large
*/
public class ShowMoreNode extends Node {

private int remainingNodes;

/**
* Constructor
*
* @param controller main controller for node
* @param remainingNodes The remaining nodes
*/
public ShowMoreNode(MainController controller, int remainingNodes) {
super("Show more node", "", "Show more(" + remainingNodes + ")", controller);
this.remainingNodes = remainingNodes;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ public View(String resource) {
try {
fxmlLoader = new FXMLLoader(getClass().getClassLoader().getResource(resource));
Parent root = fxmlLoader.load();
scene = new Scene(root, WIDTH, WIDTH * 9 / 16);
scene = new Scene(root, WIDTH, WIDTH * AspectRatio.Vertical / AspectRatio.Horizontal);
scene.getStylesheets().add("styles/01_DefaultStyle.css");
} catch (Exception e) {
e.printStackTrace();
e.printStackTrace(); //needs to change to some sort of error pane
}
}

Expand All @@ -49,9 +49,8 @@ public static int getWIDTH() {
public void start() {
}


/**
*
*
* @return The scene
*/
public Scene getScene() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.mycompany.orientdbvisualizationtool.View;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.stage.Stage;

Expand All @@ -13,7 +14,7 @@ public class VisApplication extends Application {

private View mainView;
private View menuView;
private ApperancePrefView appearancePrefView;
private AppearancePrefView appearancePrefView;
private Stage primaryStage;
private static VisApplication singletonInstance;

Expand All @@ -40,7 +41,7 @@ public void startUp(Stage primaryStage) {
primaryStage.setTitle("Sustainable Buildings orientDB Visualizing Tool");
mainView = new MainView();
menuView = new MainMenuView();
appearancePrefView = new ApperancePrefView();
appearancePrefView = new AppearancePrefView();
changeToMenu();
}

Expand All @@ -51,8 +52,9 @@ public void changeToMain() {
mainView.start();
primaryStage.setScene(mainView.getScene());
primaryStage.setWidth(MainView.getWIDTH());
primaryStage.setHeight(MainView.getWIDTH() * 9 / 16);
primaryStage.setHeight(MainView.getWIDTH() * AspectRatio.Vertical / AspectRatio.Horizontal);
primaryStage.centerOnScreen();
primaryStage.setResizable(true);
primaryStage.show();
}

Expand All @@ -62,8 +64,13 @@ public void changeToMain() {
public void changeToMenu() {
menuView.start();
primaryStage.setScene(menuView.getScene());
primaryStage.setResizable(true);
primaryStage.show();
}

public Scene getScene() {
return primaryStage.getScene();
}

/**
* switches to preferences
Expand All @@ -74,6 +81,9 @@ public void changeToPreferences() {
primaryStage.setScene(appearancePrefView.getScene());
primaryStage.setWidth(600);
primaryStage.setHeight(490);
primaryStage.centerOnScreen();
primaryStage.setMaximized(false);
primaryStage.setResizable(false);
primaryStage.show();
}

Expand Down
Loading