import org.eclipse.swt.graphics.Color;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonPrimitive;
-
import net.haspamelodica.swt.helper.gcs.GeneralGC;
import net.haspamelodica.swt.helper.swtobjectwrappers.Font;
import net.haspamelodica.swt.helper.swtobjectwrappers.Point;
import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle;
import net.mograsim.logic.core.LogicObserver;
-import net.mograsim.logic.core.components.BitDisplay;
+import net.mograsim.logic.core.components.CoreBitDisplay;
import net.mograsim.logic.core.types.BitVectorFormatter;
import net.mograsim.logic.model.model.ViewModelModifiable;
import net.mograsim.logic.model.model.components.GUIComponent;
import net.mograsim.logic.model.model.wires.PinUsage;
import net.mograsim.logic.model.modeladapter.ViewLogicModelAdapter;
import net.mograsim.logic.model.modeladapter.componentadapters.BitDisplayAdapter;
-import net.mograsim.logic.model.serializing.IdentifierGetter;
+import net.mograsim.logic.model.serializing.IdentifyParams;
import net.mograsim.logic.model.serializing.IndirectGUIComponentCreator;
import net.mograsim.preferences.Preferences;
private final Pin inputPin;
private final LogicObserver logicObs;
- private BitDisplay bitDisplay;
+ private CoreBitDisplay bitDisplay;
public GUIBitDisplay(ViewModelModifiable model, int logicWidth)
{
gc.setFont(oldFont);
}
- public void setLogicModelBinding(BitDisplay bitDisplay)
+ public void setLogicModelBinding(CoreBitDisplay bitDisplay)
{
if (this.bitDisplay != null)
this.bitDisplay.deregisterObserver(logicObs);
return bitDisplay != null;
}
- public BitDisplay getBitDisplay()
+ public CoreBitDisplay getBitDisplay()
{
return bitDisplay;
}
}
@Override
- public JsonElement getParamsForSerializing(IdentifierGetter idGetter)
+ public String getIDForSerializing(IdentifyParams idParams)
+ {
+ return "GUIBitDisplay";
+ }
+
+ @Override
+ public Integer getParamsForSerializing(IdentifyParams idParams)
{
- return new JsonPrimitive(logicWidth);
+ return logicWidth;
}
static