import net.mograsim.logic.core.wires.Wire.ReadEnd;
import net.mograsim.preferences.ColorDefinition;
-import net.mograsim.preferences.Preferences;
import net.mograsim.preferences.ColorDefinition.BuiltInColor;
+import net.mograsim.preferences.Preferences;
public class BitVectorFormatter
{
{
if (bitVector == null)
return "null";
- return bitVector.toBitStringMSBFirst();
+ return bitVector.toString();
}
// TODO doesn't this belong to logic.ui?
// TODO maybe find a color assignment for multiple-bit bit vectors?
if (bitVector == null || bitVector.length() != 1)
return new ColorDefinition(BuiltInColor.COLOR_BLACK);
- switch (bitVector.getBit(0))
+ switch (bitVector.getLSBit(0))
{
case ONE:
return Preferences.current().getColorDefinition("net.mograsim.logic.ui.color.bit.one");
case ZERO:
return Preferences.current().getColorDefinition("net.mograsim.logic.ui.color.bit.zero");
default:
- throw new IllegalArgumentException("Unknown enum constant: " + bitVector.getBit(0));
+ throw new IllegalArgumentException("Unknown enum constant: " + bitVector.getLSBit(0));
}
}