Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » cant see Decorations borders in swt-gtk
cant see Decorations borders in swt-gtk [message #461836] Sun, 02 October 2005 10:01 Go to next message
Eclipse UserFriend
Originally posted by: Manolo.localhost.localdomain

I create a example of Decorations, but when run it i can not see
Decoration close button, tittle of Decoration. I use
swt-gtk(libswt-pi-gtk-3138.so). The code of my example is this:

import org.eclipse.swt.*;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;

/**
* This application shows the various styles of Decorations
*/
public class DecorationsExample {
/**
* Runs the application
*/
public void run() {
Display display = new Display();
Shell shell = new Shell(display);
shell.setText("Decorations Example");
createContents(shell);
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
display.dispose();
}

/**
* Creates the various Decorations
*
* @param composite the parent composite
*/
public void createContents(Composite composite) {
// There are nine distinct styles, so create
// a 3x3 grid
composite.setLayout(new GridLayout(3, true));


// The SWT.CLOSE style
Decorations d = new Decorations(composite, SWT.CLOSE);
d.setLayoutData(new GridData(GridData.FILL_BOTH));
d.setLayout(new FillLayout());
new Label(d, SWT.CENTER).setText("SWT.CLOSE");

}



public static void main(String[] args) {
new DecorationsExample().run();
}
}
Re: cant see Decorations borders in swt-gtk [message #462006 is a reply to message #461836] Wed, 05 October 2005 01:10 Go to previous message
Billy Biggs is currently offline Billy BiggsFriend
Messages: 94
Registered: July 2009
Member
Manolo wrote:
> I create a example of Decorations, but when run it i can not see
> Decoration close button, tittle of Decoration. I use
> swt-gtk(libswt-pi-gtk-3138.so). The code of my example is this:

From the documentation for Decorations:

"IMPORTANT: This class was intended to be abstract and should
never be referenced or instantiated. Intsead, the class Shell
should be used."

-Billy
Previous Topic:empty icons in an SWT Tree - can the hole be suppressed
Next Topic:Listen for items added to List
Goto Forum:
  


Current Time: Sun Sep 27 17:28:21 GMT 2020

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

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

Back to the top