Re: Scrollbar Widget

2010-03-31 Thread Ewald Pankratz
On Mar 31, 4:11 pm, Thomas Jackson 
wrote:
> I know this question has probably been asked many times but I was
> wondering if anyone has encountered a way to do a ScrollBar in GWT.  I
> am looking to build a widget which will show a file and do not want to
> load the whole file but want the ScrollBars to represent the whole file
> and moving the scrollbar would load different parts of the file.
>
> Does anyone know of such a beast?
>
> Thanks
> Thomas


You probably find here
http://code.google.com/docreader/#p=google-web-toolkit-incubator&s=google-web-toolkit-incubator&t=google-web-toolkit-incubator
what you are searching for.

EP

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Scrollbar Widget

2010-03-31 Thread Thomas Jackson
I know this question has probably been asked many times but I was 
wondering if anyone has encountered a way to do a ScrollBar in GWT.  I 
am looking to build a widget which will show a file and do not want to 
load the whole file but want the ScrollBars to represent the whole file 
and moving the scrollbar would load different parts of the file.


Does anyone know of such a beast?

Thanks
Thomas

--
You received this message because you are subscribed to the Google Groups "Google 
Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Standalone GWT Scrollbar Widget

2009-07-24 Thread Carl

Correction - for the labels, I meant to say there would be 5 at
intervals of 20.

On Jul 24, 9:41 am, Carl  wrote:
> Isaac,
>
> Thanks so much - that control is exactly what I need.  I had started
> to hack a Composite widget together by wrapping ScrollPanel, and it
> was kind of working,
> but for some reason Opera wouldn't display the horizontal scrollbar.
> And in any case,SliderBarlooks 1000 percent better than the standard
> ScrollPanel scrollbars.
>
> To possibly save time for others happening upon this message, I would
> point out that theSliderBaris unusable
> without the accompanying CSS.  In other words, if you just use it out
> of the box, it will look like a big mess
> on your page.  The class Gen2CssInjector, however, is provided as part
> of GWT-Incubator, and it contains a static method called
> Gen2CssInjector.addSliderBarDefault() that injects all of the default
> CSS for the SlideBar.  That method is not yet documented in the
> Javadoc for GWT-Incubator that is posted online, but source code can
> nonetheless be found in the GWT-Incubator JAR file.  This assumes, of
> course,
> that you do not want to write your own CSS for theSliderBar, and most
> people will not want to do that up front just to get the
> slider to work.
>
> Here is some sample code that sets up a basicSliderBar:
>
>                 //Inject the defaultSliderBarCSS files.
>                 Gen2CssInjector.addSliderBarDefault();
>
>                 //Create theSliderBarwith a range between 0 and 100
>                sliderBar= newSliderBar(0.0, 100.0);
>
>                 //Set the width and height
>                sliderBar.setWidth("800px");
>                sliderBar.setHeight("200px");
>
>                 //Set the smallest increment by which the bar will
> advance.
>                sliderBar.setStepSize(1.0);
>
>                 //Set the initial value
>                sliderBar.setCurrentValue(0.0);
>
>                 //Set the number of tick marks from the beginning to
> the end of the bar
>                sliderBar.setNumTicks(100);
>
>                 //Set the number of tick mark labels (in this case,
> there will be 20 at intervals of 5)
>                sliderBar.setNumLabels(5);
>
>                 //Handle events
>                 regexResultsSliderBar.addValueChangeHandler(new
> ValueChangeHandler() {
>                         @Override
>                         public void onValueChange(ValueChangeEvent 
> event) {
>                                 double currentSliderBarValue 
> =sliderBar.getCurrentValue();
>                                 valueDisplayTextBox.setText(String.valueOf
> (currentSliderBarValue));
>                         }
>                 });
>
> Carl
>
> On Jul 24, 7:02 am, Isaac Truett  wrote:
>
>
>
> > Hi Carl,
>
> > Sounds like you might want to look at theSliderBarin the GWT
> > Incubator project:
>
> >http://code.google.com/p/google-web-toolkit-incubator/wiki/SliderBar
>
> > I imagine you could style it to look like a browser's scroll bar if
> > that's what you want.
>
> > - Isaac
>
> > On Fri, Jul 24, 2009 at 2:24 AM, Carl wrote:
>
> > > Does anyone know where a standalone GWT Scrollbar widget might be
> > > found?  I'm talking about a scrollbar control that is not attached to
> > > a window, that has a settable range of possible integer values through
> > > which it scrolls, and to which listeners can be attached to observe
> > > changes that the user creates in the presently selected integer within
> > > the given range, and for which that same selected integer is also
> > > settable from code.
>
> > > It seems surprising to me that such a widget does not already exist
> > > somewhere, and I'd hate to have to reinvent it, but I can't find one
> > > anywhere.
>
> > > Thanks in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Standalone GWT Scrollbar Widget

2009-07-24 Thread Carl

Isaac,

Thanks so much - that control is exactly what I need.  I had started
to hack a Composite widget together by wrapping ScrollPanel, and it
was kind of working,
but for some reason Opera wouldn't display the horizontal scrollbar.
And in any case, SliderBar looks 1000 percent better than the standard
ScrollPanel scrollbars.

To possibly save time for others happening upon this message, I would
point out that the SliderBar is unusable
without the accompanying CSS.  In other words, if you just use it out
of the box, it will look like a big mess
on your page.  The class Gen2CssInjector, however, is provided as part
of GWT-Incubator, and it contains a static method called
Gen2CssInjector.addSliderBarDefault() that injects all of the default
CSS for the SlideBar.  That method is not yet documented in the
Javadoc for GWT-Incubator that is posted online, but source code can
nonetheless be found in the GWT-Incubator JAR file.  This assumes, of
course,
that you do not want to write your own CSS for the SliderBar, and most
people will not want to do that up front just to get the
slider to work.

Here is some sample code that sets up a basic SliderBar:

//Inject the default SliderBar CSS files.
Gen2CssInjector.addSliderBarDefault();

//Create the SliderBar with a range between 0 and 100
sliderBar = new SliderBar(0.0, 100.0);

//Set the width and height
sliderBar.setWidth("800px");
sliderBar.setHeight("200px");

//Set the smallest increment by which the bar will
advance.
sliderBar.setStepSize(1.0);

//Set the initial value
sliderBar.setCurrentValue(0.0);

//Set the number of tick marks from the beginning to
the end of the bar
sliderBar.setNumTicks(100);

//Set the number of tick mark labels (in this case,
there will be 20 at intervals of 5)
sliderBar.setNumLabels(5);

//Handle events
regexResultsSliderBar.addValueChangeHandler(new
ValueChangeHandler() {
@Override
public void onValueChange(ValueChangeEvent 
event) {
double currentSliderBarValue = 
sliderBar.getCurrentValue();
valueDisplayTextBox.setText(String.valueOf
(currentSliderBarValue));
}
});


Carl

On Jul 24, 7:02 am, Isaac Truett  wrote:
> Hi Carl,
>
> Sounds like you might want to look at theSliderBarin the GWT
> Incubator project:
>
> http://code.google.com/p/google-web-toolkit-incubator/wiki/SliderBar
>
> I imagine you could style it to look like a browser's scroll bar if
> that's what you want.
>
> - Isaac
>
>
>
> On Fri, Jul 24, 2009 at 2:24 AM, Carl wrote:
>
> > Does anyone know where a standalone GWT Scrollbar widget might be
> > found?  I'm talking about a scrollbar control that is not attached to
> > a window, that has a settable range of possible integer values through
> > which it scrolls, and to which listeners can be attached to observe
> > changes that the user creates in the presently selected integer within
> > the given range, and for which that same selected integer is also
> > settable from code.
>
> > It seems surprising to me that such a widget does not already exist
> > somewhere, and I'd hate to have to reinvent it, but I can't find one
> > anywhere.
>
> > Thanks in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Standalone GWT Scrollbar Widget

2009-07-24 Thread Isaac Truett

Hi Carl,

Sounds like you might want to look at the SliderBar in the GWT
Incubator project:

http://code.google.com/p/google-web-toolkit-incubator/wiki/SliderBar

I imagine you could style it to look like a browser's scroll bar if
that's what you want.

- Isaac


On Fri, Jul 24, 2009 at 2:24 AM, Carl wrote:
>
> Does anyone know where a standalone GWT Scrollbar widget might be
> found?  I'm talking about a scrollbar control that is not attached to
> a window, that has a settable range of possible integer values through
> which it scrolls, and to which listeners can be attached to observe
> changes that the user creates in the presently selected integer within
> the given range, and for which that same selected integer is also
> settable from code.
>
> It seems surprising to me that such a widget does not already exist
> somewhere, and I'd hate to have to reinvent it, but I can't find one
> anywhere.
>
> Thanks in advance.
>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Standalone GWT Scrollbar Widget

2009-07-24 Thread Carl

Does anyone know where a standalone GWT Scrollbar widget might be
found?  I'm talking about a scrollbar control that is not attached to
a window, that has a settable range of possible integer values through
which it scrolls, and to which listeners can be attached to observe
changes that the user creates in the presently selected integer within
the given range, and for which that same selected integer is also
settable from code.

It seems surprising to me that such a widget does not already exist
somewhere, and I'd hate to have to reinvent it, but I can't find one
anywhere.

Thanks in advance.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---