Using css border property in eclipse rcp application - java

I am currently working on an eclipse rcp application that we want to customize look-and-feel wise via CSS.
Sadly the documentation is not that great, so I'd like to try to get help here.
I would like to configure the border of several Widgets via CSS. For example Composite or ScrolledComposite.
The CSS Theme is working generally, this question is only about the border property.
Can I use the border property at all to configure the border of an Widget or is there only the SWT.BORDER property that needs to be set in the creation process of a widget?

There is no support for borders in the SWT CSS. The SWT.BORDER style on the control constructor is the only thing available.
You can write your own CSS property handlers using the org.eclipse.e4.ui.css.core.propertyHandler extension point, but adding a border would be difficult as the SWT controls don't support it.
All the existing CSS properties are defined using the org.eclipse.e4.ui.css.core.propertyHandler extension point, mostly in the org.eclipse.e4.ui.css.swt plugin.

Related

How to add links inside combobox?

In the combobox dropdown, rather than just text content, how to add links as shown in this sample image:
Image shows edit & delete link in the dropdown along with the text content. How to implement something similar in Java using SWT?
In existing Combo available in SWT it is not possible to add links for specific function.
So the better solution is to create your own custom widgets in SWT.
Writing Portable Widgets
The SWT library provides two widget classes that are typically used as the basis for a custom 100% Java portable widget:
Canvas - to create basic widgets
Composite - to create compound widgets
Please refer Write Your Own Widget and
Developing custom widgets with SWT for creating custom widget.

Custom Components in WindowBuilder

I am trying to make my own Java component for use with windowBuilder in eclipse. Creating the component is the easy part. The problem is getting eclipse to draw the component when one is created.
I have tried using SWT designer but that doesn't exactly work (can't make completely custom components).
Example:
If I want to create a Line component, which has 2 point members, I can't set the points from the design view of eclipse.
I was wondering whether this can be done.
I realize this might sound vague, and I will make any clarifications needed.
To preview use:
It should also be possible to add custom component to WindowBuilder:
right-click on the swing palette, then choose Palette manager .
You'll have the option to import a jar file to be added to the palette.
I am not familiar with an option to make a custom component visible in the static WindowBuilder view.

No components visible in visual editor of Vaadin

Do you know why I can't see the components in the visual editor of Vaadin. The thing is that if I drag'n'drop from there, I can put the components into the layout. They are just not visible.
because its about jre,
solution
you should install 7u71 to see your components visible in visual editor of Vaadin

swt or jface code to create a text editor and canvas

*i am looking for text editor and canvas part in eclipse rcp application. can any one recommend the code for text editor and canvas using jface or swt *
i know i can use Canvas canvas=new Canvas(parent, style)
to create canvas but i need full code.
i have checked with vogella examples http://www.eclipse.org/swt/examples.php and http://www.eclipse.org/swt/snippets.php but i didn't meet the correct specifications.
SWT Snippets contains demo code for many different use cases.
In your case, you should look at "paint a circle in a canvas".
The section "StyledText" contains snippets how to work with the SWT component of the same name. The SWT standalone examples have a simple styled text editor example.
The JFace org.eclipse.jface.text.TextViewer class provides a basic text editor.
If you are using full Eclipse then org.eclipse.ui.editors.text.TextEditor provides a more elaborate editor framework.

how do i get a collapsable pane like the netbeans palette

i like the style of netbeans palette (Window -> Palette, best seen when creating a gui). i would like to integrate a similar collapsable panel in my application, but i have no idea how to find this component. i guess its not a standard swing component, although it looks kind of similar to a jTree. i poked arround the netbeans framework, but i couldnt find the corresponding class.
I know about swingx's JXTaskPane, but i would really prefer an easy, clean way to hide, show and group ui components, without fancy-animation bloating my app needlessly. The netbeans palette seems just perfect. but how is it called & where can i find it?

Categories