Package com.smartgwt.client.widgets

Examples of com.smartgwt.client.widgets.Slider


    final MapWidget map = new MapWidget("mapOsm", "gwt-samples");
    map.setController(new PanController(map));
    mapLayout.addMember(map);

    VLayout opacityLayout = new VLayout();
    Slider slider = new Slider("Opacity");
    slider.setWidth(300);
    slider.setVertical(false);
    slider.setMinValue(0);
    slider.setMaxValue(100);
    slider.setNumValues(101);
    slider.setValue(100);
    slider.addValueChangedHandler(new ValueChangedHandler() {

      public void onValueChanged(ValueChangedEvent event) {
        int intValue = event.getValue();
        double value = 0;
        if (intValue != 0) {
View Full Code Here


      // sampleMap.setSize("89px", "89px");
      layerImg.setUseOpacityFilter(true);
      sampleMap.addChild(layerTransparencyUnderlay);
      sampleMap.addChild(layerImg);

      transparencySlider = new Slider(messages.layerActionsOpacity());
      String raw = rasterLayer.getLayerInfo().getStyle();
      double opacity = 1d;
      if (raw != null && !"".equals(raw)) {
        try {
          opacity = Double.parseDouble(raw);
View Full Code Here

        eyesImg.setShowEdges(true);
        //need to set useOpacityFilter:true to support setting of opacity on IE 7 and greater
        eyesImg.setUseOpacityFilter(true);

       
        Slider slider = new Slider("");
        slider.setMinValue(0);
        slider.setMaxValue(100);
        slider.setShowRange(false);
        slider.setShowTitle(false);
        slider.setVertical(false);
        slider.setLeft(80);
        slider.setTop(200);
        slider.setValue(100);
        slider.addValueChangedHandler(new ValueChangedHandler() {
            public void onValueChanged(ValueChangedEvent event) {
                eyesImg.setOpacity(event.getValue());
            }
        });
       
View Full Code Here

    public Canvas getViewPanel() {

        Canvas canvas = new Canvas();

        final Slider vSlider = new Slider("Rating");
        vSlider.setMinValue(1);
        vSlider.setMaxValue(5);
        vSlider.setNumValues(5);
        vSlider.setHeight(300);
        canvas.addChild(vSlider);

        final Slider hSlider = new Slider("Rating");
        hSlider.setVertical(false);
        hSlider.setMinValue(1);
        hSlider.setMaxValue(5);
        hSlider.setNumValues(5);
        hSlider.setTop(200);
        hSlider.setLeft(100);
        canvas.addChild(hSlider);

        hSlider.addDrawHandler(new DrawHandler() {
            public void onDraw(DrawEvent event) {
                vSlider.addValueChangedHandler(new ValueChangedHandler() {
                    public void onValueChanged(ValueChangedEvent event) {
                        int value = event.getValue();
                        if (hSlider.getValue() != value) {
                            hSlider.setValue(value);
                        }
                    }
                });
            }
        });

        hSlider.addDrawHandler(new DrawHandler() {
            public void onDraw(DrawEvent event) {
                hSlider.addValueChangedHandler(new ValueChangedHandler() {
                    public void onValueChanged(ValueChangedEvent event) {
                        int value = event.getValue();
                        if (vSlider.getValue() != value) {
                            vSlider.setValue(value);
                        }
View Full Code Here

        label.setShowShadow(true);
        label.setShadowSoftness(10);
        label.setShadowOffset(5);
        label.setKeepInParentRect(true);

        final Slider softness = new Slider("Softness");
        softness.setMinValue(1);
        softness.setMaxValue(10);
        softness.setNumValues(11);
        softness.setShowRange(false);
        softness.setLabelWidth(20);
        softness.setValue(10);
        softness.addDrawHandler(new DrawHandler() {
            public void onDraw(DrawEvent event) {
                softness.addValueChangedHandler(new ValueChangedHandler() {
                    public void onValueChanged(ValueChangedEvent event) {
                        label.setShadowSoftness(event.getValue());
                        label.updateShadow();
                    }
                });
            }
        });


        final Slider offset = new Slider("Offset");
        offset.setMinValue(0);
        offset.setMaxValue(20);
        offset.setNumValues(21);
        offset.setShowRange(false);
        offset.setLabelWidth(20);
        offset.setLeft(60);
        offset.setValue(5);
       
        offset.addDrawHandler(new DrawHandler() {
            public void onDraw(DrawEvent event) {
                offset.addValueChangedHandler(new ValueChangedHandler() {
                    public void onValueChanged(ValueChangedEvent event) {
                        label.setShadowOffset(event.getValue());
                        label.updateShadow();
                    }
                });
View Full Code Here

               mute.setSrc("player/unmuted.png");
          isMuted = false;
        }
       }});
        
          final Slider volumeSlider = new Slider("")
          volumeSlider.setVertical(false);
          volumeSlider.setValue(50);
          volumeSlider.setShowRange(false)
          volumeSlider.setShowTitle(false);
          volumeSlider.setShowValue(false);
          volumeSlider.setWidth(75);
          volumeSlider.addValueChangedHandler(new ValueChangedHandler() { 
              public void onValueChanged(ValueChangedEvent event) { 
                  volume = event.getValue();
                  //if user mute the sound,changing volume bar should not affect immidiately.
                  if(!isMuted)
          activeSound.setVolume(volume);
                  if (volumeSlider.getValue() != volume) { 
                      volumeSlider.setValue(volume)
                 
              } 
          })
         
         HLayout hLayout1 = new HLayout()
View Full Code Here

TOP

Related Classes of com.smartgwt.client.widgets.Slider

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.