接口的使用
com.example.renderer.factory.Shape
使用Shape的程序包
程序包
说明
-
com.example.renderer.command中Shape的使用
参数类型为Shape的com.example.renderer.command中的构造器限定符构造器说明AddShapeCommand
(List<Shape> shapes, Shape shape) 创建添加图形命令实例DeleteShapeCommand
(List<Shape> shapes, Shape shape) 创建删除图形命令实例MoveShapeCommand
(Shape shape, int dx, int dy) 创建移动图形命令实例。类型变量类型为Shape的com.example.renderer.command中的构造器参数限定符构造器说明AddShapeCommand
(List<Shape> shapes, Shape shape) 创建添加图形命令实例DeleteShapeCommand
(List<Shape> shapes, Shape shape) 创建删除图形命令实例 -
com.example.renderer.factory中Shape的使用
修饰符和类型类说明class
圆形图形实现类,表示一个由圆心坐标和半径定义的圆形。class
椭圆图形实现类class
矩形图形实现类class
三角形图形实现类 -
com.example.renderer.singleton中Shape的使用
返回变量类型为Shape的类型的com.example.renderer.singleton中的方法类型变量类型为Shape的com.example.renderer.singleton中的方法参数修饰符和类型方法说明void
PersistenceManager.saveShapesToFile
(List<Shape> shapes, String filePath) 将图形列表序列化为JSON格式并保存到指定文件 -
com.example.renderer.ui中Shape的使用
类型变量类型为Shape的com.example.renderer.ui中的构造器参数