Skip to main content

Layout Manager

3 replies [Last post]
blackmage
Offline
Joined: 2007-08-28
Points: 0

Can layout managers be used on players?

Basically I want to ensure that an image or button added into an xlet will look the same displayed on any TV(positioning, sizing, etc). Should I use a layout manger for this or is there another way or better way?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
billf
Offline
Joined: 2004-02-13
Points: 0

> Can layout managers be used on players?

Yes, in that PBP 1.0 contains the AWT layout managers,
like GridLayout, GridBagLayout, CardLayout, and stuff like that.
However, in BD-J, I must admit that I'm not personally a big fan
of doing UIs this way.

The thing is, on a BD player there are guarantees about screen
resolution. It's not like a PC application where the window can be
resized - you know how many pixels you're dealing with. You also
know the graphical assets you're using, so for many UIs you know the
exact pixel position of everything. In other words, the problem that layout
managers were designed to fix is mostly non-existant in this environment.

This does break down a little with font rendering (where players can vary
some in their interpretation of font metrics), and if you use HAVi widgets,
you'll definitely see visual differences between players that can affect the
size of what shows up on the screen. To me, this is a pretty good reason
to not use widgets, and be very sparing and careful in your use of fonts, at
least for screens with careful visuals and high production values.

What replaces widgets? IMHO, a framework built around managing visual
assets and their display and animation on the screen, coupled with a way of
sensibly managing a state machine that models remote control input. GRIN
is one such - and we're at the beginning of a project to upgrade it, and make it
much more industrial-strength.

:-)

Cheers,

Bill

> Basically I want to ensure that an image or button
> added into an xlet will look the same displayed on
> any TV(positioning, sizing, etc). Should I use a
> layout manger for this or is there another way or
> better way?

chris_e_brown
Offline
Joined: 2004-09-14
Points: 0

Even if the resolution is fixed, isn't it useful to use a layout manager for localization, where text requires a differing amount of space depending on the currently-selected language?

Bill Foote

bd-j-dev@mobileandembedded.org wrote:
> Even if the resolution is fixed, isn't it useful to use a layout manager for localization, where text requires a differing amount of space depending on the currently-selected language?
> [Message sent by forum member 'chris_e_brown' (chris_e_brown)]
>

Good point.

I guess my mindset is one where the graphical assets would
be re-done for each locality, but of course that can be expensive.
Using widgets and a layout manager is one way of handling
localization. Another might be to push the layouting earlier
in the workflow, during an asset compilation stage; I can
see some interesting trade-offs here.

Cheers,

Bill

---------------------------------------------------------------------
To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net