类的使用
com.example.renderer.factory.Rectangle
使用Rectangle的程序包
-
com.example.renderer.factory中Rectangle的使用
修饰符和类型方法说明Rectangle.clone()
BasicShapeFactory.createRectangle
(int x, int y, int width, int height) ShapeFactory.createRectangle
(int x, int y, int width, int height) 创建矩形实例ShapeFactoryImpl.createRectangle
(int x, int y, int width, int height) -
com.example.renderer.visitor中Rectangle的使用
参数类型为Rectangle的com.example.renderer.visitor中的方法修饰符和类型方法说明void
ExportVisitor.visitRectangle
(Rectangle rectangle) 访问矩形对象void
JSONExportVisitor.visitRectangle
(Rectangle r) 将矩形对象转换为JSON格式输出 格式: {"type":"rectangle", "x":x, "y":y, "w":width, "h":height}void
XMLExportVisitor.visitRectangle
(Rectangle r)