Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    DrawPane doesn't display

    I am trying to run your demo RadialGradientSample, but I can't seem to get the DrawPane to display.

    If I comment out the lines:
    drawPane.draw() and
    layout.addMember(drawPane)
    I see the color pickers and slide bar, but if I run it without the commented lines, nothing appears on the screen.

    I am running
    NetBeans IDE 7.1,
    GWT4NB 2.10.5,
    GWT 2.4.0,
    SmartGWTPro 3.0 (SmartClient Version: SC_SNAPSHOT-2012-03-11_v8.2p/LGPL Development Only (built 2012-03-11)),
    on a Window 7 box.

    The only messages in the Developers COnsole were:

    11:12:07.648:INFO:Log:initialized
    11:12:07.951:WARN:Log:New Class ID: 'EditPane' collides with ID of existing Class object '[DataSource ID:EditPane]'. Existing object will be replaced.
    This conflict would be avoided by disabling ISC Simple Names mode. See documentation for further information.
    11:12:07.998:INFO:Log:isc.Page is loaded

    Thanks.

    #2
    I am having a similar issue in JDeveloper. I'm trying to get the shape rotation showcase example working, and only the scrollbar for rotation displays. The DrawPane does not display.

    IE 9 64-bit
    JDev 11g (11.1.2.1.0)
    SmartGWT 3.0

    Code below is taken from the Showcase...

    Code:
        public void onModuleLoad() {   
            drawPane = new DrawPane();   
            drawPane.setHeight(450);   
            drawPane.setWidth(700);   
            drawPane.setLeft(25);   
            drawPane.setShowEdges(true);   
            drawPane.setEdgeSize(4);   
            drawPane.setBackgroundColor("papayawhip");   
            drawPane.setOverflow(Overflow.HIDDEN);   
            drawPane.setCursor(Cursor.AUTO);   
               
            drawPane.addDrawHandler(new DrawHandler() {   
                   
                @Override  
                public void onDraw(DrawEvent event) {   
      
                    DrawPane drawPane = (DrawPane) event.getSource();   
                       
                    DrawLabel triangleLabel = new DrawLabel();   
                    triangleLabel.setDrawPane(drawPane);   
                    triangleLabel.setLeft(50);   
                    triangleLabel.setTop(175);   
                    triangleLabel.setContents("Triangle");   
                    triangleLabel.draw();   
                    
                    DrawTriangle drawTriangle = new DrawTriangle();   
                    drawTriangle.setDrawPane(drawPane);   
                    drawTriangle.setPoints(new Point(100,50),new Point(150,150),new Point(50,150));   
                    drawTriangle.draw();   
               
                    DrawLabel curveLabel = new DrawLabel();   
                    curveLabel.setDrawPane(drawPane);   
                    curveLabel.setLeft(200);   
                    curveLabel.setTop(175);   
                    curveLabel.setContents("Curve");   
                    curveLabel.draw();   
                       
                    DrawCurve drawCurve = new DrawCurve();   
                    drawCurve.setDrawPane(drawPane);   
                    drawCurve.setStartPoint(new Point(200,50));   
                    drawCurve.setEndPoint(new Point(300,150));   
                    drawCurve.setControlPoint1(new Point(250,0));   
                    drawCurve.setControlPoint2(new Point(250,200));   
                    drawCurve.draw();   
               
                    DrawLabel linePathLabel = new DrawLabel();   
                    linePathLabel.setDrawPane(drawPane);   
                    linePathLabel.setLeft(350);   
                    linePathLabel.setTop(175);   
                    linePathLabel.setContents("Line Path");   
                    linePathLabel.draw();   
                       
                    DrawLinePath drawLinePath = new DrawLinePath();   
                    drawLinePath.setDrawPane(drawPane);   
                    drawLinePath.setStartPoint(new Point(350,50));   
                    drawLinePath.setEndPoint(new Point(450,150));   
                    drawLinePath.draw();   
               
                    DrawLabel pathLabel = new DrawLabel();   
                    pathLabel.setDrawPane(drawPane);   
                    pathLabel.setLeft(500);   
                    pathLabel.setTop(175);   
                    pathLabel.setContents("Path");   
                    pathLabel.draw();   
                       
                    DrawPath drawPath = new DrawPath();   
                    drawPath.setDrawPane(drawPane);   
                    drawPath.setPoints(   
                            new Point(500,50),   
                            new Point(525,50),   
                            new Point(550,75),   
                            new Point(575,75),   
                            new Point(600,75),   
                            new Point(600,125),   
                            new Point(575,125),   
                            new Point(550,125),   
                            new Point(525,150),   
                            new Point(500,150)   
                    );   
                    drawPath.draw();   
               
                    DrawLabel ovalLabel = new DrawLabel();   
                    ovalLabel.setDrawPane(drawPane);   
                    ovalLabel.setLeft(50);   
                    ovalLabel.setTop(415);   
                    ovalLabel.setContents("Oval");   
                    ovalLabel.draw();   
                       
                    DrawOval drawOval = new DrawOval();   
                    drawOval.setDrawPane(drawPane);   
                    drawOval.setLeft(50);   
                    drawOval.setTop(300);   
                    drawOval.setWidth(100);   
                    drawOval.setHeight(100);   
                    drawOval.draw();   
               
                    DrawLabel rectLabel = new DrawLabel();   
                    rectLabel.setDrawPane(drawPane);   
                    rectLabel.setLeft(200);   
                    rectLabel.setTop(415);   
                    rectLabel.setContents("Rect");   
                    rectLabel.draw();   
                       
                    DrawRect drawRect = new DrawRect();   
                    drawRect.setDrawPane(drawPane);   
                    drawRect.setLeft(200);   
                    drawRect.setTop(300);   
                    drawRect.setWidth(150);   
                    drawRect.setHeight(100);   
                    drawRect.draw();   
               
                    DrawLabel lineLabel = new DrawLabel();   
                    lineLabel.setDrawPane(drawPane);   
                    lineLabel.setLeft(400);   
                    lineLabel.setTop(415);   
                    lineLabel.setContents("Line");   
                    lineLabel.draw();   
                       
                    DrawLine drawLine = new DrawLine();   
                    drawLine.setDrawPane(drawPane);   
                    drawLine.setStartPoint(new Point(400,300));   
                    drawLine.setEndPoint(new Point(500,400));   
                    drawLine.draw();   
               
                    DrawLabel sectorLabel = new DrawLabel();   
                    sectorLabel.setDrawPane(drawPane);   
                    sectorLabel.setLeft(550);   
                    sectorLabel.setTop(415);   
                    sectorLabel.setContents("Sector");   
                    sectorLabel.draw();   
                       
                    DrawSector drawSector = new DrawSector();   
                    drawSector.setDrawPane(drawPane);   
                    drawSector.setCenterPoint(new Point(550,300));   
                    drawSector.setStartAngle(0);   
                    drawSector.setEndAngle(90);   
                    drawSector.setRadius(100);   
                    drawSector.draw();   
                       
                }   
            });

    Comment


      #3
      You may not have included the Drawing module in your .gwt.xml - see docs on DrawPane.

      Comment


        #4
        That was the solution - thank you, Isomorphic!

        Comment

        Working...
        X