How to add property in existing SWT component [message #653826] |
Fri, 11 February 2011 08:00  |
Eclipse User |
|
|
|
I have a XWT project worksapce and adding few property in componets. Can some one guide me on this?
Description:
I want to add a new property for the SWT components and this property should get linked with right click on component and in Advanced Tab of properties. Means value should get modified through these two ways.
e.g. Under SWT controls we have button component, now I want a add a new property ie. "Visibility" 'either True or False'. Can some one tell me the process how to achieve this.
Till now I have added the property value in StyleGroup.java file. Property is getting listed on right click and Advanced Tab but its update is not working. Advanced Tab always shows the Visible as False even after doing a check in checkBox for this.
Code Added in StyleGroup.java:
public static final StyleGroup VISIBLITY = new StyleGroup(new Class[] { Button.class, ToolItem.class }, "Visiblity",new String[] { "VISIBLE", "INVISIBLE" });
Please help me on this. Thanks in advance.
|
|
|
|
Re: How to add property in existing SWT component [message #658650 is a reply to message #653826] |
Wed, 09 March 2011 06:12  |
Eclipse User |
|
|
|
"ramakant" <ramakant22@gmail.com> wrote in message
news:ij3bhf$cf2$1@news.eclipse.org...
> I have a XWT project worksapce and adding few property in componets. Can
> some one guide me on this?
>
> Description:
> I want to add a new property for the SWT components and this property
> should get linked with right click on component and in Advanced Tab of
> properties. Means value should get modified through these two ways.
>
> e.g. Under SWT controls we have button component, now I want a add a new
> property ie. "Visibility" 'either True or False'. Can some one tell me the
> process how to achieve this.
>
If you respect the Java Bean, it will get supported automatically since XWT
relies on the automapping between Java Model and XML.
> Till now I have added the property value in StyleGroup.java file. Property
> is getting listed on right click and Advanced Tab but its update is not
> working. Advanced Tab always shows the Visible as False even after doing a
> check in checkBox for this.
>
> Code Added in StyleGroup.java:
> public static final StyleGroup VISIBLITY = new StyleGroup(new Class[] {
> Button.class, ToolItem.class }, "Visiblity",new String[] { "VISIBLE",
> "INVISIBLE" });
>
I cannot get your point here.
Best regards
Yves YANG
> Please help me on this. Thanks in advance.
|
|
|
Powered by
FUDForum. Page generated in 0.03993 seconds