Esempio n. 1
0
 protected Shape(int x, int y, int radius, DrawAPI drawAPI)
 {
     this.x       = x;
     this.y       = y;
     this.radius  = radius;
     this.drawAPI = drawAPI;
 }
Esempio n. 2
0
 public Circle(int x, int y, int radius, DrawAPI api)
     : base(api)
 {
     this.x      = x;
     this.y      = y;
     this.radius = radius;
 }
Esempio n. 3
0
    public static void BridgePatternDemo()
    {
        // complex drawing responsibility is left to DrawAPI
        DrawAPI drawAPI = new DrawAPI();

        Patterns.StructuralPatterns.BridgePattern.Shape shape1 = new Patterns.StructuralPatterns.BridgePattern.Circle(drawAPI);
        shape1.drawCircle();

        Patterns.StructuralPatterns.BridgePattern.Shape shape2 = new Patterns.StructuralPatterns.BridgePattern.Rectangle(drawAPI);
        shape2.drawRectangle();
    }
Esempio n. 4
0
 public Circle(int x, int y, int radius, DrawAPI drawAPI) : base(drawAPI)
 {
     this.x      = x;
     this.y      = y;
     this.radius = radius;
 }
Esempio n. 5
0
 public Shape(DrawAPI api)
 {
     drawAPI = api;
 }
Esempio n. 6
0
 public Shape(DrawAPI drawAPI)
 {
     this.drawAPI = drawAPI;
 }
Esempio n. 7
0
 protected Shape(DrawAPI a)
 {
     api = a;
 }
Esempio n. 8
0
    protected DrawAPI drawAPI;                  //Cannot be accessed

    protected AbstractShape(DrawAPI drawAPI)    //Cannot be accessed
    {
        this.drawAPI = drawAPI;
    }
Esempio n. 9
0
 public Shape(DrawAPI drawAPI)
 {
     _drawAPI = drawAPI;
 }
Esempio n. 10
0
 public Shape(DrawAPI a)
 {
     drawAPI = a;
 }
Esempio n. 11
0
 public override void Draw()
 {
     DrawAPI.drawCircle(radius, x, y);
 }
Esempio n. 12
0
 public Circle(int x, int y, int radius, DrawAPI drawAPI) : base(drawAPI)
 {
     _x      = x;
     _y      = y;
     _radius = radius;
 }
Esempio n. 13
0
 public FilledCircle(DrawAPI api) : base(api)
 {
 }
Esempio n. 14
0
 public Circle(int x, int y, int radius, DrawAPI drawAPI) : base(drawAPI)
 {                                // the drawAPI instance is protected by the abstract class DrawAPI
     this.x      = x;
     this.y      = y;
     this.radius = radius;
 }
Esempio n. 15
0
 protected Shape(DrawAPI drawAPI)
 {
     this.drawAPI = drawAPI;
 }
Esempio n. 16
0
 //private int x, y, radius;
 public Circle(int x, int y, int radius, DrawAPI drawAP) : base(x, y, radius, drawAP)
 {
 }
Esempio n. 17
0
 public EmptyCircle(DrawAPI api) : base(api)
 {
 }