Package com.kiouri.sliderbar.client.solution.simplehorizontal

Examples of com.kiouri.sliderbar.client.solution.simplehorizontal.SliderBarSimpleHorizontal


                });

                //verticalPanel.add(horizontalPanel);
            } else if (b instanceof RangedIntBehavior) {
                final RangedIntBehavior rb = (RangedIntBehavior) b;
                final SliderBarSimpleHorizontal slide = new SliderBarSimpleHorizontal(rb.getMax() - rb.getMin(), "100%", true);
                verticalPanel.add(slide);
                slide.setValue(rb.getValue() - rb.getMin());
                slide.setStyleName("gwt-BehaviorsPopupPanel");
                slide.addStyleName("widget");
                slide.addBarValueChangedHandler(new BarValueChangedHandler() {
                    @Override
                    public void onBarValueChanged(BarValueChangedEvent event) {
                        //((RangedIntBehavior) b).setValue(slide.getValue()+rb.getMin());
                        if (((RangedIntBehavior) b).getValue() != (slide.getValue() + rb.getMin())) {
                            EnvironmentsController.changeBehavior(obj.getName(), b.getName(), String.valueOf((slide.getValue() + rb.getMin())));
                        }
                    }
                });
                //verticalPanel.add(slide); 
            } else if (b instanceof ListBehavior) {
View Full Code Here


        //verticalPanel.add(horizontalPanel);
      }
      else if(b instanceof RangedIntBehavior)
      {
        final RangedIntBehavior rb = (RangedIntBehavior) b;
        final SliderBarSimpleHorizontal slide = new SliderBarSimpleHorizontal(rb.getMax()-rb.getMin(), "100%", true);
        verticalPanel.add(slide);       
        slide.setValue(rb.getValue()-rb.getMin());       
        slide.setStyleName("gwt-BehaviorsPopupPanel");
        slide.addStyleName("widget");
        slide.addBarValueChangedHandler(new BarValueChangedHandler() {
         
          @Override
          public void onBarValueChanged(BarValueChangedEvent event) {
            //((RangedIntBehavior) b).setValue(slide.getValue()+rb.getMin());
            if (((RangedIntBehavior) b).getValue()!= (slide.getValue()+rb.getMin()))
              EnvironmentController.changeBehavior(obj.getName(), b.getName(), String.valueOf((slide.getValue()+rb.getMin())))
          }
        });
        //verticalPanel.add(slide); 
      }
      else if(b instanceof ListBehavior)
View Full Code Here

    final ListBox widgetIndexLb = new ListBox();
    for (Iterator<Widget> iterator = invokingWidget.iterator(); iterator.hasNext();) {
      Widget next = iterator.next();
      widgetIndexLb.addItem(((IVkWidget)next).getWidgetName() + " - at index - " + invokingWidget.getWidgetIndex(next));
    }
    final SliderBarHorizontal sliderBar = new SliderBarSimpleHorizontal(invokingWidget.getOffsetWidth(), "300px", false);
    widgetIndexLb.addChangeHandler(new ChangeHandler(){
      @Override
      public void onChange(ChangeEvent event) {
        sliderBar.setValue(invokingWidget.getWidget(widgetIndexLb.getSelectedIndex()).getElement().getParentElement().getOffsetWidth());
      }});
    widgetIndexLb.setWidth("300px");
    dialog.add(widgetIndexLb);
    dialog.add(new Label("Drag to change width:"));
    dialog.add(sliderBar);
    sliderBar.addBarValueChangedHandler(new BarValueChangedHandler() {
      @Override
      public void onBarValueChanged(BarValueChangedEvent event) {
        DOM.setStyleAttribute((com.google.gwt.user.client.Element) invokingWidget.getWidget(widgetIndexLb.getSelectedIndex()).getElement().getParentElement(), "width", event.getValue() + "px");
      }
    });
    sliderBar.setValue(invokingWidget.getWidget(0).getElement().getParentElement().getOffsetWidth());
    sliderBar.setMinMarkStep(50);
    Button okButton = new Button("OK");
    dialog.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);
    dialog.add(okButton);
    okButton.addClickHandler(new ClickHandler() {
      @Override
View Full Code Here

    final ListBox widgetIndexLb = new ListBox();
    for (Iterator<Widget> iterator = invokingWidget.iterator(); iterator.hasNext();) {
      Widget next = iterator.next();
      widgetIndexLb.addItem(((IVkWidget)next).getWidgetName() + " - at index - " + invokingWidget.getWidgetIndex(next));
    }
    final SliderBarHorizontal sliderBar = new SliderBarSimpleHorizontal(invokingWidget.getOffsetHeight(), "300px", false);
    widgetIndexLb.addChangeHandler(new ChangeHandler(){
      @Override
      public void onChange(ChangeEvent event) {
        sliderBar.setValue(invokingWidget.getWidget(widgetIndexLb.getSelectedIndex()).getElement().getParentElement().getOffsetHeight());
      }});
    widgetIndexLb.setWidth("300px");
    dialog.add(widgetIndexLb);
    dialog.add(new Label("Drag to change height:"));
    dialog.add(sliderBar);
    sliderBar.addBarValueChangedHandler(new BarValueChangedHandler() {
      @Override
      public void onBarValueChanged(BarValueChangedEvent event) {
        DOM.setStyleAttribute((com.google.gwt.user.client.Element) invokingWidget.getWidget(widgetIndexLb.getSelectedIndex()).getElement().getParentElement(), "height", event.getValue() + "px");
      }
    });
    sliderBar.setValue(invokingWidget.getWidget(0).getElement().getParentElement().getOffsetHeight());
    sliderBar.setMinMarkStep(50);
    Button okButton = new Button("OK");
    dialog.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);
    dialog.add(okButton);
    okButton.addClickHandler(new ClickHandler() {
      @Override
View Full Code Here

TOP

Related Classes of com.kiouri.sliderbar.client.solution.simplehorizontal.SliderBarSimpleHorizontal

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.