Skip to content

Commit

Permalink
Null-safe Dragmanager
Browse files Browse the repository at this point in the history
functioning null-safe code
  • Loading branch information
Tomáš Korima committed Jul 19, 2021
1 parent 53d4e2a commit 95cd4ef
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 10 deletions.
2 changes: 1 addition & 1 deletion api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>de.tesis.dynaware</groupId>
<artifactId>de.tesis.dynaware.grapheditor</artifactId>
<version>1.3.1</version>
<version>1.3.2</version>
</parent>
<name>${component.name}::API</name>

Expand Down
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>de.tesis.dynaware</groupId>
<artifactId>de.tesis.dynaware.grapheditor</artifactId>
<version>1.3.1</version>
<version>1.3.2</version>
</parent>
<name>${component.name}::Core</name>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import java.util.HashMap;
import java.util.Map;
import java.util.Optional;

import javafx.beans.value.ChangeListener;
import javafx.scene.layout.Region;
Expand Down Expand Up @@ -274,7 +275,10 @@ private void addPositionListeners(final Region master, final GModel model) {
if (nodeSkin.isSelected() && !nodeSkin.getRoot().equals(master)) {

final Region slave1 = nodeSkin.getRoot();
slave1.setLayoutX((Double) n + nodeLayoutXOffsets.get(node));
Double offset = nodeLayoutXOffsets.get(node);
if(offset != null) {
slave1.setLayoutX((Double) n + offset);
}
}
}

Expand All @@ -287,7 +291,10 @@ private void addPositionListeners(final Region master, final GModel model) {
if (jointSkin.isSelected() && !jointSkin.getRoot().equals(master)) {

final Region slave2 = jointSkin.getRoot();
slave2.setLayoutX((Double) n + jointLayoutXOffsets.get(joint));
Double offset = jointLayoutXOffsets.get(joint);
if(offset != null) {
slave2.setLayoutX((Double) n + offset);
}
}
}
}
Expand All @@ -302,7 +309,10 @@ private void addPositionListeners(final Region master, final GModel model) {
if (nodeSkin.isSelected() && !nodeSkin.getRoot().equals(master)) {

final Region slave1 = nodeSkin.getRoot();
slave1.setLayoutY((Double) n + nodeLayoutYOffsets.get(node));
Double offset = nodeLayoutYOffsets.get(node);
if(offset != null) {
slave1.setLayoutY((Double) n + offset);
}
}
}

Expand All @@ -315,7 +325,10 @@ private void addPositionListeners(final Region master, final GModel model) {
if (jointSkin.isSelected() && !jointSkin.getRoot().equals(master)) {

final Region slave2 = jointSkin.getRoot();
slave2.setLayoutY((Double) n + jointLayoutYOffsets.get(joint));
Double offset = jointLayoutYOffsets.get(joint);
if(offset != null) {
slave2.setLayoutY((Double) n + offset);
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>de.tesis.dynaware</groupId>
<artifactId>de.tesis.dynaware.grapheditor</artifactId>
<version>1.3.1</version>
<version>1.3.2</version>
</parent>
<name>${component.name}::Demo</name>

Expand Down
2 changes: 1 addition & 1 deletion model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>de.tesis.dynaware</groupId>
<artifactId>de.tesis.dynaware.grapheditor</artifactId>
<version>1.3.1</version>
<version>1.3.2</version>
</parent>
<name>${component.name}::Model</name>

Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<name>${component.name}</name>
<groupId>de.tesis.dynaware</groupId>
<artifactId>de.tesis.dynaware.grapheditor</artifactId>
<version>1.3.1</version>
<version>1.3.2</version>
<packaging>pom</packaging>

<description>A library for creating and editing graph-like diagrams in JavaFX</description>
Expand Down Expand Up @@ -41,7 +41,7 @@

<properties>
<component.name>Graph Editor</component.name>
<manifest.bundle.version>1.3.1-${maven.build.timestamp}</manifest.bundle.version>
<manifest.bundle.version>1.3.2-${maven.build.timestamp}</manifest.bundle.version>
<maven.build.timestamp.format>yyyymmddhhmm</maven.build.timestamp.format>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<compiler.version>1.8</compiler.version>
Expand Down

0 comments on commit 95cd4ef

Please sign in to comment.