In LWUIT, how can i add multiple container/Layout on single Form? - forms

In J2ME I am Using LWUIT library.
My problem is I want to add various component on single Form using different layout or Container. I am looking for some code or example.
Example..
add Header image on top of the Form.
Adding two label, two textfield on
one Container/layout and Two button
on another Container/layout. Design
like Login Form.
add Footer image on bottom of the
Form.

Set the title image of the form for showing header image. Set the softbutton image of the form for showing footer image.
Normally you can use the border layout or box layout for both container and form. See the LWUITDemo application on LWUIT repository. It will helps you. Also see the same sample examples,
The Lightweight User Interface Toolkit (LWUIT): An Introduction
Using LWUIT layouts

use different container with different layout to add in form
i.e set form to Borderlayout add title container to north and footer container to south
next use another container with your required layout and add it to center in form, thus create container hierarchy

For samples on how to arrange components in various layouts you can look within the LWUIT 1.5 distribution and on demos such as the LWUITDemo which has a layouts demo within it. Keep in mind that layouts can be nested.
The LWUIT blog which I maintain contains lots of samples of layout usage.

Related

How do I change navbar logo and styling dynamic?

I am building a multi tenant platform and want to have different logos and styling of the navbar depending on logged in user or some other business rule. How do I do that?
If I want to add widgets on the navbar, for example notification indicator, how do I do that?
An interesting possiblity is to make a component, and that component includes a /style tag that is data-bound. You can also include base64 coded images that is used by the css in your component.
For inserting stuff in the navbar maybe you can use pseudo elements from CSS.
Otherwise I would install a local Turnkey development like this https://wiki.mdriven.net/index.php/Development_in_Visual_Studio. Then you can change any part of the site.

Xamarin Forms MultiPage<T> example

I am thinking to implement a custom tabbed page with some custom functionality and I thought about using MultiPage.
I am thinking about that because it seems to be the base class of the Forms's TabTabbedPage and would like to actually have a page at the bottom to display the buttons and the top space to display come content pages based on the selection(of the user).
Currently I only added 2 pages on the MultiPage and the last page from the data set is being displayed but I can't shrink its height so that I can add another content page below to add the buttons. I tried to set the HeightRequest on the pages but with no effect.
Does anyone have at hand some samples involving the MultiPage or knows how to change the ContentPage width or height?
Thanks a lot!

setting tab index for nested forms and canvas in smartgwt

I have a smart gwt application which includes VLayouts, HLayouts, DynamicForms, Canvas, etc in a nested fashion.
One form comes inside of another in many places across the application.
But the tab order (Navigation using Tab and Shift+Tab) is behaving in a random order in many places.
Can anyone provide some suggestions for overall archetecture of the application?
For example
Which method should be used vLaout.addMember(myPanel) or
vLayout.addChild(myPanel)?
How to properly nest the components?
should globalTabIndex be used ?
If two forms are added to a VLaoyout, how can I specify the TabIndex to specify which form's components should be focused first ?
I didnt find any proper documentaion in smartgwt website. Please help me. Any kind of suggestions will be helpful.
addMember(Widget widget) shall be used - at least in most cases.
Organize them in logical panels (all components of a form in a form container, all the forms in a layout container and all the layout containers in higher order layout containers)
Depends on your case. You are not very clear on what you want to achieve with it.
DynamicForm is a Canvas. Use focus() at the form you want to be shown firstly focused to the user.
The http://www.smartclient.com/smartgwt/javadoc if very useful to find out about the objects supported methods and actions.

Implement header, footer and menubar in Google Web Toolkit (GWT)

I just started learning Google Web Toolkit (GWT). How do I implement header, left navigation bar and footer in my GWT application?
How can i place the header and footer in one page and reuse the same in all other pages?
Please help me how can i achieve the above requirement?
I like using SplitLayoutPanel. Here you will basically only change the center panel and leave northe west etc alone.
You can find a very good overview here.
You can create a template in Ui:Binder with your basic layout, and use this template for all new pages.
Another option is to create a custom widget for you menu, header and footer. Then you again can use a template for new pages, but instead of including each button, label, etc., you just include your custom headerWidget, footerWidget and menuWidget.
As others already suggested, you use one of the LayoutPanels to organize your page. My favorite is LayoutPanel. You add your headerWidget, footerWidget, and menuWidget to this LayoutPanel and specify their position.
I recommend that you use a Ui:Binder for this: it's a more convenient way to do layouts, it's very visual (helps to cut on the number of mistakes), and much easier to maintain.

Smartgwt - create a panel with title and a border

This sounds like a pretty simple thing to do but I havent been able to find an easy way to do this. How do I create a panel with a title and a border which can contain my widgets? I have seen the SectionStack class which provides this. But I dont want to create a section stack.
Window can be added to a layout and drawn. But is it the only way or is there a container class that I am missing?
Also, how does one center things? Say a textfield and a button at the center of the page. How is this achieved?
If you are using a DynamicForm, you can give it a border and title with
form.setIsGroup(true);
form.setGroupTitle(title);
This actually works for Canvas, too (which is the superclass of most widgets and layouts in SmartGWT).
(I just had the same problem, and found this question, as well as the thread Is there a "titled Border" on the SmartGWT Forums, which gave this answer. I tried and it seems to work.)
To do form-related tasks, look into DynamicForm. To set the inputs in the form, you use setItems(Item...). A text field is a TextItem. You set it's title to control the label that SmartGWT will build. To get a title for the form, the best I've come up with is to use a container canvas that will contain both the title (probably a Label element) and the DynamicForm. To center the inputs, I believe you'd need to use setAlignment on the DynamicForm.
You could create an object that is actually a VLayout that contains a Label (the tile), has a border as you need and includes a Canvas (the generic stuff you want included).
In my experience, I noticed that very often I have a DynamicForm visible, so I just add a BlurbItem control to diplay the tile and a small explanation.