Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Changing UI Orientation
Changing UI Orientation [message #461928] Tue, 04 October 2005 19:40 Go to next message
Steve Crago is currently offline Steve CragoFriend
Messages: 1
Registered: July 2009
Junior Member
I'm trying to change to orientation of my SWT UI from portrait to
landscape.

I want all of my widgets (mostly labels and buttons) to be positioned from
left to right and then from top to bottom ... in other words rotate the
widgets so you have to turn the hand-held device sideways in order to read
the text.

The UI requires user interaction so turning it into an image is basically
out of the question from my standpoint.

In case you haven't picked up on it yet, I'm EXTREMELY new to SWT.

Any help would be appreciated.

Thanks,

Butch
Re: Changing UI Orientation [message #462043 is a reply to message #461928] Wed, 05 October 2005 02:04 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Have you ever seen a native appliacation that does this?

"Butch" <slcrago@mclaneco.com> wrote in message
news:4ab432cca1a08234b6467a462ccce1eb$1@www.eclipse.org...
> I'm trying to change to orientation of my SWT UI from portrait to
> landscape.
>
> I want all of my widgets (mostly labels and buttons) to be positioned from
> left to right and then from top to bottom ... in other words rotate the
> widgets so you have to turn the hand-held device sideways in order to read
> the text.
>
> The UI requires user interaction so turning it into an image is basically
> out of the question from my standpoint.
>
> In case you haven't picked up on it yet, I'm EXTREMELY new to SWT.
>
> Any help would be appreciated.
>
> Thanks,
>
> Butch
>
>
>
>
>
Re: Changing UI Orientation [message #462052 is a reply to message #462043] Wed, 05 October 2005 10:49 Go to previous messageGo to next message
Steve Crago is currently offline Steve CragoFriend
Messages: 1
Registered: July 2009
Junior Member
I've only seen the code for rotating images, which doesn't help because I'm
not dealing with images.

While I could create images from the labels, I need to display several Radio
Buttons and have listeners attached to them.

All of this requires the view to be in a "Landscape" or Vertical position.


"Steve Northover" <steve_northover@ca.ibm.com> wrote in message
news:dhvcc1$3p7$1@news.eclipse.org...
> Have you ever seen a native appliacation that does this?
>
> "Butch" <slcrago@mclaneco.com> wrote in message
> news:4ab432cca1a08234b6467a462ccce1eb$1@www.eclipse.org...
>> I'm trying to change to orientation of my SWT UI from portrait to
>> landscape.
>>
>> I want all of my widgets (mostly labels and buttons) to be positioned
>> from
>> left to right and then from top to bottom ... in other words rotate the
>> widgets so you have to turn the hand-held device sideways in order to
>> read
>> the text.
>>
>> The UI requires user interaction so turning it into an image is basically
>> out of the question from my standpoint.
>>
>> In case you haven't picked up on it yet, I'm EXTREMELY new to SWT.
>>
>> Any help would be appreciated.
>>
>> Thanks,
>>
>> Butch
>>
>>
>>
>>
>>
>
>
Re: Changing UI Orientation [message #462088 is a reply to message #462052] Wed, 05 October 2005 23:12 Go to previous messageGo to next message
Joe Mihalich is currently offline Joe MihalichFriend
Messages: 25
Registered: July 2009
Junior Member
The only way to do this is to manually do the math your self.
You can store the points in some reference space such
as portrait, and then rotate everything 90 degrees by adjusting
the coordinates of the graphic objects. Obviously, rectangles
become polygons in this manner if you're not rotating at 90
degree angles.

This should work for everything including text boxes, where you'll have
to rotate the text too...which I know is possible at least on the
windows
platform.

Look at the latest verison of Visio if you can. You can rotate any
object
you want freely and manually. This is the functionality you want but
"automated" to do it at a 90 degree angle instead of the user rotating
everything manually.

Joe



"Steve Crago" <cragos@earthlink.net> wrote in message
news:di0b46$bh4$1@news.eclipse.org...
> I've only seen the code for rotating images, which doesn't help because
> I'm not dealing with images.
>
> While I could create images from the labels, I need to display several
> Radio Buttons and have listeners attached to them.
>
> All of this requires the view to be in a "Landscape" or Vertical position.
>
>
> "Steve Northover" <steve_northover@ca.ibm.com> wrote in message
> news:dhvcc1$3p7$1@news.eclipse.org...
>> Have you ever seen a native appliacation that does this?
>>
>> "Butch" <slcrago@mclaneco.com> wrote in message
>> news:4ab432cca1a08234b6467a462ccce1eb$1@www.eclipse.org...
>>> I'm trying to change to orientation of my SWT UI from portrait to
>>> landscape.
>>>
>>> I want all of my widgets (mostly labels and buttons) to be positioned
>>> from
>>> left to right and then from top to bottom ... in other words rotate the
>>> widgets so you have to turn the hand-held device sideways in order to
>>> read
>>> the text.
>>>
>>> The UI requires user interaction so turning it into an image is
>>> basically
>>> out of the question from my standpoint.
>>>
>>> In case you haven't picked up on it yet, I'm EXTREMELY new to SWT.
>>>
>>> Any help would be appreciated.
>>>
>>> Thanks,
>>>
>>> Butch
>>>
>>>
>>>
>>>
>>>
>>
>>
>
>
Re: Changing UI Orientation [message #462089 is a reply to message #462088] Wed, 05 October 2005 23:14 Go to previous messageGo to next message
Joe Mihalich is currently offline Joe MihalichFriend
Messages: 25
Registered: July 2009
Junior Member
Sorry, I just realized that you meant you wanted to rotate the
entire application, including the frame, menus and toolbars.

That I have never done.

Joe

"Joe Mihalich" <jmihalich@is-mwv.com> wrote in message
news:di1mc5$ajs$1@news.eclipse.org...
>
> The only way to do this is to manually do the math your self.
> You can store the points in some reference space such
> as portrait, and then rotate everything 90 degrees by adjusting
> the coordinates of the graphic objects. Obviously, rectangles
> become polygons in this manner if you're not rotating at 90
> degree angles.
>
> This should work for everything including text boxes, where you'll have
> to rotate the text too...which I know is possible at least on the
> windows
> platform.
>
> Look at the latest verison of Visio if you can. You can rotate any
> object
> you want freely and manually. This is the functionality you want but
> "automated" to do it at a 90 degree angle instead of the user rotating
> everything manually.
>
> Joe
>
>
>
> "Steve Crago" <cragos@earthlink.net> wrote in message
> news:di0b46$bh4$1@news.eclipse.org...
>> I've only seen the code for rotating images, which doesn't help because
>> I'm not dealing with images.
>>
>> While I could create images from the labels, I need to display several
>> Radio Buttons and have listeners attached to them.
>>
>> All of this requires the view to be in a "Landscape" or Vertical
>> position.
>>
>>
>> "Steve Northover" <steve_northover@ca.ibm.com> wrote in message
>> news:dhvcc1$3p7$1@news.eclipse.org...
>>> Have you ever seen a native appliacation that does this?
>>>
>>> "Butch" <slcrago@mclaneco.com> wrote in message
>>> news:4ab432cca1a08234b6467a462ccce1eb$1@www.eclipse.org...
>>>> I'm trying to change to orientation of my SWT UI from portrait to
>>>> landscape.
>>>>
>>>> I want all of my widgets (mostly labels and buttons) to be positioned
>>>> from
>>>> left to right and then from top to bottom ... in other words rotate the
>>>> widgets so you have to turn the hand-held device sideways in order to
>>>> read
>>>> the text.
>>>>
>>>> The UI requires user interaction so turning it into an image is
>>>> basically
>>>> out of the question from my standpoint.
>>>>
>>>> In case you haven't picked up on it yet, I'm EXTREMELY new to SWT.
>>>>
>>>> Any help would be appreciated.
>>>>
>>>> Thanks,
>>>>
>>>> Butch
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Re: Changing UI Orientation [message #462095 is a reply to message #461928] Thu, 06 October 2005 09:08 Go to previous message
udayms is currently offline udaymsFriend
Messages: 23
Registered: July 2009
Junior Member
I think what you are trying to do is give BiDi support to your ui. This can be simply done by developing the ui normally. Then, while executing the application, run it with "-dir rtl" arguements.

If you are running the app from inside eclipse during development, then you can add this argurement in the program arguements text field in the run config window.

Hope it helps.
Previous Topic:SWT Office
Next Topic:control the size of a table
Goto Forum:
  


Current Time: Tue Sep 29 12:18:13 GMT 2020

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

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

Back to the top