Selaa lähdekoodia

Removes Holon Battery, Removes Language.

Adds Button Icons to add delete category or HolonElements.
Tom Troppmann 3 vuotta sitten
vanhempi
commit
255bb05616

BIN
res/Images/battery.png


BIN
res/Images/battery0.png


BIN
res/Images/battery1.png


BIN
res/Images/battery2.png


BIN
res/Images/battery3.png


BIN
res/Images/battery4.png


BIN
res/Images/minus.png


BIN
res/Images/plus.png


+ 0 - 180
src/classes/HolonBattery.java

@@ -1,180 +0,0 @@
-package classes;
-import com.google.gson.annotations.Expose;
-
-public class HolonBattery extends AbstractCanvasObject{
-	
-	@Expose
-	private float inRatio;
-	@Expose
-	private float outRatio;
-	@Expose
-	private float capacity;
-	@Expose
-	private float initialStateOfCharge;
-	@Expose
-	private float[] stateOfChargeLevels;
-	@Expose
-	private float iterations = 0;
-	public enum State{STANDBY, COLLECT, EMIT};
-	private State state;
-	/** Constructor for a unique ID.
-	 * @param ObjName
-	 */
-	public HolonBattery(String ObjName)
-	{
-		super(ObjName);
-		inRatio = 1000.0f;
-		outRatio = 1000.0f;
-		capacity = 20000.0f;
-		initialStateOfCharge = 0;
-		setState(State.STANDBY);
-	}
-	/** Constructor to Copy a Battery
-	 * @param obj Object to copy.
-	 */
-	public HolonBattery(AbstractCanvasObject obj)
-	{
-		super(obj);
-		super.setName(obj.getName());
-		setInRatio(((HolonBattery) obj).getInRatio());
-		setOutRatio(((HolonBattery) obj).getOutRatio());
-		setCapacity(((HolonBattery) obj).getCapacity());
-		setInitialStateOfCharge(((HolonBattery) obj).getInitialStateOfCharge());
-		setState(State.STANDBY);
-	}
-	public float getCapacity() {
-		return capacity;
-	}
-	public void setCapacity(float capacity) {	
-		if(capacity < 0) //capasity can not be negative
-		{
-			capacity = 0;
-		}
-		this.capacity = capacity;
-	}
-	public float getOutRatio() {
-		return outRatio;
-	}
-	public void setOutRatio(float outRatio) {
-		if(outRatio < 0) //
-		{
-			outRatio = 0;
-		}
-		this.outRatio = outRatio;
-	}
-	public float getInRatio() {
-			return inRatio;
-	}
-	//For Calculations
-	public float getInAtTimeStep(int x)
-	{
-		if(getCapacity() - getStateOfChargeAtTimeStep(x) < inRatio)
-			return getCapacity() - getStateOfChargeAtTimeStep(x);
-		else
-			return inRatio;
-	}
-	public float getOutAtTimeStep(int x)
-	{
-		if(getStateOfChargeAtTimeStep(x) < outRatio)
-			return getStateOfChargeAtTimeStep(x);
-		else
-			return outRatio;
-	}
-	public void setInRatio(float inRatio) {
-		if(inRatio < 0)
-		{
-			inRatio = 0;
-		}
-		this.inRatio = inRatio;
-	}
-	public State getState() {
-		return state;
-	}
-	public void setState(State state) {
-		this.state = state;
-	}
-
-	/**
-	 * @return The String that is over the Battery in the Canvas if COLLECT the
-	 *         input if EMIT the output of the Battery
-	 */
-	public String getCanvasBatteryString(int x)
-	{
-		x--;
-		float stateOfCharge1 = getStateOfChargeAtTimeStep(x-1);
-		float newStateOfCharge1 =  getStateOfChargeAtTimeStep(x);
-		if(newStateOfCharge1 > stateOfCharge1)
-		{
-			return "-" + Float.toString(newStateOfCharge1 - stateOfCharge1);
-		}
-		else if (newStateOfCharge1 < stateOfCharge1)
-		{
-			return "+" +Float.toString(-(newStateOfCharge1 - stateOfCharge1)); // '"-" +' not needed because negative
-		}else
-		{
-			return "0";
-		}
-		
-	}
-	public String toString()
-	{
-		return "HolonBattery" + this.getId();
-	}
-	public void setStateOfChargeAtTimeStep(float newStateOfCharge, int x) { 	
-		stateOfChargeLevels[x] = validStateOfCharge(newStateOfCharge);
-	}
-	public float getStateOfChargeAtTimeStep(int x) {
-		if(x < 0)
-		{
-			return initialStateOfCharge;
-		}
-		return stateOfChargeLevels[x];
-	}
-	public float getInitialStateOfCharge() {
-		return initialStateOfCharge;
-	}
-	public void setInitialStateOfCharge(float initialStateOfCharge) {
-		this.initialStateOfCharge = validStateOfCharge(initialStateOfCharge);
-	}
-	
-	public void checkBuffer(int maximumIterations){
-		if(iterations <= maximumIterations)
-		{
-			stateOfChargeLevels = new float[maximumIterations];
-			iterations = maximumIterations;
-		}
-	}
-	
-	/** Correct if a state of charge is to big or to less
-	 * @return a valid State of charge
-	 */
-	public float validStateOfCharge(float stateOfChargeToValid)
-	{
-		if(stateOfChargeToValid > capacity) //state of Charege can not more than the capacity
-		{
-			return capacity;
-		}
-		else if(stateOfChargeToValid < 0) // state of charge can not be a negativ value
-		{
-			return 0;
-		}
-		else
-		{
-			return stateOfChargeToValid;
-		}
-	}
-	public String getImageBattery(int timestep) {
-		//HardCoded Image selection
-		
-		float actualStateOfCharge = getStateOfChargeAtTimeStep(timestep - 1 );
-		int whichOne = (int)(actualStateOfCharge/capacity * 4);
-		String battery = "/Images/battery"+ whichOne + ".png";
-		setImage(battery);
-		return battery;
-	}
-	
-	@Override
-	public HolonBattery makeCopy(){
-		return new HolonBattery(this);
-	}
-}

+ 0 - 35
src/classes/comparator/WeakestBattery.java

@@ -1,35 +0,0 @@
-package classes.comparator;
-
-import java.util.Comparator;
-
-import classes.HolonBattery;
-
-public class WeakestBattery implements Comparator<HolonBattery>{
-	int timeStep = 0;
-	 public WeakestBattery(int compareAtTimeStep) {
-	        timeStep = compareAtTimeStep;
-	    }
-	@Override
-	public int compare(HolonBattery o1, HolonBattery o2) {
-		//Sort Battery by the value of StateOfCharge/Capasity
-		float O1capasity = o1.getCapacity();		
-		float O2capasity = o2.getCapacity();
-		if(O1capasity == 0)
-		{
-			return 1; 
-		}
-		else if(O2capasity == 0)
-		{
-			return -1;
-		}
-		if (o1.getStateOfChargeAtTimeStep(timeStep-1) / O1capasity < o2.getStateOfChargeAtTimeStep(timeStep-1) / O2capasity)
-		{
-			return -1;
-		}else if(o1.getStateOfChargeAtTimeStep(timeStep-1) / O1capasity > o2.getStateOfChargeAtTimeStep(timeStep-1) / O2capasity)
-		{
-			return 1;
-		}
-		return 0;
-	}
-
-}

+ 0 - 23
src/ui/controller/CategoryController.java

@@ -3,7 +3,6 @@ package ui.controller;
 import java.util.ArrayList;
 
 import classes.Category;
-import classes.HolonBattery;
 import classes.AbstractCanvasObject;
 import classes.HolonElement;
 import classes.HolonObject;
@@ -46,7 +45,6 @@ public class CategoryController {
 				"/Images/power-plant.png");
 		addNewHolonObject(mpC.searchCat("Building"), "House", new ArrayList<HolonElement>(), "/Images/home-2.png");
 		addNewHolonSwitch(mpC.searchCat("Component"), "Switch", "/Images/switch-on.png");
-		addNewHolonBattery(mpC.searchCat("Component"), "Battery", "/Images/battery.png");
 	}
 
 	/**
@@ -180,27 +178,6 @@ public class CategoryController {
 		holonSwitch.setSav(cat.getName());
 		addObject(cat, holonSwitch);
 	}
-	/**
-	 * Add new Holon Battery
-	 * @param cat 
-	 * 			Categorx
-	 * @param objName
-	 * 			New Object Name
-	 * @param image
-	 * 			The Image Path
-	 */
-	public void addNewHolonBattery(Category cat, String objName, String image) {
-		HolonBattery holonBat = new HolonBattery(objName);
-		holonBat.setImage(image);
-		holonBat.setSav(cat.getName());
-		addObject(cat, holonBat);
-	}
-	
-	public void addNewHolonBattery(Category cat, HolonBattery holonBat, String image) {
-		holonBat.setImage(image);
-		holonBat.setSav(cat.getName());
-		addObject(cat, holonBat);
-	}
 	
 	
 	

+ 1 - 17
src/ui/controller/Control.java

@@ -16,7 +16,6 @@ import classes.AbstractCanvasObject;
 import classes.Category;
 import classes.Edge;
 import classes.GroupNode;
-import classes.HolonBattery;
 import classes.HolonElement;
 import classes.HolonObject;
 import classes.Node;
@@ -229,22 +228,7 @@ public class Control {
         categoryController.addNewHolonSwitch(cat, obj, "/Images/switch-on.png");
         saveCategory();
     }
-    
-    /**
-     * Add new HolonBattery to a Category
-     * @param cat
-     * @param obj
-     * @throws IOException
-     */
-    public void addBattery(Category cat, String obj) throws IOException {
-        categoryController.addNewHolonBattery(cat, obj, "/Images/battery.png");
-        saveCategory();
-    }
-    //TODO make good
-    public void addBattery(Category cat, HolonBattery holonbat) throws IOException {
-        categoryController.addNewHolonBattery(cat, holonbat, "/Images/battery.png");
-        saveCategory();
-    }
+   
     
     /**
      * delete a given Category.

+ 17 - 31
src/ui/controller/UpdateController.java

@@ -11,7 +11,6 @@ import ui.model.DecoratedGroupNode;
 import ui.model.DecoratedHolonObject.HolonObjectState;
 import ui.model.Model;
 import ui.view.DefaulTable;
-import ui.view.Languages;
 import ui.view.PropertyTable;
 import ui.view.GroupNodeCanvas;
 
@@ -46,7 +45,7 @@ public class UpdateController {
 			if (tempCps != null && tempCps.getClass() == HolonObject.class) {
 				if (table.getRowCount() != 0) {
 					table.removeRow(2);
-					Object[] tempEnergy = { Languages.getLanguage()[73], ((HolonObject) tempCps).getEnergyNeededFromConsumingElements(model.getCurIteration()) };
+					Object[] tempEnergy = { "Total Energy", ((HolonObject) tempCps).getEnergyNeededFromConsumingElements(model.getCurIteration()) };
 					table.insertRow(2, tempEnergy);
 					table.removeRow(3);
 					Object[] tempFlex = { "Flexibility", ((HolonObject) tempCps).getTotalFlex() };
@@ -286,7 +285,7 @@ public class UpdateController {
 	public void paintProperties(AbstractCanvasObject obj) {
 		if (obj != null) {
 			// Name of the CpsObject
-			Object[] tempName = { Languages.getLanguage()[72], obj.getName() };
+			Object[] tempName = { "Name", obj.getName() };
 			model.getPropertyTable().addRow(tempName);
 			// Id of the CpsObject
 			Object[] tempId = { "ID", obj.getId() };
@@ -295,7 +294,7 @@ public class UpdateController {
 			// consumption) is calculated
 			if (obj instanceof HolonObject) {
 				refreshTableHolonElement(model.getMultiTable(), model.getSingleTable());
-				Object[] tempEnergy = { Languages.getLanguage()[73], ((HolonObject) obj).getEnergyNeededFromConsumingElements(model.getCurIteration()) };
+				Object[] tempEnergy = { "Total Energy", ((HolonObject) obj).getEnergyNeededFromConsumingElements(model.getCurIteration()) };
 				Object[] tempFlex = { "Flexibility", ((HolonObject) obj).getTotalFlex() };
 				model.getPropertyTable().addRow(tempEnergy);
 				model.getPropertyTable().addRow(tempFlex);
@@ -308,14 +307,14 @@ public class UpdateController {
 			else if (obj instanceof HolonSwitch) {
 				deleteRows(model.getSingleTable());
 				deleteRows(model.getMultiTable());
-				Object[] tempMode = { Languages.getLanguage()[74], ((HolonSwitch) obj).getManualMode() };
+				Object[] tempMode = { "Manual", ((HolonSwitch) obj).getManualMode() };
 				model.getPropertyTable().addRow(tempMode);
 				if (((HolonSwitch) obj).getManualMode()) {
-					Object[] tempActive = { Languages.getLanguage()[75], ((HolonSwitch) obj).getManualState() };
+					Object[] tempActive = { "Active", ((HolonSwitch) obj).getManualState() };
 					model.getPropertyTable().addRow(tempActive);
 					model.getPropertyTable().setCellEditable(3, 1, true);
 				} else {
-					Object[] tempActive = { Languages.getLanguage()[75],
+					Object[] tempActive = { "Active",
 							((HolonSwitch) obj).getState(model.getCurIteration()) };
 					model.getPropertyTable().addRow(tempActive);
 					model.getPropertyTable().setCellEditable(3, 1, false);
@@ -385,20 +384,7 @@ public class UpdateController {
 					model.getPropertyTable().addRow(difference);
 				}
 				
-			} else if (obj instanceof HolonBattery) {
-				deleteRows(model.getSingleTable());
-				deleteRows(model.getMultiTable());
-				Object[] numInRatio = {"InRatio:", ((HolonBattery)obj).getInRatio() };
-				Object[] numOutRatio = {"OutRatio:", ((HolonBattery)obj).getOutRatio() };
-				Object[] numSOC_Capasity = {"State of charge:", Float.toString(((HolonBattery)obj).getStateOfChargeAtTimeStep(model.getCurIteration()-1)) + "/" + Float.toString(((HolonBattery)obj).getCapacity()) };
-				model.getPropertyTable().addRow(numInRatio);
-				model.getPropertyTable().addRow(numOutRatio);
-				model.getPropertyTable().addRow(numSOC_Capasity);
-				
-				model.getPropertyTable().setCellEditable(0, 1, true);
-				model.getPropertyTable().setCellEditable(2, 1, true);
-				model.getPropertyTable().setCellEditable(3, 1, true);
-			}else {
+			} else {
 				deleteRows(model.getSingleTable());
 				deleteRows(model.getMultiTable());
 			}
@@ -411,22 +397,22 @@ public class UpdateController {
 					if (first) {
 						first = false;
 						if (obj.getId() != temp2.getA().getId()) {
-							Object[] tempConnection = { obj.getName() + Languages.getLanguage()[76],
-									temp2.getA().getName() + Languages.getLanguage()[77] + temp2.getA().getId() };
+							Object[] tempConnection = { obj.getName() + " is connected to",
+									temp2.getA().getName() + " with ID: " + temp2.getA().getId() };
 							model.getPropertyTable().addRow(tempConnection);
 						} else {
-							Object[] tempConnection = { obj.getName() + Languages.getLanguage()[76],
-									temp2.getB().getName() + Languages.getLanguage()[77] + temp2.getB().getId() };
+							Object[] tempConnection = { obj.getName() + " is connected to",
+									temp2.getB().getName() + " with ID: " + temp2.getB().getId() };
 							model.getPropertyTable().addRow(tempConnection);
 						}
 					} else {
 						if (obj.getId() != temp2.getA().getId()) {
 							Object[] tempConnection = { "",
-									temp2.getA().getName() + Languages.getLanguage()[77] + temp2.getA().getId() };
+									temp2.getA().getName() + " with ID: " + temp2.getA().getId() };
 							model.getPropertyTable().addRow(tempConnection);
 						} else {
 							Object[] tempConnection = { "",
-									temp2.getB().getName() + Languages.getLanguage()[77] + temp2.getB().getId() };
+									temp2.getB().getName() + " with ID: " + temp2.getB().getId() };
 							model.getPropertyTable().addRow(tempConnection);
 						}
 					}
@@ -435,15 +421,15 @@ public class UpdateController {
 		} // If the clicked Object is an edge
 		else if (model.getSelectedEdge() != null) {
 			// Name displayed
-			Object[] tempName = { Languages.getLanguage()[72],
-					Languages.getLanguage()[78] + model.getSelectedEdge().getA().getName() + Languages.getLanguage()[79]
+			Object[] tempName = { "Name",
+					"Edge: " + model.getSelectedEdge().getA().getName() + " to "
 							+ model.getSelectedEdge().getB().getName() };
 			model.getPropertyTable().addRow(tempName);
 			// Current Flow displayed
-			Object[] tempFlow = { Languages.getLanguage()[80], "" };
+			Object[] tempFlow = { "Current flow", "" };
 			model.getPropertyTable().addRow(tempFlow);
 			// Max Capacity displayed
-			Object[] tempCapacity = { Languages.getLanguage()[81], model.getSelectedEdge().getCapacity() };
+			Object[] tempCapacity = { "Max. Capacity", model.getSelectedEdge().getCapacity() };
 			model.getPropertyTable().addRow(tempCapacity);
 			// Status displayed
             Object[] tempStatus = {"Length", model.getSelectedEdge().getLength() };

+ 1 - 1
src/ui/view/AboutUsPopUp.java

@@ -36,7 +36,7 @@ public class AboutUsPopUp extends JFrame {
      * Constructor
      */
     public AboutUsPopUp(JFrame parentFrame) {
-        super(Languages.getLanguage()[14]);
+        super("About Us");
 
         // Set fonts
         Font fontTitle = new Font("Titel", 2, 35);

+ 7 - 13
src/ui/view/AbstractCanvas.java

@@ -43,16 +43,14 @@ public abstract class AbstractCanvas extends JPanel {
 	 */
 	private static final long serialVersionUID = 1L;
 	
-	final JMenuItem itemDelete = new JMenuItem(Languages.getLanguage()[98]);
-	final JMenuItem itemCut = new JMenuItem(Languages.getLanguage()[95]);
-	final JMenuItem itemCopy = new JMenuItem(Languages.getLanguage()[96]);
-	final JMenuItem itemPaste = new JMenuItem(Languages.getLanguage()[97]);
-	final JMenuItem itemGroup = new JMenuItem(Languages.getLanguage()[99]);
-	final JMenuItem itemUngroup = new JMenuItem(Languages.getLanguage()[100]);
-	final JMenuItem itemTrack = new JMenuItem(Languages.getLanguage()[101]);
-	final JMenuItem itemUntrack = new JMenuItem(Languages.getLanguage()[102]);
+	final JMenuItem itemCut = new JMenuItem("Cut");
+	final JMenuItem itemCopy = new JMenuItem("Copy");
+	final JMenuItem itemPaste = new JMenuItem("Paste");
+	final JMenuItem itemDelete = new JMenuItem("Delete");
+	final JMenuItem itemGroup = new JMenuItem("Group");
+	final JMenuItem itemUngroup = new JMenuItem("Ungroup");
 	final JMenuItem itemAlign = new JMenuItem("Align selected");
-	final JMenuItem itemCreateTemplate = new JMenuItem(Languages.getLanguage()[Languages.right_click_create_template]);
+	final JMenuItem itemCreateTemplate = new JMenuItem("Create Template");
 	
 	final int ANIMTIME = 500; // animation Time
 	private final int animFPS = 60;
@@ -176,8 +174,6 @@ public abstract class AbstractCanvas extends JPanel {
 				// tracking
 				if (tempCps != null) {
 					itemGroup.setEnabled(true);
-					itemTrack.setEnabled(true);
-					itemUntrack.setEnabled(true);
 				}
 				// ungrouping
 				if (tempCps instanceof GroupNode)
@@ -198,8 +194,6 @@ public abstract class AbstractCanvas extends JPanel {
 				itemCopy.setEnabled(false);
 				itemGroup.setEnabled(false);
 				itemUngroup.setEnabled(false);
-				itemTrack.setEnabled(false);
-				itemUntrack.setEnabled(false);
 				itemCreateTemplate.setEnabled(false);
 				if (edgeHighlight != null) {
 					itemDelete.setEnabled(true);

+ 8 - 8
src/ui/view/AddElementPopUp.java

@@ -60,7 +60,7 @@ public class AddElementPopUp extends JDialog {
 		contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
 		getContentPane().add(contentPanel, BorderLayout.CENTER);
 		contentPanel.setLayout(null);
-		this.setTitle(Languages.getLanguage()[64]);
+		this.setTitle("Add Element to Object");
 
 		
 		/* Element Name Textfield and Label */
@@ -80,7 +80,7 @@ public class AddElementPopUp extends JDialog {
 			}
 		});
 		
-		JLabel lblElementName = new JLabel(Languages.getLanguage()[65]);
+		JLabel lblElementName = new JLabel("Element Name:");
 		lblElementName.setBounds(10, 10, 100, 20);
 		contentPanel.add(lblElementName);
 		elementName.setBounds(130, 10, 110, 20);
@@ -88,7 +88,7 @@ public class AddElementPopUp extends JDialog {
 		elementName.setColumns(10);
 		
 		/* Add Provided Energy Label and Textfield */
-		JLabel lblProvidedEnergy = new JLabel(Languages.getLanguage()[66]);
+		JLabel lblProvidedEnergy = new JLabel("Provided Energy:");
 		lblProvidedEnergy.setBounds(10, 50, 120, 20);
 		contentPanel.add(lblProvidedEnergy);
 		
@@ -119,7 +119,7 @@ public class AddElementPopUp extends JDialog {
 		contentPanel.add(checkboxFlexible);
 		
 		/* Add Amount Textfield and Checkbox */
-		JLabel lblAmount = new JLabel(Languages.getLanguage()[67]);
+		JLabel lblAmount = new JLabel("Amount:");
 		lblAmount.setBounds(10, 130, 100, 14);
 		contentPanel.add(lblAmount);
 
@@ -140,7 +140,7 @@ public class AddElementPopUp extends JDialog {
 		buttonPane.add(okButton);
 		getRootPane().setDefaultButton(okButton);
 
-		JButton cancelButton = new JButton(Languages.getLanguage()[71]);
+		JButton cancelButton = new JButton("Cancel");
 		cancelButton.setActionCommand("Cancel");
 		buttonPane.add(cancelButton);
 		cancelButton.addActionListener(e -> dispose());
@@ -205,15 +205,15 @@ public class AddElementPopUp extends JDialog {
 				}
 				dispose();
 			} catch (NumberFormatException e) {
-				JOptionPane.showMessageDialog(new JFrame(), Languages.getLanguage()[68]);
+				JOptionPane.showMessageDialog(new JFrame(), "Please enter numbers in the Fields amount and Energy");
 			}
 		} else {
 			if (elementName.getText().length() == 0) {
-				JLabel errorString = new JLabel(Languages.getLanguage()[69]);
+				JLabel errorString = new JLabel("No name");
 				errorString.setBounds(240, 8, 100, 20);
 				contentPanel.add(errorString);
 			} else if (repeated) {
-				JLabel errorString = new JLabel(Languages.getLanguage()[70]);
+				JLabel errorString = new JLabel("Name already given");
 				errorString.setBounds(250, 8, 100, 20);
 				contentPanel.add(errorString);
 			}

+ 8 - 162
src/ui/view/AddObjectPopUp.java

@@ -24,7 +24,6 @@ import javax.swing.JFileChooser;
 import javax.swing.JFrame;
 import javax.swing.JLabel;
 import javax.swing.JList;
-import javax.swing.JOptionPane;
 import javax.swing.JPanel;
 import javax.swing.JScrollPane;
 import javax.swing.JTextField;
@@ -33,7 +32,6 @@ import javax.swing.border.EmptyBorder;
 import javax.swing.filechooser.FileNameExtensionFilter;
 
 import classes.AbstractCanvasObject;
-import classes.HolonBattery;
 import classes.HolonElement;
 import classes.HolonObject;
 import classes.Pair;
@@ -65,21 +63,6 @@ public class AddObjectPopUp extends JDialog {
 	private boolean editState;
 	private boolean imageChanged = false;
 
-	/**
-	 * Launch the application.
-	 *
-	 * @param args
-	 *            standard
-	 */
-	public static void main(String[] args) {
-		try {
-			AddObjectPopUp dialog = new AddObjectPopUp(false,new HolonBattery("jo") , "hei", null);
-			dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
-			dialog.setVisible(true);
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-	}
 
 	/**
 	 * Create the dialog.
@@ -92,11 +75,7 @@ public class AddObjectPopUp extends JDialog {
 	 *            the categorie
 	 */
     AddObjectPopUp(boolean edit, AbstractCanvasObject obj, String cat, JFrame parentFrame) {
-    	if(obj  instanceof HolonBattery)
-    	{
-    		BatteryPopUp(edit, obj, cat, parentFrame);
-    		return;
-    	}
+
         toEdit = obj;
 		editState = edit;
 		this.setIconImage(ImageImport.loadImage("/Images/Holeg.png",30,30));
@@ -108,9 +87,9 @@ public class AddObjectPopUp extends JDialog {
 		getContentPane().add(contentPanel, BorderLayout.CENTER);
 		contentPanel.setLayout(null);
 		hElements = new ArrayList<>();
-		this.setTitle(Languages.getLanguage()[58]);
+		this.setTitle("Add Object Menu");
 		{
-			JLabel lblName = new JLabel(Languages.getLanguage()[59]);
+			JLabel lblName = new JLabel("Name:");
 			lblName.setHorizontalAlignment(SwingConstants.CENTER);
 			lblName.setBounds(28, 21, 76, 14);
 			contentPanel.add(lblName);
@@ -141,7 +120,7 @@ public class AddObjectPopUp extends JDialog {
 			objectName.setColumns(10);
 		}
 		{
-			JButton btnBrowseImage = new JButton(Languages.getLanguage()[60]);
+			JButton btnBrowseImage = new JButton("Browse Image");
 			btnBrowseImage.setBounds(10, 75, 134, 23);
 			contentPanel.add(btnBrowseImage);
 			btnBrowseImage.addMouseListener(new MouseAdapter() {
@@ -185,7 +164,7 @@ public class AddObjectPopUp extends JDialog {
 			sourcePath.setColumns(10);
 		}
 		{
-			JButton btnAddDefaultElement = new JButton(Languages.getLanguage()[61]);
+			JButton btnAddDefaultElement = new JButton("Add Element");
 			btnAddDefaultElement.addActionListener(actionEvent -> {
                 addElement = new AddElementPopUp(parentFrame);
                 addElement.setActualCps(toEdit);
@@ -225,7 +204,7 @@ public class AddObjectPopUp extends JDialog {
 			}
 		}
 		{
-			JButton btnNewButton = new JButton(Languages.getLanguage()[62]);
+			JButton btnNewButton = new JButton("Delete Element");
 			btnNewButton.addActionListener(actionEvent -> {
 				int selectedIndex = list.getSelectedIndex();
 				if (selectedIndex != -1) {
@@ -293,147 +272,14 @@ public class AddObjectPopUp extends JDialog {
 				getRootPane().setDefaultButton(okButton);
 			}
 			{
-				JButton cancelButton = new JButton(Languages.getLanguage()[63]);
+				JButton cancelButton = new JButton("Cancel");
 				cancelButton.setActionCommand("Cancel");
 				buttonPane.add(cancelButton);
 				cancelButton.addActionListener(e -> dispose());
 			}
 		}
 	}
-    protected void BatteryPopUp(boolean edit, AbstractCanvasObject obj, String cat, JFrame parentFrame) {
-    	//TODO: Click mich <3 
-    	HolonBattery editBat = (HolonBattery) obj;
-    	//Window Settings
-    	this.setIconImage(ImageImport.loadImage("/Images/battery.png",30,30));
-    	this.setTitle("Edit Battery");
-    	setBounds(0, 0, 285, 290);
-        setLocationRelativeTo(parentFrame);
-		
-        //Labels, TextFiels, Buttons
-        JPanel myPanel = new JPanel();
-        myPanel.setLayout(null);
-        int beginBoxX = 140, beginLabelX = 30;
-        int beginColumAtY = 20, newColumY = 40;
-        JLabel batteryNameLabel = new JLabel("Name:");
-        JTextField batteryNameBox = new JTextField(10);
-        batteryNameBox.setText(editBat.getName());
-        JLabel batteryInRateLabel = new JLabel("In ratio:");
-        JTextField batteryInRateBox = new JTextField(10);
-        batteryInRateBox.setText(Float.toString(editBat.getInRatio()));
-        JLabel batteryOutRateLabel = new JLabel("Out ratio:");
-        JTextField batteryOutRateBox = new JTextField(10);
-        batteryOutRateBox.setText(Float.toString(editBat.getOutRatio()));
-        JLabel batteryCapasityLabel = new JLabel("Capacity:");
-        JTextField batteryCapasityBox = new JTextField(10);
-        batteryCapasityBox.setText(Float.toString(editBat.getCapacity()));
-        JLabel batterySOCLabel = new JLabel("State of charge:"); 
-        JTextField batterySOCBox = new JTextField(10);
-        batterySOCBox.setText(Float.toString(editBat.getInitialStateOfCharge()));
-        
-    
-        batteryNameLabel.setBounds(beginLabelX, beginColumAtY, 200, 20);
-        batteryNameBox.setBounds(beginBoxX, beginColumAtY, 100, 20);
-        myPanel.add(batteryNameLabel);
-        myPanel.add(batteryNameBox);
-        beginColumAtY += newColumY;      
-    
-        batteryInRateLabel.setBounds(beginLabelX, beginColumAtY, 200, 20);
-        batteryInRateBox.setBounds(beginBoxX, beginColumAtY, 100, 20);
-        myPanel.add(batteryInRateLabel);
-        myPanel.add(batteryInRateBox);
-        beginColumAtY += newColumY;
-		
-        batteryOutRateLabel.setBounds(beginLabelX, beginColumAtY, 200, 20);
-        batteryOutRateBox.setBounds(beginBoxX, beginColumAtY, 100, 20);
-        myPanel.add(batteryOutRateLabel);
-        myPanel.add(batteryOutRateBox);
-        beginColumAtY += newColumY;
-        
-        batteryCapasityLabel.setBounds(beginLabelX, beginColumAtY, 200, 20);
-        batteryCapasityBox.setBounds(beginBoxX, beginColumAtY, 100, 20);
-        myPanel.add(batteryCapasityLabel);
-        myPanel.add(batteryCapasityBox);
-        beginColumAtY += newColumY;
-        
-        batterySOCLabel.setBounds(beginLabelX, beginColumAtY, 200, 20);
-        batterySOCBox.setBounds(beginBoxX, beginColumAtY, 100, 20);
-        myPanel.add(batterySOCLabel);
-        myPanel.add(batterySOCBox);
-        
-        //Save , Cancel
-        JPanel bottomPanel = new JPanel();
-        bottomPanel.setLayout(new FlowLayout(FlowLayout.RIGHT));
-        
-        JButton saveButton = new JButton("Save");
-        bottomPanel.add(saveButton);
-        
-        saveButton.addActionListener(e -> {
-        	//SaveButten Event:
-        	if(batteryNameBox.getText().isEmpty()){ //Check for valid name
-        		JOptionPane.showMessageDialog(getContentPane(), "Name is empty." , "Wrong input" , JOptionPane.WARNING_MESSAGE);
-        	}else{
-        		editBat.setName(batteryNameBox.getText());
-        		try{//Check for floats inputs
-        			float changedInRatio = Float.valueOf(batteryInRateBox.getText());
-        			float changedOutRatio = Float.valueOf(batteryOutRateBox.getText());
-        			float changedCapasity = Float.valueOf(batteryCapasityBox.getText());
-        			float changedSOC = Float.valueOf(batterySOCBox.getText());
-        			//Saving:
-        			editBat.setInRatio(changedInRatio);
-        			editBat.setOutRatio(changedOutRatio);
-        			editBat.setCapacity(changedCapasity);
-        			editBat.setInitialStateOfCharge(changedSOC);
-					try {
-						controller.saveCategory();
-						controller.notifyAll();
-					} catch (Exception e1) { //Controller Exceptions
-					}
-        			dispose();
-        		}catch(NumberFormatException FloatException){
-        			String wrong= FloatException.getMessage();
-        			String message;
-        			if(wrong.startsWith("empty")){
-        				message = "A field is empty.";
-        			}else{
-        				message = wrong.substring(18) + " is not a valid Number.";
-        			}
-        			JOptionPane.showMessageDialog(getContentPane(), message, "Wrong input" , JOptionPane.WARNING_MESSAGE);
-        		}
-        	}
-        });
-        
-        JButton cancelButton = new JButton("Cancel");
-        bottomPanel.add(cancelButton);
-		cancelButton.addActionListener(e -> dispose());
-		
-		
-		
-        getContentPane().setLayout(new BorderLayout());
-		getContentPane().add(myPanel, BorderLayout.CENTER);
-		getContentPane().add(bottomPanel, BorderLayout.SOUTH);
-    }
-//	/**
-//	 * Get Jar Containing Folder.
-//	 *
-//	 * @param aclass aClass
-//	 * @return String
-//	 * @throws Exception Exception
-//	 */
-//	public static String getJarContainingFolder(Class aclass) throws Exception {
-//		CodeSource codeSource = aclass.getProtectionDomain().getCodeSource();
-//
-//		File jarFile;
-//
-//		if (codeSource.getLocation() != null) {
-//			jarFile = new File(codeSource.getLocation().toURI());
-//		} else {
-//			String path = aclass.getResource(aclass.getSimpleName() + ".class").getPath();
-//			String jarFilePath = path.substring(path.indexOf(":") + 1, path.indexOf("!"));
-//			jarFilePath = URLDecoder.decode(jarFilePath, "UTF-8");
-//			jarFile = new File(jarFilePath);
-//		}
-//		return jarFile.getParentFile().getAbsolutePath();
-//	}
+
 
 	/**
 	 * adds a Holon Element.

+ 3 - 36
src/ui/view/CreateNewDialog.java

@@ -14,8 +14,6 @@ import javax.swing.JFrame;
 import javax.swing.JLabel;
 import javax.swing.JPanel;
 import javax.swing.JTextField;
-
-import classes.HolonBattery;
 import classes.HolonObject;
 import ui.controller.Control;
 
@@ -25,7 +23,7 @@ public class CreateNewDialog extends JDialog{
 	//DefaultConstructor
 	String[] optionStrings = { "","Category", "Object", "Battery", "Switch"};
 	public static enum Option {
-		None, Category, Object, Battery, Switch;
+		None, Category, Object, Switch;
 		public static Option getEnumAtIndex(int desired){
 			if(desired>=0 && desired<=4)
 				return values()[desired];
@@ -58,7 +56,6 @@ public class CreateNewDialog extends JDialog{
 		cards.add(makeNothingPanel(), Option.None.name());
 		cards.add(makeCategoryPanel(), Option.Category.name());
 		cards.add(makeObjectPanel(), Option.Object.name());
-		cards.add(makeBatteryPanel(), Option.Battery.name());
 		cards.add(makeSwitchPanel(), Option.Switch.name());
 		contentPanel.add(cards, BorderLayout.CENTER);
 		
@@ -68,7 +65,7 @@ public class CreateNewDialog extends JDialog{
 		    cl.show(cards, actualOption.name());
 		    saveButton.setEnabled(actualOption != Option.None);  
 		    //TODO delete and make own iterface
-		    saveButton.setVisible(actualOption != Option.Object && actualOption != Option.Battery);	
+		    saveButton.setVisible(actualOption != Option.Object);	
 		});
 		
 		
@@ -93,9 +90,6 @@ public class CreateNewDialog extends JDialog{
 		JPanel content;
 		switch(aOption)
 		{
-		case Battery:
-			content = makeBatteryPanel();
-			break;
 		case Category:
 			content = makeCategoryPanel();
 			break;
@@ -114,7 +108,7 @@ public class CreateNewDialog extends JDialog{
 		contentPanel.add(makeBottemPanel(), BorderLayout.PAGE_END);
 		addSaveButtonLogik(); 
 		//TODO delete and make own iterface
-	    if(aOption == Option.Object || aOption == Option.Battery) saveButton.setVisible(false);
+	    if(aOption == Option.Object) saveButton.setVisible(false);
 		add(contentPanel);	
 		setMinimumSize(new Dimension(400,50));
 		pack();
@@ -169,33 +163,6 @@ public class CreateNewDialog extends JDialog{
 		dispose();
 	}
 
-	private JPanel makeBatteryPanel() {
-		JPanel objectPanel = new JPanel();
-		JLabel categoryText = new JLabel("In Category:");
-		objectPanel.add(categoryText);
-		JComboBox<String> selectedCategory = new JComboBox<String>(actualController.getCategoriesStrings());
-		objectPanel.add(selectedCategory);
-		
-		
-		JButton nextButton = new JButton("Next");
-		objectPanel.add(nextButton);
-		nextButton.addActionListener(actionEvent -> {
-			makeOldBatteryPopUp(selectedCategory.getSelectedItem().toString());
-		});
-		return objectPanel;
-	}
-
-	private void makeOldBatteryPopUp(String category) {
-		HolonBattery holonbat = new HolonBattery("newBattery");
-		try {
-			actualController.addBattery(actualController.searchCategory(category), holonbat);
-			AddObjectPopUp addObjectPopUP = new AddObjectPopUp(false,holonbat , "hei", null);
-			addObjectPopUP.setVisible(true);
-			addObjectPopUP.setController(actualController);
-			dispose();
-		} catch (IOException e) {
-		}
-	}
 
 	private JPanel makeNothingPanel() {
 		return new JPanel();

+ 9 - 9
src/ui/view/EditEdgesPopUp.java

@@ -50,7 +50,7 @@ public class EditEdgesPopUp extends JDialog {
     public EditEdgesPopUp(JFrame parentFrame) {
         super((java.awt.Frame) null, true);
 		setModalityType(java.awt.Dialog.ModalityType.APPLICATION_MODAL);
-		this.setTitle(Languages.getLanguage()[46]);
+		this.setTitle("Edit Capacities of Edges");
 		setBounds(100, 100, 400, 220);
         setLocationRelativeTo(parentFrame);
         getContentPane().setLayout(new BorderLayout());
@@ -58,7 +58,7 @@ public class EditEdgesPopUp extends JDialog {
 		getContentPane().add(contentPanel, BorderLayout.CENTER);
 		contentPanel.setLayout(null);
 
-		JLabel lblMaximumCapacity = new JLabel(Languages.getLanguage()[47]);
+		JLabel lblMaximumCapacity = new JLabel("Maximum Capacity:");
 		lblMaximumCapacity.setFont(new Font("Tahoma", Font.PLAIN, 11));
 		lblMaximumCapacity.setBounds(10, 11, 98, 14);
 		contentPanel.add(lblMaximumCapacity);
@@ -68,19 +68,19 @@ public class EditEdgesPopUp extends JDialog {
 		contentPanel.add(capacityField);
 		capacityField.setColumns(10);
 
-		rdbtnChangeForAll = new JRadioButton(Languages.getLanguage()[48]);
+		rdbtnChangeForAll = new JRadioButton("Change for all existing Edges only");
 		rdbtnChangeForAll.setBounds(10, 39, 330, 23);
 		contentPanel.add(rdbtnChangeForAll);
 
-		rdbtnChangeForNew = new JRadioButton(Languages.getLanguage()[49]);
+		rdbtnChangeForNew = new JRadioButton("Change for new created Edges only");
 		rdbtnChangeForNew.setBounds(10, 65, 330, 23);
 		contentPanel.add(rdbtnChangeForNew);
 
-		rdbtnChangeForAll1 = new JRadioButton(Languages.getLanguage()[50]);
+		rdbtnChangeForAll1 = new JRadioButton("Change for all existing and new created Edges");
 		rdbtnChangeForAll1.setBounds(10, 95, 400, 23);
 		contentPanel.add(rdbtnChangeForAll1);
 
-		JButton btnCancel = new JButton(Languages.getLanguage()[51]);
+		JButton btnCancel = new JButton("Cancel");
 		btnCancel.setActionCommand("Cancel");
 		btnCancel.addActionListener(new ActionListener() {
 			public void actionPerformed(ActionEvent arg0) {
@@ -108,16 +108,16 @@ public class EditEdgesPopUp extends JDialog {
 							changeForExAndNew(capacity);
 							dispose();
 						} else {
-							JOptionPane.showMessageDialog(new JFrame(), Languages.getLanguage()[52]);
+							JOptionPane.showMessageDialog(new JFrame(), "Please select one of the options");
 						}
 					} catch (NumberFormatException eex) {
-						JOptionPane.showMessageDialog(new JFrame(), Languages.getLanguage()[53]);
+						JOptionPane.showMessageDialog(new JFrame(), "Please enter a number greater or equal 0 in the Field for Maximum Capacity");
 					}
 			}
 		});
 		btnOk1.setBounds(186, 147, 89, 23);
 		contentPanel.add(btnOk1);
-		this.setTitle(Languages.getLanguage()[54]);
+		this.setTitle("Edit Edge Capacities");
 		ButtonGroup bG = new ButtonGroup();
 		bG.add(rdbtnChangeForAll1);
 		bG.add(rdbtnChangeForNew);

+ 28 - 219
src/ui/view/GUI.java

@@ -56,7 +56,6 @@ import javax.swing.JOptionPane;
 import javax.swing.JPanel;
 import javax.swing.JPopupMenu;
 import javax.swing.JScrollPane;
-import javax.swing.JSlider;
 import javax.swing.JSplitPane;
 import javax.swing.JTabbedPane;
 import javax.swing.JTable;
@@ -81,7 +80,6 @@ import classes.AbstractCanvasObject;
 import classes.Category;
 import classes.Edge;
 import classes.GroupNode;
-import classes.HolonBattery;
 import classes.HolonElement;
 import classes.HolonObject;
 import classes.HolonSwitch;
@@ -140,8 +138,6 @@ public class GUI{
 	/** checked if supplyBars should be shown */
 	private final JCheckBoxMenuItem showSupplyBarsCheckBox = new JCheckBoxMenuItem(
 			"Show supply bars.");
-	private final JCheckBoxMenuItem showTooltipsCheckBox = new JCheckBoxMenuItem(
-			"Show tooltips.");
 	/** menu for the different fairness Models */
 	private final JMenu mnFairnessModel = new JMenu("Fairness Model");
 	/** press to supply minimum demand first */
@@ -154,14 +150,12 @@ public class GUI{
 	private final JMenuItem mntmNew = new JMenuItem("New");
 	private final JMenuItem mntmSave = new JMenuItem("Save");
 	private final JMenuItem mntmCanvasSize = new JMenuItem("Set View Size");
-	private final JMenuItem mntmBackground = new JMenuItem("Background Image");
-	private final JMenuItem mntmSplitView = new JMenuItem("Split View");
+	private final JMenuItem mntmBackground = new JMenuItem("Set Background Image");
 	private final JSplitPane splitPane = new JSplitPane();
 	private final JSplitPane splitPane1 = new JSplitPane();
 	// the tabbed canvas containing the different sub-net tabs of the grid (Main
 	// Grid + Nodes of Nodes)
-	
-	private final JLabel lblHint = new JLabel("To connect two Objects use SHIFT + Left Mouse Button");
+
 	private final JPanel myPanel = new JPanel(new BorderLayout());
 	private final JTabbedPane tabbedPaneInnerOriginal = new JTabbedPane(
 			JTabbedPane.TOP);
@@ -247,57 +241,41 @@ public class GUI{
 	private final JPanel panelHolonEl = new JPanel();
 	// Buttons
 
-	private final JButton btnAdd = new JButton("New");
-	private final JPopupMenu btnAddPopUp = new JPopupMenu("New");
+	private final JButton btnAdd = new JButton();
+	private final JPopupMenu btnAddPopUp = new JPopupMenu("Newacac");
 	private final JMenuItem mItemNew = new JMenuItem("New..");
 	private final JMenuItem mItemCategory = new JMenuItem("Category");
 	private final JMenuItem mItemObject = new JMenuItem("Object");
 	private final JMenuItem mItemSwitch = new JMenuItem("Switch");
-	private final JMenuItem mItemBattery = new JMenuItem("Battery");
-	private final JButton btnDel = new JButton("Delete");
-	private final JButton btnAddHolEL = new JButton("New Element");
-	private final JButton btnDelHolEL = new JButton("Delete Element");
-	private final JButton resetGraphBtn = new JButton("Reset");
+	private final JButton btnDel = new JButton();
+	private final JButton btnAddHolEL = new JButton();
+	private final JButton btnDelHolEL = new JButton();
 
 	private final JToolBar toolBar = new JToolBar();
 	private final JToolBar toolBarHolonEl = new JToolBar();
 	private final JToolBar toolBarGraph = new JToolBar();
 	// Languages
-	private final JMenuItem englishBtn = new JMenuItem("EN");
-	private final JMenuItem spanishBtn = new JMenuItem("ES");
-	private final JMenuItem germanBtn = new JMenuItem("DE");
-	private final JMenuItem czechBtn = new JMenuItem("CZ");
-	private final JMenuItem chineseBtn = new JMenuItem("ZH");
 	private final MyCanvas canvas;
 	private final UnitGraph unitGraph;
 	/** Textfield to show the period of an element */
 	private final JTextField unitGraphLocalPeriod = new JTextField(6);
-	private final JSplitPane splitPane3 = new JSplitPane();
-	private final JSlider sizeSlider = new JSlider();
-	private final JLabel lblImageSize = new JLabel(Languages.getLanguage()[94]);
 	private final JMenuItem mntmUndo = new JMenuItem("Undo");
 	private final JMenuItem mntmRedo = new JMenuItem("Redo");
 	private final JMenuItem mntmEditEdges = new JMenuItem("Edge Properties");
 	private final JMenuItem mntmFindReplace = new JMenuItem("Find/ Replace");
 	private final JMenuItem mntmAlignAll = new JMenuItem("Align All");
-	private final JMenuItem mntmEditShowedInformation = new JMenuItem(
-			"Edit showed Information");
 	private final JMenuItem mntmResetCategory = new JMenuItem(
 			"Reset Categories");
-	private final JMenu mnLanguage = new JMenu("Language");
 	private final String[] columnNamesMulti = { "Object", "Nr.", "Device",
 			"Energy", "Flexibility active", "Quantity", "Activated" };
 	private final String[] columnNamesSingle = { "Nr.", "Device", "Energy",
 			"Flexibility active", "Quantity", "Activated" };
 	private final ArrayList<PropertyTable> tables = new ArrayList<>();
 	private final UpdateController updCon;
-	private final JSplitPane splitPane_1 = new JSplitPane();
-	private final JLabel lblHolonBodySize = new JLabel("HolonBody SIze");
 	// for doubleclick
 	private boolean click = false;
 	private JFrame holegJFrame;
 	private JTabbedPane tabTemp; // tabbedPaneOriginal or tabbedPaneSplit
-	private JSplitPane tempSplit;
 	private boolean initSplit = true;
 	private String catOfObjToBeEdited;
 	private GroupNodeCanvas unc;
@@ -390,7 +368,7 @@ public class GUI{
 			@Override
 			public void windowClosing(java.awt.event.WindowEvent windowEvent) {
 				if (JOptionPane.showConfirmDialog(holegJFrame,
-						Languages.getLanguage()[88],
+						"Are you sure you want to exit?",
 						"HOLEG",
 						JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION) {
 					controller.deleteDirectory(new File(System
@@ -700,28 +678,6 @@ public class GUI{
 		mnNewMenuEdit.add(mntmUndo);
 
 		mnNewMenuEdit.add(mntmRedo);
-
-		mnLanguage.add(englishBtn);
-		englishBtn.setIcon(new ImageIcon(new ImageIcon(
-				"res/Button_Images/FlagEN.png").getImage().getScaledInstance(
-				20, 20, java.awt.Image.SCALE_SMOOTH)));
-		mnLanguage.add(spanishBtn);
-		spanishBtn.setIcon(new ImageIcon(new ImageIcon(
-				"res/Button_Images/FlagES.png").getImage().getScaledInstance(
-				20, 20, java.awt.Image.SCALE_SMOOTH)));
-		mnLanguage.add(germanBtn);
-		germanBtn.setIcon(new ImageIcon(new ImageIcon(
-				"res/Button_Images/FlagDE.png").getImage().getScaledInstance(
-				20, 20, java.awt.Image.SCALE_SMOOTH)));
-		// mnLanguage.add(czechBtn);
-		// czechBtn.setIcon(new ImageIcon(new
-		// ImageIcon("res/Button_Images/FlagCZ.png").getImage().getScaledInstance(20,
-		// 20, java.awt.Image.SCALE_SMOOTH)));
-		mnLanguage.add(chineseBtn);
-		chineseBtn.setIcon(new ImageIcon(new ImageIcon(
-				"res/Button_Images/FlagZH.png").getImage().getScaledInstance(
-				20, 20, java.awt.Image.SCALE_SMOOTH)));
-
 		mntmFindReplace.addActionListener(actionEvent -> {
 			try {
 				SearchPopUp dialog = new SearchPopUp(controller, canvas,
@@ -831,31 +787,7 @@ public class GUI{
 			popUp.setVisible(true);
 		});
 		
-		mnNewMenuView.add(splitPane3);
-
-		sizeSlider.setMinimum(15);
-		sizeSlider.setMaximum(115);
-		sizeSlider
-				.addChangeListener(changeEvent -> {
-					controller.setScale(sizeSlider.getValue());
-
-					JScrollPane scrollPane = getScrollPaneFromTabbedPane();
-
-					if (scrollPane.getViewport().getComponent(0) instanceof GroupNodeCanvas) {
-						scrollPane.getViewport().getComponent(0).repaint();
-					} else {
-						canvas.repaint();
-					}
-					if (!initSplit
-							&& scrollPane.getViewport().getComponent(0) instanceof GroupNodeCanvas) {
-						scrollPane.getViewport().getComponent(0).repaint();
-					} else {
-						canvas.repaint();
-					}
-				});
-
 		mnNewMenuView.add(mntmCanvasSize);
-		mnNewMenuView.add(mntmSplitView);
 
 		/*
 		 * Adds Checkbox to turn supply bars on/off
@@ -877,35 +809,7 @@ public class GUI{
 					}
 				}
 			});
-		
-		mnNewMenuView.add(showTooltipsCheckBox);
-		showTooltipsCheckBox.setSelected(true);
-		showTooltipsCheckBox.addActionListener(arg0 -> {
-			showHint(showTooltipsCheckBox.isSelected());
-			});
 		initWindowMenu();
-		// Split View
-		mntmSplitView
-				.addActionListener(actionEvent -> {
-					for (int i = 0; i < tabbedPaneOriginal.getTabCount(); i++) {
-						// add outer tabs
-						// (inner tabs are added by tabbedPaneSplit
-						// changelistener)
-						tabbedPaneSplit.addTab(
-								tabbedPaneOriginal.getTitleAt(i), null);
-					}
-					
-					tempSplit = new JSplitPane();
-					tempSplit.setBorder(null);
-					tempSplit.setRightComponent(tabbedPaneSplit);
-					tempSplit.setLeftComponent(tabbedPaneOriginal);
-					tempSplit.setDividerLocation(tabbedPaneOriginal
-							.getWidth() / 2);
-					tempSplit.setResizeWeight(0.9);
-					initSplit = false;
-				
-					contentPane.updateUI();
-				});
 		
 		
 		
@@ -937,13 +841,8 @@ public class GUI{
 					}
 				});
 
-		splitPane3.setRightComponent(sizeSlider);
-
-		splitPane3.setLeftComponent(lblImageSize);
 
-		mnNewMenuView.add(splitPane_1);
 
-		splitPane_1.setLeftComponent(lblHolonBodySize);
 
 
 		/**
@@ -1006,8 +905,6 @@ public class GUI{
 				contentPane.updateUI();
 			}
 		});
-
-		mnNewMenuOptions.add(mnLanguage);
 		canvas.setBackground(Color.WHITE);
 		canvas.setPreferredSize(new Dimension(model.getCanvasX(), model
 				.getCanvasY()));
@@ -1170,6 +1067,10 @@ public class GUI{
 				JOptionPane.showMessageDialog(contentPane, "No object selected.\nPlease select a object first." , "Message" , JOptionPane.INFORMATION_MESSAGE);
 			}
 		});
+		btnAddHolEL.setIcon(new ImageIcon(ImageImport.loadImage("Images/plus.png", 16, 16)));
+		btnAddHolEL.setToolTipText("<html><b>Add Element</b><br>Add a new HolonElement to the HolonObject.</html>");
+		
+		
 		/*
 		 * Delete the chosen HolonElement of the selected HolonObject,
 		 * Multi-Selection for CpsObjects as well as for HolonElements possible
@@ -1210,9 +1111,11 @@ public class GUI{
 				JOptionPane.showMessageDialog(contentPane, "No object selectet.\nPlease select a object first." , "No object selectet" , JOptionPane.INFORMATION_MESSAGE);
 			}
 	triggerUpdateController(null);
-	elementGraph.setText(Languages.getLanguage()[25]);
-	holonEleNamesDisplayed = Languages.getLanguage()[25];
+	elementGraph.setText("None");
+	holonEleNamesDisplayed = "None";
 })		;
+		btnDelHolEL.setIcon(new ImageIcon(ImageImport.loadImage("Images/minus.png", 16, 16)));
+		btnDelHolEL.setToolTipText("<html><b>Remove Element</b><br>Removes the selected HolonElement from the HolonObject.</html>");
 		/*
 		 * Communication between HolonElement Table and displayed Graph and
 		 * Properties, as well as selection of different HolonElements
@@ -1243,8 +1146,7 @@ public class GUI{
 					if (e.isControlDown()) {
 						if (!selectedElements.contains(ele)) {
 							selectedElements.add(ele);
-							if (!holonEleNamesDisplayed.equals(Languages
-									.getLanguage()[25])) {
+							if (!holonEleNamesDisplayed.equals("None")) {
 								holonEleNamesDisplayed = holonEleNamesDisplayed
 										+ "; " + ele.getEleName() + " ";
 							} else {
@@ -1265,7 +1167,7 @@ public class GUI{
 						updateUnitGraph((GraphEditable)selectedElements.get(selectedElements.size()-1));
 					}
 				} else {
-					elementGraph.setText(Languages.getLanguage()[25]);
+					elementGraph.setText("None");
 					hideScrollGraph();
 				}
 				// if any HolonElement is double-clicked --> Edit-Mode started
@@ -1277,7 +1179,7 @@ public class GUI{
 				// for single click and empty slot
 				if (e.getClickCount() == 1 && ele == null) {
 					selectedElements.clear();
-					holonEleNamesDisplayed = Languages.getLanguage()[25];
+					holonEleNamesDisplayed = "None";
 				}
 				elementGraph.setText(holonEleNamesDisplayed);
 				yBTis = e.getY();
@@ -1783,10 +1685,6 @@ public class GUI{
 								if (tempCps instanceof HolonSwitch) {
 									h = new HolonSwitch(tempCps);
 								}
-								if (tempCps instanceof HolonBattery)
-								{
-									h = new HolonBattery(tempCps);
-								}
 								h.setPosition(x, y);
 
 								/**
@@ -1820,10 +1718,6 @@ public class GUI{
 								h = new HolonSwitch(tempCps);
 							}
 							
-							if (tempCps instanceof HolonBattery)
-							{
-								h = new HolonBattery(tempCps);
-							}
 							h.setPosition(x, y);
 							
 							/**
@@ -1975,12 +1869,9 @@ public class GUI{
 		mItemSwitch.addActionListener(actionEvent -> {
 			new CreateNewDialog(controller,Option.Switch, holegJFrame);
 		});
-		btnAddPopUp.add(mItemBattery);
-		mItemBattery.addActionListener(actionEvent -> {
-			new CreateNewDialog(controller,Option.Battery, holegJFrame);
-		});
 		btnAdd.addActionListener(actionEvent -> btnAddPopUp.show(btnAdd, -1, +20));
-		btnAdd.setToolTipText("Add a new Category or Item to the library.");
+		btnAdd.setIcon(new ImageIcon(ImageImport.loadImage("Images/plus.png", 16, 16)));
+		btnAdd.setToolTipText("<html><b>New</b><br>Add a new Category or Item to the library.</html>");
 		toolBar.add(btnAdd);
 		/**
 		 * Help Menu Action Listeners
@@ -2049,11 +1940,11 @@ public class GUI{
 
 			@Override
 			public void mouseReleased(MouseEvent e) {
-				holonEleNamesDisplayed = Languages.getLanguage()[25];
+				holonEleNamesDisplayed = "None";
 				// If any empty space is clicked
 				if (temp == null || temp.getId() != model.getSelectedObjectID()) {
 					hideScrollGraph();
-					elementGraph.setText(Languages.getLanguage()[25]);
+					elementGraph.setText("None");
 				}
 				temp = updCon.getActualCps();
 				// Erase old data in the PropertyTable
@@ -2139,7 +2030,10 @@ public class GUI{
 			}
 			tree.repaint();
 		});
+		btnDel.setIcon(new ImageIcon(ImageImport.loadImage("Images/minus.png", 16, 16)));
+		btnDel.setToolTipText("<html><b>Delete</b><br>Removes a Category or a Category Item.</html>");
 		toolBar.add(btnDel);
+		
 
 		holegJFrame.getContentPane().add(splitPane);
 
@@ -2160,7 +2054,7 @@ public class GUI{
 			controller.setSelecteEdge(null);
 			controller.setCurIteration(0);
 			hideScrollGraph();
-			elementGraph.setText(Languages.getLanguage()[25]);
+			elementGraph.setText("None");
 			canvas.tempCps = null;
 			canvas.repaint();
 			IdCounter.resetCounter();
@@ -2248,31 +2142,6 @@ public class GUI{
 			}
 		});
 
-		englishBtn.addActionListener(actionEvent -> {
-			Languages.setLanguage(0);
-			refreshLanguages();
-			updCon.refreshTableProperties(model.getPropertyTable());
-		});
-		spanishBtn.addActionListener(actionEvent -> {
-			Languages.setLanguage(1);
-			refreshLanguages();
-			updCon.refreshTableProperties(model.getPropertyTable());
-		});
-		germanBtn.addActionListener(actionEvent -> {
-			Languages.setLanguage(2);
-			refreshLanguages();
-			updCon.refreshTableProperties(model.getPropertyTable());
-		});
-		czechBtn.addActionListener(actionEvent -> {
-			Languages.setLanguage(3);
-			refreshLanguages();
-			updCon.refreshTableProperties(model.getPropertyTable());
-		});
-		chineseBtn.addActionListener(actionEvent -> {
-			Languages.setLanguage(4);
-			refreshLanguages();
-			updCon.refreshTableProperties(model.getPropertyTable());
-		});
 
 		mntmUndo.addActionListener(new ActionListener() {
 			@Override
@@ -2335,9 +2204,6 @@ public class GUI{
 		
 		
 		myPanel.add(canvasSP, BorderLayout.CENTER);
-		myPanel.add(lblHint, BorderLayout.PAGE_END);
-		lblHint.setBackground(new Color(53, 178, 76, 100));
-		lblHint.setOpaque(true);
 		
 		
 		tabbedPaneInnerOriginal.addTab("Main Grid", myPanel);
@@ -2575,56 +2441,6 @@ public class GUI{
 		return holegJFrame;
 	}
 
-	private void refreshLanguages() {
-		String[] tempArray = Languages.getLanguage();
-		// ToolBar
-		mnNewMenu.setText(tempArray[0]);
-		mntmNew.setText(tempArray[1]);
-		mntmOpen.setText(tempArray[2]);
-		mntmSave.setText(tempArray[3]);
-		mnNewMenuEdit.setText(tempArray[4]);
-		mntmUndo.setText(tempArray[5]);
-		mntmRedo.setText(tempArray[6]);
-		mntmFindReplace.setText(tempArray[7]);
-		mntmEditShowedInformation.setText(tempArray[8]);
-		mnNewMenuOptions.setText(tempArray[9]);
-		mntmResetCategory.setText(tempArray[10]);
-		mnNewMenuView.setText(tempArray[11]);
-		mntmCanvasSize.setText(tempArray[12]);
-		mnHelp.setText(tempArray[13]);
-		mntmAboutUs.setText(tempArray[14]);
-		mntmEditEdges.setText(tempArray[15]);
-		mnLanguage.setText(tempArray[16]);
-		canvas.updateLanguages();
-
-		// Tables
-		System.arraycopy(tempArray, 17, columnNamesMulti, 0,
-				columnNamesMulti.length);
-		model.getMultiTable().setColumnIdentifiers(columnNamesMulti);
-		System.arraycopy(tempArray, 18, columnNamesSingle, 0,
-				columnNamesSingle.length);
-		model.getSingleTable().setColumnIdentifiers(columnNamesSingle);
-		model.colNames[0] = tempArray[23];
-		model.colNames[1] = tempArray[24];
-		model.getPropertyTable().setColumnIdentifiers(model.colNames);
-		// Graph
-		elementGraph.setText(tempArray[25]);
-		holonEleNamesDisplayed = tempArray[25];
-		resetGraphBtn.setText(tempArray[26]);
-		// Warning PopUps
-		warningText = tempArray[27];
-		saveBeforeNew = tempArray[28];
-		eraseCategory = tempArray[29];
-		selectObjBeforeErase = tempArray[30];
-		// TimePanel
-		timePanel.playBtn.setToolTipText(Languages.getLanguage()[89]);
-		timePanel.timeResetBtn.setToolTipText(Languages.getLanguage()[90]);
-		timePanel.timeForwardBtn.setToolTipText(Languages.getLanguage()[91]);
-		timePanel.timeBackwardBtn.setToolTipText(Languages.getLanguage()[92]);
-		timePanel.timeSlider.setToolTipText(Languages.getLanguage()[93]);
-		// Image Size Slider
-		lblImageSize.setText(Languages.getLanguage()[94]);
-	}
 
 	/**
 	 * Checks if a double click was made.
@@ -2723,7 +2539,7 @@ public class GUI{
 				@Override
 				public void mousePressed(MouseEvent e) {
 					hideScrollGraph();
-					holonEleNamesDisplayed = Languages.getLanguage()[25];
+					holonEleNamesDisplayed = "None";
 					elementGraph.setText(holonEleNamesDisplayed);
 
 					chooseTabTemp();
@@ -2968,13 +2784,6 @@ public class GUI{
 			e1.printStackTrace();
 		}
 	}
-	/**
-	 * Function to set the visibility for Hints
-	 * @param enable true = show false = hide
-	 */
-	public void showHint(boolean enable){
-		lblHint.setVisible(enable);
-	}
 	
 	/**
 	 * closes all UpperNodeTabs, that don't have a

+ 0 - 4
src/ui/view/GroupNodeCanvas.java

@@ -102,8 +102,6 @@ public class GroupNodeCanvas extends AbstractCanvas implements MouseListener, Mo
         popmenu.addSeparator();
         popmenu.add(itemGroup);
         popmenu.add(itemUngroup);
-        popmenu.add(itemTrack);
-        popmenu.add(itemUntrack);
         popmenu.add(itemCreateTemplate);
         
         itemAlign.setEnabled(true);
@@ -113,8 +111,6 @@ public class GroupNodeCanvas extends AbstractCanvas implements MouseListener, Mo
         itemPaste.setEnabled(true);
         itemGroup.setEnabled(false);
         itemUngroup.setEnabled(false);
-        itemTrack.setEnabled(false);
-        itemUntrack.setEnabled(false);
         
         updCon = new UpdateController(model, controller);
         

+ 0 - 147
src/ui/view/Languages.java

@@ -1,147 +0,0 @@
-package ui.view;
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import java.nio.charset.Charset;
-
-import utility.ImageImport;
-
-
-//TODO remove this
-public class Languages {
-
-	static int languageVar = 0;
-
-	// Language Array Positions:
-	// ToolBar (0-16)
-	// Tables (17-24)
-	// Graph (25-26)
-	// Warning PopUps (27-30)
-	// Edit Edges Pop Up (31-34)
-	// Search/Replace Pop Up (35-45)
-	// Edit Edges Pop Up (46-55)
-	// Add PopUp Tree (56-63)
-	// Add PopUp Element (64-71)
-	// Info for PropertyTable (72-82)
-	// Info SimulationMenu (83-87)
-	// Exit Pop Up (88)
-	// Simulation ToolTip (89-93)
-	// Image Size Slider (94)
-	// Menu - right click on HolonObjt (95-104)
-	public static final int right_click_create_template = 104;
-	// to add more: increase languageSize and add them to the arrayEN
-
-	/**
-	 * Number of different Language Array Positions
-	 */
-	private static int languageSize = 105;
-
-	static String[] arrayEN = {
-			// ToolBar (0-16)
-			"File", "New", "Open", "Save", "Edit", "Undo", "Redo", "Find/Replace", "Edit showed Information", "Options",
-			"Reset Categories", "View", "View Size", "Help", "About Us", "Edit Edges", "Language",
-			// Tables (17-24)
-			"Object", "Nr.", "Device", "Energy", "Quantity", "Activated", "Field", "Information",
-			// Graph (25-26)
-			"None ", "Reset",
-			// Warning PopUps (27-30)
-			"Warning", "Do you want to save your current data?", "Do you really want to delete the Category ",
-			"Please select a Category or an Object in order to delete something.",
-			// Edit Edges Pop Up (31-34)
-			"Edit Showed Informations", "Show Total Energy of Objects", "Show Connection Properties", "Cancel",
-			// Search/Replace Pop Up (35-45)
-			"Search for Objects", "Find", "Replace", "Direction", "Forward", "Backward", "Scope", "All", "Single",
-			"Replace All", "Close",
-			// Edit Edges Pop Up (46-55)
-			"Edit Capacities of Edges", "Maximum Capacity:", "Change for all existing Edges only",
-			"Change for new created Edges only", "Change for all existing and new created Edges", "Cancel",
-			"Please select one of the options",
-			"Please enter a number greater or equal 0 in the Field for Maximum Capacity", "Edit Edge Capacities",
-			"(enter \"infinite\" for infinite Capacity)",
-			// Add PopUp Tree (56-63)
-			"Please enter a Name for Category ", "Please select a Category first before adding ", "Add Object Menu",
-			"Name:", "Browse Image", "Add Element", "Delete Element", "Cancel",
-			// Add PopUp Element (64-71)
-			"Add Element to Object", "Element Name:", "Provided Energy:", "Amount:",
-			"Please enter numbers in the Fields amount and Energy", "No name", "Name already given", "Cancel",
-			// Info for PropertyTable (72-82)
-			"Name", "Total Energy", "Manual", "Active", " is connected to", " with ID: ", "Edge: ", " to ",
-			"Current flow", "Max. Capacity", "Status",
-			// Info SimulationMenu (83-87)
-			"Simulate", "Simulation Speed:", "Algorithm:", "non selected", "success",
-			// Exit Pop Up (88)
-			"Are you sure you want to exit?",
-			// Simulation ToolTip (89-93)
-			"Play", "Reset", "Forward", "Backward", "Time Slider",
-			// Image Size Slider (94)
-			"Image Size",
-			// Menu - right click on HolonObjt (95-104)
-			"Cut", "Copy", "Paste", "Delete", "Group", "Ungroup", "Track", "Untrack","Category","Create Template"};
-
-	static String[] arrayES = readLanguageFile("Texts/ES.lang"); 
-
-	static String[] arrayDE = readLanguageFile("Texts/DE.lang"); 
-		
-	static String[] arrayCZ = readLanguageFile("Texts/CZ.lang"); 
-
-	static String[] arrayZH = readLanguageFile("Texts/ZH.lang");
-	
-	public static String[] getLanguage() {
-		switch (languageVar) {
-		case 0:
-			return arrayEN;
-		case 1:
-			return arrayES;
-		case 2:
-			return arrayDE;
-		case 3:
-			return arrayCZ;
-		case 4:
-			return arrayZH;
-		default:
-			return arrayEN;
-		}
-	}
-
-	public static void setLanguage(int i) {
-		languageVar = i;
-	}
-	
-	/**
-	 * Reads language file from jar, each line corresponds to
-	 * a position of the {@value #arrayEN}.
-	 * Lines starting with # are ignored as Comments.
-	 * Missing translations will be filled with english text.
-	 * @param path path of the file e.g. "Texts/DE.lang"
-	 * @return Array of translated String as arrayEN 
-	 */
-	private static String[] readLanguageFile(String path){
-		String[] langArr;
-		try {
-			//read File from Jar
-			InputStreamReader reader = new InputStreamReader(ImageImport.loadStream(/*Languages.class.getClassLoader(),*/path));
-			BufferedReader br = new BufferedReader(reader);
-			
-			//store Lines in Array
-			int lineNumber = 0;
-			langArr = new String[languageSize];
-			for (String line = br.readLine(); line != null && lineNumber<languageSize; line = br.readLine()) {
-				//store line in Array, # initializes Comments
-				if (line.isEmpty() || line.startsWith("#"))
-					continue;
-				langArr[lineNumber]=new String(line.getBytes(Charset.defaultCharset()),"UTF-8");
-				lineNumber++;
-			}
-			//missing translations? -> english
-			while(lineNumber<languageSize){
-				langArr[lineNumber]=arrayEN[lineNumber];
-				lineNumber++;
-			}
-			reader.close();
-			return langArr;
-		} catch (Exception e) {
-			System.err.print("Loading Languagepack: "+path+" failed.");
-			//default: English
-			return arrayEN;
-		}
-	}
-}

+ 7 - 13
src/ui/view/MyCanvas.java

@@ -88,8 +88,6 @@ public class MyCanvas extends AbstractCanvas implements MouseListener,
 		popmenu.addSeparator();
 		popmenu.add(itemGroup);
 		popmenu.add(itemUngroup);
-		popmenu.add(itemTrack);
-		popmenu.add(itemUntrack);
 		popmenu.add(itemCreateTemplate);
 
 		updCon = new UpdateController(mod, control);
@@ -101,10 +99,8 @@ public class MyCanvas extends AbstractCanvas implements MouseListener,
 		itemAlign.setEnabled(false);
 		itemGroup.setEnabled(false);
 		itemUngroup.setEnabled(false);
-		itemTrack.setEnabled(false);
-		itemUntrack.setEnabled(false);
 
-		itemCut.setText(Languages.getLanguage()[95]);
+		itemCut.setText("Cut");
 		
 		itemGroup.addActionListener(actionEvent -> {
 			// calculate uppernode pos (taken from the controller)
@@ -1041,14 +1037,12 @@ public class MyCanvas extends AbstractCanvas implements MouseListener,
 	}
 
 	void updateLanguages() {
-		itemCut.setText(Languages.getLanguage()[95]);
-		itemCopy.setText(Languages.getLanguage()[96]);
-		itemPaste.setText(Languages.getLanguage()[97]);
-		itemDelete.setText(Languages.getLanguage()[98]);
-		itemGroup.setText(Languages.getLanguage()[99]);
-		itemUngroup.setText(Languages.getLanguage()[100]);
-		itemTrack.setText(Languages.getLanguage()[101]);
-		itemUntrack.setText(Languages.getLanguage()[102]);
+		itemCut.setText("Cut");
+		itemCopy.setText("Copy");
+		itemPaste.setText("Paste");
+		itemDelete.setText("Delete");
+		itemGroup.setText("Group");
+		itemUngroup.setText("Ungroup");
 	}
 
 	/**

+ 13 - 13
src/ui/view/SearchPopUp.java

@@ -41,7 +41,7 @@ public class SearchPopUp extends JDialog {
         super((java.awt.Frame) null, true);
 		idx = -1;
 		setModalityType(java.awt.Dialog.ModalityType.APPLICATION_MODAL);
-		this.setTitle(Languages.getLanguage()[35]);
+		this.setTitle("Search for Objects");
 		setBounds(100, 100, 250, 360);
         setLocationRelativeTo(parentFrame);
         getContentPane().setLayout(new BorderLayout());
@@ -52,12 +52,12 @@ public class SearchPopUp extends JDialog {
 		this.controller = contr;
 		this.canvas = can;
 
-		JLabel lblFind = new JLabel(Languages.getLanguage()[36] + ":");
+		JLabel lblFind = new JLabel("Find" + ":");
 		lblFind.setFont(new Font("Tahoma", Font.PLAIN, 13));
 		lblFind.setBounds(10, 11, 46, 19);
 		contentPanel.add(lblFind);
 
-		JLabel lblReplace = new JLabel(Languages.getLanguage()[37] + ":");
+		JLabel lblReplace = new JLabel("Replace" + ":");
 		lblReplace.setFont(new Font("Tahoma", Font.PLAIN, 13));
 		lblReplace.setBounds(10, 41, 80, 14);
 		contentPanel.add(lblReplace);
@@ -74,40 +74,40 @@ public class SearchPopUp extends JDialog {
 		contentPanel.add(findTextField);
 		findTextField.setColumns(10);
 
-		JLabel lblNewLabel = new JLabel(Languages.getLanguage()[38]);
+		JLabel lblNewLabel = new JLabel("Direction");
 		lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 13));
 		lblNewLabel.setBounds(10, 90, 82, 14);
 		contentPanel.add(lblNewLabel);
 
-		rdbtnForward = new JRadioButton(Languages.getLanguage()[39]);
+		rdbtnForward = new JRadioButton("Forward");
 		rdbtnForward.setFont(new Font("Tahoma", Font.PLAIN, 13));
 		rdbtnForward.setBounds(10, 111, 109, 23);
 		contentPanel.add(rdbtnForward);
 		rdbtnForward.setSelected(true);
 
-		rdbtnBackward = new JRadioButton(Languages.getLanguage()[40]);
+		rdbtnBackward = new JRadioButton("Backward");
 		rdbtnBackward.setFont(new Font("Tahoma", Font.PLAIN, 13));
 		rdbtnBackward.setBounds(10, 137, 109, 23);
 		contentPanel.add(rdbtnBackward);
 
-		JLabel lblScope = new JLabel(Languages.getLanguage()[41]);
+		JLabel lblScope = new JLabel("Scope");
 		lblScope.setFont(new Font("Tahoma", Font.BOLD, 13));
 		lblScope.setBounds(122, 90, 60, 14);
 		contentPanel.add(lblScope);
 
-		rdbtnAll = new JRadioButton(Languages.getLanguage()[42]);
+		rdbtnAll = new JRadioButton("All");
 		rdbtnAll.setFont(new Font("Tahoma", Font.PLAIN, 13));
 		rdbtnAll.setBounds(121, 112, 109, 23);
 		contentPanel.add(rdbtnAll);
 		rdbtnAll.setSelected(true);
 
-		rdbtnSingle = new JRadioButton(Languages.getLanguage()[43]);
+		rdbtnSingle = new JRadioButton("Single");
 		rdbtnSingle.setFont(new Font("Tahoma", Font.PLAIN, 13));
 		rdbtnSingle.setBounds(121, 138, 109, 23);
 		contentPanel.add(rdbtnSingle);
 
 		// FindButton
-		JButton btnFind = new JButton(Languages.getLanguage()[36]);
+		JButton btnFind = new JButton("Find");
 		btnFind.addActionListener(new ActionListener() {
 			public void actionPerformed(ActionEvent e) {
 				if (rdbtnAll.isSelected()) {
@@ -145,7 +145,7 @@ public class SearchPopUp extends JDialog {
 		contentPanel.add(btnFind);
 
 		// ReplaceButton
-		JButton btnReplace = new JButton(Languages.getLanguage()[37]);
+		JButton btnReplace = new JButton("Replace");
 		btnReplace.addActionListener(new ActionListener() {
 			public void actionPerformed(ActionEvent e) {
 
@@ -160,7 +160,7 @@ public class SearchPopUp extends JDialog {
 		contentPanel.add(btnReplace);
 
 		// ReplaceAllButton
-		JButton btnReplaceAll = new JButton(Languages.getLanguage()[44]);
+		JButton btnReplaceAll = new JButton("Replace All");
 		btnReplaceAll.addActionListener(new ActionListener() {
 			public void actionPerformed(ActionEvent e) {
 				canvas.tempCps = null;
@@ -185,7 +185,7 @@ public class SearchPopUp extends JDialog {
 		contentPanel.add(btnReplaceAll);
 
 		// CloseButton
-		JButton btnClose = new JButton(Languages.getLanguage()[45]);
+		JButton btnClose = new JButton("Close");
 		btnClose.addActionListener(new ActionListener() {
 			public void actionPerformed(ActionEvent arg0) {
 				dispose();

+ 5 - 5
src/ui/view/TimePanel.java

@@ -145,7 +145,7 @@ public class TimePanel extends JPanel implements ActionListener{
 		timeSlider.setPaintLabels(true);
 		timeSlider.setMajorTickSpacing((int)Math.ceil(((double)cont.getModel().getIterations())/20));
 		timeSlider.setMinorTickSpacing((int)Math.ceil(((double)cont.getModel().getIterations())/100));
-		timeSlider.setToolTipText(Languages.getLanguage()[93]);
+		timeSlider.setToolTipText("Time Slider");
 		timeSlider.setMaximum(cont.getModel().getIterations() - 1);
 		timeSlider.setValue(0);
 		timeSlider.addChangeListener(changeEvent -> controller.setCurIteration(timeSlider.getValue()));
@@ -173,7 +173,7 @@ public class TimePanel extends JPanel implements ActionListener{
 		timeBtnPanel.setLayout(new FlowLayout(FlowLayout.CENTER));
 
 		// Buttons
-		playBtn.setToolTipText(Languages.getLanguage()[89]);
+		playBtn.setToolTipText("Play");
 
 		playBtn.setContentAreaFilled(false);
 		playBtn.setBorderPainted(false);
@@ -205,7 +205,7 @@ public class TimePanel extends JPanel implements ActionListener{
 				}
 			}
 		});
-		timeResetBtn.setToolTipText(Languages.getLanguage()[90]);
+		timeResetBtn.setToolTipText("Reset");
 
 		timeResetBtn.setContentAreaFilled(false);
 		timeResetBtn.setBorder(null);
@@ -221,7 +221,7 @@ public class TimePanel extends JPanel implements ActionListener{
 				}
 			}
 		});
-		timeForwardBtn.setToolTipText(Languages.getLanguage()[91]);
+		timeForwardBtn.setToolTipText("Forward");
 
 		timeForwardBtn.setContentAreaFilled(false);
 		timeForwardBtn.setBorder(null);
@@ -232,7 +232,7 @@ public class TimePanel extends JPanel implements ActionListener{
 				controller.setCurIteration(timeSlider.getValue());
 			}
 		});
-		timeBackwardBtn.setToolTipText(Languages.getLanguage()[92]);
+		timeBackwardBtn.setToolTipText("Backward");
 
 		timeBackwardBtn.setBorder(null);
 		timeBackwardBtn.setIcon(new ImageIcon(ImageImport.loadImage("/Button_Images/backward.png", 30,30)));