Package com.google.gdt.eclipse.designer.gxt.model.widgets

Examples of com.google.gdt.eclipse.designer.gxt.model.widgets.SliderInfo


          ClassInstanceCreation fieldCreation =
              ((ConstructorCreationSupport) child.getCreationSupport()).getCreation();
          sliderExpression = DomGenerics.arguments(fieldCreation).get(0);
        }
        // create new Slider
        SliderInfo slider =
            (SliderInfo) JavaInfoUtils.createJavaInfo(
                getEditor(),
                "com.extjs.gxt.ui.client.widget.Slider",
                new ConstructorCreationSupport());
        // prepare "new Slider()" source
        String sliderSource;
        {
          StatementTarget statementTarget =
              new StatementTarget(AstNodeUtils.getEnclosingStatement(sliderExpression), true);
          NodeTarget nodeTarget = new NodeTarget(statementTarget);
          sliderSource = slider.getCreationSupport().add_getSource(nodeTarget);
        }
        // replace "null" with "new Slider()"
        sliderExpression = getEditor().replaceExpression(sliderExpression, sliderSource);
        slider.setVariableSupport(new EmptyVariableSupport(slider, sliderExpression));
        slider.getCreationSupport().add_setSourceExpression(sliderExpression);
        // add Slider as child
        slider.setAssociation(new ConstructorChildAssociation());
        addChild(slider);
      }
    });
  }
View Full Code Here


      List<ConstructorDescription> constructors = sliderField.getDescription().getConstructors();
      assertThat(constructors).hasSize(1);
    }
    // Slider
    {
      SliderInfo slider = getJavaInfoByName("slider");
      // Slider can not be deleted, because SliderField needs it
      assertFalse(slider.canDelete());
      assertFalse(JavaInfoUtils.canReparent(slider));
      // Slider should not be visible on design canvas, because we want that user click and move field
      assertVisibleInGraphical(slider, false);
    }
  }
View Full Code Here

TOP

Related Classes of com.google.gdt.eclipse.designer.gxt.model.widgets.SliderInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.