Hi Wim, 2011/12/31 Wim Jongman <[email protected]>
> Hi Angelo, > > This looks really nice. > > If I understand correctly it does the following: > > It provides the link "Client" wich is enabled when a valid client is > selected > It provides the text field where the client code can be type in > It provides the decoration for the text field (error, information, etc..) > It provides the button with the multiselect function > It opens a lazy combobox that gets populated with some kind of model > > Is that correct? > Exatly! But ModelPicker is very modular. It is based on ModelHolder class. * ModelHolder is kind of Viewer which wait a SWT Text in the constructor. It stores a model instance (ex:client) and display the label of the client in the SWT Text (by using IModelLabelProvider). You can add ISearcher to ModelHolder to add any search (ex:client completion, opens a dialog to select a client model, etc...). So you can use ModelHolder with simple SWT Text. A searcher is linked to keystroke (Ctrl+Space to opens completion, F2 to opens search dialog etc) * ModelPicker uses ModelHolder and creates a SWT Text and the "Browse" drowpdown button to shows you list of searcher. My screen shows you a Link but it is not included in the ModelPicker.But it is bind to ModelPicker to observe if ModelPicker has model (link is enabled) or not (link is disabled). So ModelPicker can be observed (when model changed) and you can use JFace Databinding to bind it to a model. I'm cleaning my code and I will you create a bug with this contribution. Thanks for your answer. Regards Angelo > > Best regards, > > Wim > > Is it so that the textfield, the I am a little confused about the exact > > On Mon, Dec 26, 2011 at 6:16 PM, Angelo zerr <[email protected]>wrote: > >> Hi Nebula Team, >> >> I would like know if you could be interested with our ModelPicker that we >> are using in our RCP/RAP Application >> http://xdocreport-rap.opensagres.cloudbees.net/xdocreport?startup=fr.opensagres.xdocreport.eclipse.ui.application >> to pick a model instance (Go to the Project Module -> Search Project -> >> select a project and open it, you will see Client field which uses >> ModelPicker). The attached RAPModelPicker.png shouws you a screen about the >> ModelPicker used in our RAP application. >> >> I think this kind control can be useful in a business application to pick >> a model (ex:a person). The client field which uses ModelPicker in our demo >> is a well sample. We could use a Combo with list of the client for the >> client field but we have used ModelPicker because client records can grow a >> lot. ModelPicker gives you several features: >> >> * EmptyClient.png : when none model is selected, the link "Client" which >> is used to open the editor of the selected client is disabled. The Browse >> button is used to force the open of the client completion. >> * ClientDontExist.png: you can type name of the client in the field on >> the left of this textfield, error icon is displayed, because client doens't >> exist. >> *ClientCompletionAfterCtrlSpace.png : you can do Ctrl+Space or click on >> Browse button to open popup completion. >> * SelectedClient.png : the client is selected, the error disapears and >> you can click on the link to open to the editor client (or another thing if >> you wish). >> * ClientOpen.png : you can see that Browse button is a dropdown. The idea >> is to link several kind of search like "Open" to open popup completion, >> "Search" to open custom search dialog, etc. >> >> What do you think about this ModelPicker control? If you like it I will >> clean my code and change it with Nebula package. >> >> Thank for your answer. >> >> Regards Angelo >> >> _______________________________________________ >> nebula-dev mailing list >> [email protected] >> https://dev.eclipse.org/mailman/listinfo/nebula-dev >> >> > > _______________________________________________ > nebula-dev mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/nebula-dev > >
_______________________________________________ nebula-dev mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/nebula-dev
