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 RectComponentParams
9 public final static String fileExtension = ".rc";
10 public String displayName;
11 public int inputCount, outputCount, logicWidth;
12 public GeneralComponentParams composition;
14 public static class InnerComponentParams
18 public int logicWidth;
21 public static class InnerWireParams
23 public InnerPinParams pin1, pin2;
27 public static class InnerPinParams
29 public int compId, pinIndex;
32 public static RectComponentParams readJson(String path) throws IOException
34 return JsonHandler.readJson(path, RectComponentParams.class);
38 * Writes this {@link RectComponentParams} object into a file in json format. The correct file extension is important! Check
39 * {@link RectComponentParams}.fileExtension
41 public void writeJson(String path)
45 JsonHandler.writeJson(this, path);
49 System.err.println("Failed to write RectComponentParams to file");