Results 1 to 1 of 1
Thread: Repacking Eclipse Container
- 07-06-2009, 07:03 PM #1
Member
- Join Date
- Jul 2009
- Posts
- 1
- Rep Power
- 0
Repacking Eclipse Container
Basically, I have an eclipse Composite which contains a label and then some
other components. I need to change the size of the label and then repack the
container to reflect this change.
Here is where the Composite debugView, which contains the label, is initialized.
Here, the label is initialized.Java Code:public void createPartControl(Composite parent) { //....some code here parent.setLayout(new GridLayout(1, false)); mainView = new Composite(parent, SWT.NONE); debugView = new Composite(parent, SWT.BORDER); //...some more code }
Here, the label size is changed and the debugView displayed.Java Code:GridLayout layout = new GridLayout(1, false); layout.marginLeft = 1; layout.marginTop = 1; layout.marginRight = 1; layout.marginBottom = 1; // Create the debug view debugView.setLayout(layout); debugLabel = new Label(debugView, SWT.BORDER|SWT.WRAP);
Basically, I want the debugView to now contain a debugLabel which is of theJava Code:debugLabel.setSize(debugLabel.computeSize(mainView.getSize().x, SWT.DEFAULT,false)); debugView.pack(); hideFrame(mainView); showFrame(debugView);
size i specified. It isn't, because debugView.pack() sets the label size to
its preferred size. However, if I don't pack everything the debugLabel will
cover some of the component which lies below it. So, I want to repack everything but keep the size of the label I specified.
Thx!
Similar Threads
-
Applet as container .
By pawankumarom in forum Java AppletsReplies: 5Last Post: 04-23-2009, 06:17 AM -
[SOLVED] Coordinates container --> in parent container.
By Cleite in forum AWT / SwingReplies: 3Last Post: 04-21-2009, 11:01 PM -
Container Managed Persistence
By Java Tip in forum Java TipReplies: 0Last Post: 12-27-2007, 10:16 AM -
Butterfly Container 1.9.9-beta
By JavaBean in forum Java SoftwareReplies: 0Last Post: 11-17-2007, 02:02 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks