Package org.odlabs.wiquery.ui.slider

Examples of org.odlabs.wiquery.ui.slider.AjaxSlider$ISliderAjaxEvent


   *
   * @param id
   */
  public SliderPanel(String id) {
    super(id);
    AjaxSlider slider = new AjaxSlider("slider", 1, 30);
    slider.setAnimate(true);
    slider.setStep(1);
    slider.setValue(x);
    slider.setAjaxStopEvent(new AjaxSlider.ISliderAjaxEvent() {

      private static final long serialVersionUID = 1L;

      @Override
      public void onEvent(AjaxRequestTarget target, AjaxSlider slider,
          int value, int[] values) {
        SliderPanel.this.x = value;
        target.add(SliderPanel.this.coordinates);
      }

    });
    add(slider);

    AjaxSlider slider1 = new AjaxSlider("slider1", 1, 30);
    slider1.setAnimate(true);
    slider1.setStep(1);
    slider1.setValue(y);
    slider1.setAjaxStopEvent(new AjaxSlider.ISliderAjaxEvent() {

      private static final long serialVersionUID = 1L;

      @Override
      public void onEvent(AjaxRequestTarget target, AjaxSlider slider,
          int value, int[] values) {
        SliderPanel.this.y = value;
        target.add(SliderPanel.this.coordinates);
      }

    });
    slider1.setOrientation(Orientation.VERTICAL);
    add(slider1);

    coordinates = new Label("coordinates",
        new AbstractReadOnlyModel<String>() {

          private static final long serialVersionUID = 1L;

          @Override
          public String getObject() {
            return x + "," + y;
          }
        });
    coordinates.setOutputMarkupId(true);

    add(coordinates);

    AjaxSlider multiSlider = new AjaxSlider("multiSlider", 1, 100);
    ArrayItemOptions<IntegerItemOptions> values = new ArrayItemOptions<IntegerItemOptions>();
    values.add(new IntegerItemOptions(1));
    values.add(new IntegerItemOptions(30));
    values.add(new IntegerItemOptions(80));
    multiSlider.setValues(values);

    multiSlider.setAjaxStopEvent(new AjaxSlider.ISliderAjaxEvent() {

      private static final long serialVersionUID = 1L;

      @Override
      public void onEvent(AjaxRequestTarget target, AjaxSlider slider,
View Full Code Here


   * @param parameters
   *            Page parameters
   */
    public SliderPanel(String id) {
      super(id);
      AjaxSlider slider = new AjaxSlider("slider", 1, 30);
      slider.setAnimate(true);
      slider.setStep(1);
      slider.setValue(x);
      slider.setAjaxStopEvent(new AjaxSlider.ISliderAjaxEvent() {
       
        private static final long serialVersionUID = 1L;

        public void onEvent(AjaxRequestTarget target, AjaxSlider slider, int value, int[] values) {
          SliderPanel.this.x = value;
          target.addComponent(SliderPanel.this.coordinates);
        }
       
     
      });
      add(slider);   
     
      AjaxSlider slider1 = new AjaxSlider("slider1", 1, 30);
      slider1.setAnimate(true);
      slider1.setStep(1);
      slider1.setValue(y);
      slider1.setAjaxStopEvent(new AjaxSlider.ISliderAjaxEvent() {
       
        private static final long serialVersionUID = 1L;

        public void onEvent(AjaxRequestTarget target, AjaxSlider slider, int value, int[] values  ) {
          SliderPanel.this.y = value;
          target.addComponent(SliderPanel.this.coordinates);
        }
       
     
      });
      slider1.setOrientation(Orientation.VERTICAL);
      add(slider1);
     
      coordinates = new Label("coordinates", new AbstractReadOnlyModel<String>(){
       
        private static final long serialVersionUID = 1L;

      @Override
        public String getObject() {
          return x+","+y;
        }
      });
      coordinates.setOutputMarkupId(true);
     
      add(coordinates);
     
      AjaxSlider multiSlider = new AjaxSlider("multiSlider", 1, 100);
      ArrayItemOptions<IntegerItemOptions> values = new ArrayItemOptions<IntegerItemOptions>();
      values.add(new IntegerItemOptions(1));
      values.add(new IntegerItemOptions(30));
      values.add(new IntegerItemOptions(80));
      multiSlider.setValues(values);     
     
      multiSlider.setAjaxStopEvent(new AjaxSlider.ISliderAjaxEvent() {
       
        private static final long serialVersionUID = 1L;

        public void onEvent(AjaxRequestTarget target, AjaxSlider slider, int value, int[] values) {
          SliderPanel.this.values = values;
View Full Code Here

TOP

Related Classes of org.odlabs.wiquery.ui.slider.AjaxSlider$ISliderAjaxEvent

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.