just a simple question: I made a custom jpanel putting in just buttons. How do I put this jpanel into my jframe in design view?
Thanks!
Ok i found out the method of adding custom component to WindowBuilder. Silly me, need to build the class and then right click the palatte to add in custom component :)
Related
Can you suggest me how to build a Table with Eclipse WindowBuilder Plugin and SWT?
I read the official docs but I found orrible example with fixed column size. I would like to build a Table who fit the parent container (I used composite) when it is resized.
P.S.: Maybe I should use Swing instead?? All valid example I have seen are with JTable..
Can you help me?
Thank you
Thank you for your reply!
I have to do a little GUI application for a friend, I'm not so practice nor with Swing neither with SWT.
Anyway I manage to do a Simple ApplicationWindow with menubar, some submenu item and a composite container under the menu where panel should appear when user clicks on menu item.
Than I manage to build a TableViewer inside that composite component.. but now I would like add another table in the same place (the table represents different thing and should appear or disappear when user click some menu button).
In Swing I see many example of CardLayout but nothing with SWT.
Can you suggest me a simple example of layered layout with SWT?? I have the impression that Swing is much more simple..
Thank you all
On my modest opinion, Swing is well documented than SWT and maybe more simple. I switched to it.
Thank you.
I have implemented Eclipse RCP product in 4.5 (Mars) version. There is a part with toolbar. I want to show the part toolbar always in full span (covering the entire width of the part) and not on the part stack (on right side of the part tab).
I tried to add Part-Toolbar-FullSpan tag to the Part and also to the part toolbar but it is not helping.
I also tried to create a custom toolbar but that approach did not work out.
Do you know how I can show the part toolbar in full span?
Thank you.
Part-Toolbar-FullSpan appears to be for the e(fx)clipse JavaFX stack renderer only so it won't work with SWT.
The SWT stack renderer org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer uses the setTopRight method of CTabFolder to manage the toolbar. This will only push the toolbar on to a separate row when there not enough space for it on the tab row.
So it looks like the only way to do this would be to define a custom renderer factory and override the stack renderer. Unfortunately for what you want this would be a substantial change to the renderer.
I have a HorizontalPanel and I added two Buttons to it.
The HorizontalPanel is already as wide as its parent.
I want each Button to take a half of the HorizontalPanel. How can I do it programmatically?
Or maybe am I using the wrong panel? Any advice would be appreciated.
I tried setWidth("50%"). It looks strange. I also tried other panels e.g. FlowPanel. I just cannot figure it out...
Use setWidth("100%") instead of setWidth("50%") for both the Buttons and then add it to HorizontalPanel.
How do I restrict a window component to drag just inside a contentpanel on GXT - GWT?
I need your help, thanks.
When setting your draggable utlize the setContainer portion and that tells the draggable object that it is constrained too that container only and hence will not be dragged out of it.
Check the Draggable help online regarding this.
How to I make a hyperlink that functions as a button? Or how do I make a button that looks like a hyperlink?
As of GWT 1.5, there is an Anchor widget that should do what you want.
One easy way is to use the Label class. Just create a new label and add a ClickHandler to it. You can then style it however you want using CSS:
Label lbl = new Label("Hello");
lbl.addClickHandler(...);
lbl.setStyleName("hyperlink_style_label");
I also found you can use the anchor class. add a click event and load the method you want as a new page. Inside the page clear the root or other panels you want using the clear() method eg. Rootpanel.get("root panel name").clear();
I wrote the example up and gave an example if you want to check it out. Hope this helps.