1 package net.mograsim.logic.ui.model.components.params;
3 import java.io.IOException;
5 import net.haspamelodica.swt.helper.swtobjectwrappers.Point;
7 public class SubComponentParams
9 public final static String fileExtension = ".sc";
10 public double width, height;
11 public InterfacePinParams[] interfacePins;
12 public GeneralComponentParams composition;
14 public static class InterfacePinParams
16 public Point location;
17 public int logicWidth;
20 public static SubComponentParams readJson(String path) throws IOException
22 return JsonHandler.readJson(path, SubComponentParams.class);
26 * Writes this {@link SubComponentParams} object into a file in json format. The correct file extension is important! Check
27 * {@link SubComponentParams}.fileExtension
29 public void writeJson(String path)
33 JsonHandler.writeJson(this, path);
37 System.err.println("Failed to write SubComponentParams to file");