接口 ShapeObserver

所有已知实现类:
ConsoleLogger

public interface ShapeObserver
Observer interface for the Observer pattern. This allows objects to be notified of changes to shapes.
  • 方法详细资料

    • onShapeAdded

      void onShapeAdded(Shape shape)
      Called when a shape is added
      参数:
      shape - the shape that was added
    • onShapeRemoved

      void onShapeRemoved(Shape shape)
      Called when a shape is removed
      参数:
      shape - the shape that was removed
    • onShapeModified

      void onShapeModified(Shape shape)
      Called when a shape is modified
      参数:
      shape - the shape that was modified