From 0310681f0230dbf52f5e4cfb362518db7dfbebf1 Mon Sep 17 00:00:00 2001 From: Merv Fansler Date: Mon, 27 Apr 2015 22:23:44 -0400 Subject: [PATCH] touchup --- .../millersville/cs/bitsplease/view/PropertiesPane.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/edu/millersville/cs/bitsplease/view/PropertiesPane.java b/src/edu/millersville/cs/bitsplease/view/PropertiesPane.java index 05e0105..bdb7b96 100644 --- a/src/edu/millersville/cs/bitsplease/view/PropertiesPane.java +++ b/src/edu/millersville/cs/bitsplease/view/PropertiesPane.java @@ -8,7 +8,6 @@ package edu.millersville.cs.bitsplease.view; - import javafx.beans.binding.Bindings; import javafx.beans.property.DoubleProperty; import javafx.beans.property.ObjectProperty; @@ -24,6 +23,7 @@ import edu.millersville.cs.bitsplease.model.UMLRelationSymbol; import edu.millersville.cs.bitsplease.model.UMLRelationType; import edu.millersville.cs.bitsplease.model.UMLSymbol; + /** * Properties Pane GUI Component * This component provides a field editing interface the fields of the @@ -66,12 +66,12 @@ public void changed(ObservableValue observable, } if (newValue != null) { newValue.getFields().forEach(p -> { - TextField tf = new TextField(); if (p instanceof StringProperty) { + TextField tf = new TextField(); Bindings.bindBidirectional(tf.textProperty(), (StringProperty) p); this.getChildren().add(tf); - } else if (p instanceof DoubleProperty) { + TextField tf = new TextField(); Bindings.bindBidirectional(tf.textProperty(), (DoubleProperty) p, new NumberStringConverter()); tf.setTextFormatter(new TextFormatter(c -> { c.setText(c.getText().replaceAll("[^\\d]", "")); @@ -80,7 +80,7 @@ public void changed(ObservableValue observable, this.getChildren().add(tf); }else if(p instanceof ObjectProperty){ - + Bindings.bindBidirectional(relDropDown.valueProperty(), (ObjectProperty)p); } });