Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Sapphire » How to use sapphire databind function with customized SWT UI?
How to use sapphire databind function with customized SWT UI? [message #1741591] Fri, 26 August 2016 08:04 Go to next message
Hongyu Jiang is currently offline Hongyu JiangFriend
Messages: 4
Registered: August 2016
Junior Member
How to use sapphire databind function with customized SWT UI? Razz
I made a customized SWT UI and I want to use sapphire databind function to support my UI.
What will I need to do? Maybe I need to make an interface extends Element?
First step mayb Like this

public interface UpgradeDataModel extends Element
{
ElementType TYPE = new ElementType( UpgradeDataModel.class );

@Type( base = Path.class )
@AbsolutePath
@ValidFileSystemResourceType( FileSystemResourceType.FOLDER )
@Required
ValueProperty PROP_SDK_LOCATION = new ValueProperty( TYPE, "SdkLocation" );
}

How to make it bind with my SWT classes?

Can anyone help me?

Re: How to use sapphire databind function with customized SWT UI? [message #1741800 is a reply to message #1741591] Mon, 29 August 2016 17:21 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
It's hard to tell exactly what you are trying to do. Typically, Sapphire is used to write the model and to render UI through an sdef file definition. Did you look through the intro document and the samples?

If you are trying to embed Sapphire UI into a larger SWT UI, you do that via SapphireControl class.

If you are trying to write custom SWT UI and bind it to a Sapphire model, are you certain that Sapphire UI rendering doesn't provide what you are trying to accomplish manually? If you are certain that you have a unique usecase, you can take a look at TextFieldPropertyEditorPresentation for various aspects of binding model to UI.
Re: How to use sapphire databind function with customized SWT UI? [message #1741843 is a reply to message #1741800] Tue, 30 August 2016 06:41 Go to previous message
Hongyu Jiang is currently offline Hongyu JiangFriend
Messages: 4
Registered: August 2016
Junior Member
Thanks Konstantin. I am writting an UI that contains some canvas and some SWT composite. It can' use sapphire UI to do this, but I still want to use sapphire data model to help to maintain data and share in UI components.
Previous Topic:Survey of adopters on Sapphire 8.x
Next Topic:Setting up project
Goto Forum:
  


Current Time: Tue Apr 16 19:27:34 GMT 2024

Powered by FUDForum. Page generated in 0.11694 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top