类 ConsoleLogger

java.lang.Object
com.example.graphics.observer.ConsoleLogger
所有已实现的接口:
ShapeObserver

public class ConsoleLogger extends Object implements ShapeObserver
Console logger implementation of the ShapeObserver interface. This logs shape changes to the console.
  • 构造器详细资料

    • ConsoleLogger

      public ConsoleLogger()
  • 方法详细资料

    • onShapeAdded

      public void onShapeAdded(Shape shape)
      从接口复制的说明: ShapeObserver
      Called when a shape is added
      指定者:
      onShapeAdded 在接口中 ShapeObserver
      参数:
      shape - the shape that was added
    • onShapeRemoved

      public void onShapeRemoved(Shape shape)
      从接口复制的说明: ShapeObserver
      Called when a shape is removed
      指定者:
      onShapeRemoved 在接口中 ShapeObserver
      参数:
      shape - the shape that was removed
    • onShapeModified

      public void onShapeModified(Shape shape)
      从接口复制的说明: ShapeObserver
      Called when a shape is modified
      指定者:
      onShapeModified 在接口中 ShapeObserver
      参数:
      shape - the shape that was modified