コード例 #1
0
ファイル: Wire.java プロジェクト: cs3410/logisim-evolution
 public void draw(ComponentDrawContext context) {
   CircuitState state = context.getCircuitState();
   Graphics g = context.getGraphics();
   GraphicsUtil.switchToWidth(g, WIDTH);
   g.setColor(state.getValue(e0).getColor());
   g.drawLine(e0.getX(), e0.getY(), e1.getX(), e1.getY());
 }
コード例 #2
0
ファイル: Wire.java プロジェクト: cs3410/logisim-evolution
 public void propagate(CircuitState state) {
   // Normally this is handled by CircuitWires, and so it won't get
   // called. The exception is when a wire is added or removed
   state.markPointAsDirty(e0);
   state.markPointAsDirty(e1);
 }