I'm working on Eclipse RCP Viewer framework, i have a requirement to place a button widget in column of TableViewer.
I have been following the tutorials to develop my application
I don't find any widget inside the tableviewer, as in the example it was just an image, is it possible to place a widget, any idea please suggest me.
I've searched API to find any predefined method like getWidget() similar to getImage() ,that can be placed in col.setLabelProvider(), but there was none actually,How can i do this
you may want to use editing support or for instance DialogCellEditor
http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fjface%2Fviewers%2FDialogCellEditor.html
Related
Our GWT based application needs a font size selector. Ussually people will want to pick the font size from a set of standard sizes. Sometimes however users will want to manually type in a specific font size like '12.6'. We obviously cannot put ever tenth of a point option inside our font size dropdown so a dropdown that can have any value entered manually would make the most sense.
I was told simple-gwt has a widget called ComboBox but it appears to be meant for an older version of gwt (we are on the latest - 2.4). Suggestbox would work except there is no "dropdown" arrow to popup the suggestions so users who do not want to type the size cannot use it.
Any suggestions? I was surprised this widget was not built into GWT.
The widget to use is the SuggestBox - you may or may not be able to extend it to use a click handler to show a set of default suggestions (there may be a property to allow it) and to use CSS to show a dropdown arrow.
javadoc here: http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/ui/SuggestBox.html
Example here: http://examples.roughian.com/index.htm#Widgets~SuggestBox
I know that Smart GWT and ext-gwt have widgets that provide this kind of functionality, but neither of those libraries are free.
Of course you could always roll your own.
I found this library "Advanced GWT components". It is a free library that has drop in GWT widgets.
I need to create a custom component which can have Label then Textfield and Image, by clicking the image i should select date, that selected date should be populated in TextField,
Is there way i can develop a custom component.
Thanks in Advance!!!
Absolutely!
You need to create a custom widget, and the way to do that is to extend the Composite class.
From the documentation:
A composite is a specialized widget that can contain another component (typically, a Panel) but behaves as if it were its contained widget. You can easily combine groups of existing widgets into a composite that is itself a reusable widget. Some of the UI components provided in GWT are composites: for example, the TabPanel (a composite of a TabBar and a DeckPanel) and the SuggestBox.
Rather than create complex widgets by subclassing Panel or another Widget type, it's better to create a composite because a composite usually wants to control which methods are publicly accessible without exposing those methods that it would inherit from its Panel superclass.
There is a good example to get you started here:
http://code.google.com/webtoolkit/doc/latest/DevGuideUiCustomWidgets.html
The GWT showcase give an example of somthing similar to what you are looking for along with the source code:
"Date Picker" - GWT Showcase
If you want to develop a custom component, look at #Jon Vaughan's answer!
You may also use third party libraries with widgets, like Ext GWT or SmartGWT. Date picker is one of the base widgets that everyone provides.
I'm just getting started using the built in MVP framework in GWT 2.1 and I have, what I think, a very simple question.
When I read the official tutorial here or look at the gwt-plattform example here, one view always replaces another view.
But what if I want to have a specific widget on all my "pages".
As an example you can take the bar at the top of this page, with the StackExchange-logo, your user name and so on. That bar is the same on all pages you can visit, whether you look at a question or a user profile.
How would I get something similar with the MVP-framework?
Instead of using the RootPanel as the Activities' container, lay your header panel and SimplePanel inside the RootPanel and use the SimplePanel for your Activities.
The GWT Incubator contains this widget, but it doesn't provide the clean look and feel I am looking for. The Same page does show precisely the widget I would like to use:
A thin resize bar with the small middle arrow icon which is clicked to hide/show a docked panel on the side of the page.
The widget appears on many google services pages, which makes me suspect that it may be a common widget:
Google Reader
Slightly modified (animated) version on Maps
Does anyone where to find or know how to build this widget in GWT.
How about using a VerticalSpliPanel and overriding the OnClick event? On click you can hide your navigation panel.
I don't think Maps and Google Reader are build using GWT. I know Wave is, and it doesn't use the collapsible panel you're looking for... My guess is that this specific widget is not available in GWT but you may be able to find a suitable replacement. Let me know if you do.
i am using gwt to build my web site.
i would like to create a dropdown/listbox that contains no just text but also images, meaning that in the drop down there will be a what ever widget that ill create.
please advise
jaimon
You won't be able to do this with a ListBox, because it just creates an HTML < select> element.
You can use a MenuBar that has one menu with MenuItems in it to simulate a dropdown with complex widgets inside it. You will also be able to style the dropdown rather than rely on browser-styled form elements.
Take a look at the Combobox or Suggestion box in Advanced GWT Components.
Another widget is the DropDownListBox in the GWT incubator. I have not used it, but the stated intent is to provide a rich, stylable ListBox. You can pass raw HTML to the addItem() method.
DropDownListBox
it is possible to use Tree inside ScrollPanel, without using nested items
Tree allows TreeItem to be a Widget