Public Class FillState
  Inherits State
  Private med As Mediator

  Public Sub New(ByVal md As Mediator)
    med = md
  End Sub

  Public Overrides Sub mouseDown(ByVal x As Integer, ByVal y As Integer)
    Dim i As Integer
    Dim d As Drawing
    'Wypełnia rysunek jeśli zostanie wybrany
    i = med.findDrawing(x, y)
    If i >= 0 Then
      d = med.getDrawing(i)
      d.setFill(True)             'wypełnia rysunek
    End If
  End Sub

  Public Overrides Sub selectOne(ByVal d As vbState.Drawing)
    'Wypełnia wybrany rysunek
    d.setFill(True)
  End Sub

End Class
