Skip to content

Commit

Permalink
fixes user loading
Browse files Browse the repository at this point in the history
  • Loading branch information
mfansler committed Mar 31, 2015
1 parent de23708 commit 3b1336c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
7 changes: 3 additions & 4 deletions src/edu/millersville/cs/bitsplease/model/UMLUserSymbol.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ public void readExternal(ObjectInput in) throws IOException,
ClassNotFoundException {
try {
identifier.setValue((String) in.readObject());
setLayoutX(in.readDouble());
setLayoutY(in.readDouble());
setOrigin(new Point2D(in.readDouble(),in.readDouble()));
} catch (Exception x) {
System.err.println("Invalid UML File format");
}
Expand All @@ -119,7 +118,7 @@ public void readExternal(ObjectInput in) throws IOException,
@Override
public void writeExternal(ObjectOutput out) throws IOException {
out.writeObject(identifier.getValue());
out.writeDouble(getLayoutX());
out.writeDouble(getLayoutY());
out.writeDouble(getX());
out.writeDouble(getY());
}
}
12 changes: 1 addition & 11 deletions src/edu/millersville/cs/bitsplease/view/DocumentViewPane.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import javafx.scene.Node;
import javafx.scene.layout.Pane;
import edu.millersville.cs.bitsplease.model.UMLClassSymbol;
import edu.millersville.cs.bitsplease.model.UMLInterfaceSymbol;
import edu.millersville.cs.bitsplease.model.UMLObjectSymbol;
import edu.millersville.cs.bitsplease.model.UMLRelationSymbol;
import edu.millersville.cs.bitsplease.model.UMLSymbol;
Expand Down Expand Up @@ -86,16 +85,7 @@ public ArrayList<UMLSymbol> getEntities(){
* @param _entityList List of entities to set on the Document.
*/
public void setEntities(ArrayList<UMLSymbol> _entityList){
_entityList.forEach( uml -> {

if (uml instanceof UMLClassSymbol){
addUMLSymbol((UMLClassSymbol)uml);
}else if(uml instanceof UMLRelationSymbol){
addUMLSymbol((UMLRelationSymbol)uml);
}else if(uml instanceof UMLInterfaceSymbol){
addUMLSymbol((UMLInterfaceSymbol)uml);
}
});
_entityList.forEach( uml -> addUMLSymbol(uml));
}

/**
Expand Down

0 comments on commit 3b1336c

Please sign in to comment.