Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SWT RowLayout right-to-left?

Tags:

java

eclipse

swt

I've read the article Understand SWT Layout, but I cannot find a way to put several buttons in a container in right-to-left way.

How can I do this?

like image 887
solotim Avatar asked Aug 17 '10 03:08

solotim


People also ask

What is SWT composite?

Composite is an ancestor of every SWT class to which you can add widgets, including Shell . For that reason, you can think of a Composite as being simply the working area of a Shell , without the styles associated with the aspects of Shell that make windows—the titlebar, control menu, etc.

What is Shell in SWT?

public Shell(Display display) Constructs a new instance of this class given only the display to create it on. It is created with style SWT.


1 Answers

Right to left can be achieved through SWT.RIGHT_TO_LEFT flag passed to your container element. For example if you apply a RowLayout to a Composite, create Composite this way:

c = new Composite(shell, SWT.RIGHT_TO_LEFT);

Note that RTL is only implemented in Windows and Linux. Mac support is too limited (is only widget-level, not container-level).

like image 195
Mohsen Avatar answered Oct 12 '22 23:10

Mohsen