gwt panel flow panel - gwt

i like to design entire html with GWT.
but when i press ctrl and + then entire html must be zoomed from center not from upper left
corner.
then what type of panel should i use?
flow panel , stack panel i dont know.

Any, but your root panel should have a fixed (or minimum) width and be centered.
Flowpanels are based on divs, so that's what you probably want.

Related

How to Center an oracle form in oracle form builder?

can anyone tell me how to position an oracle form in the middle of the screen when maximize the window ?
Actually i have a form when i run it, it displayed at the upper left corner of the screen but i want it to be displayed in the center of the screen even while enlarge the window.
You can use CSS style for make this form middle of the page.
Is that form have fixed width?
Then use this style
.formSelector{margin: 0 auto;}
I think it will be working.

How to check which place in panel was clicked? GWT

How can I check which place in Panel Was clicked? I know, I have this some functions:
getClientX, getClientY, getNativeButton, getRelativeX, getRelativeY, getScreenX, getScreenY, getX, getY
but how can I check which click Was near right side of panel and which was near left side of the panel?
I can't add to the Panel two div's with 50% width and detect in that way..
More info:
It's a lot of panels. I must do this in each of panel. I don't know how many panels we have. We have got a constans width of each panel = 400px.
Regards!
Assuming you're handling an onClick event or similar for a panel, you can get the cursor position with getClientX or something similar. Then just get the position and size of the panel and simply check what you're closet to; all elements are rectangular, so shouldn't be too difficult to just write four ifs for it.
The getElement() method will give you the panel's underlying element, so you may need to use that to get the exact size and position.

Flow Panel in a Dock Layout Panel issue

I am working on a project that uses Google Web Toolkit (GWT). I am using a dock layout panel to layout a webpage. In the CENTER, I have a flow panel that adds a set of children with different sizes. When the number of widgets becomes large, then CENTER panel doesn't re-size to include these new widgets. How can I make the dock layout panel resize the center panel so that all the children widgets of the flow panel in the center panel are all shown clearly? I would greatly appreciate it if anyone could provide some information on this. I know that the dock layout panel uses absolute positioning but the flow panel I have is set to dynamically resize when the flow panel has multiple widgets.
Thanks,
MPH
The purpose of GWT ***LayoutPanel widgets is to provide predictable, pixel perfect layout in every browser, as a result it's not possible for the DockLayoutPanel to resize it's center component. Your N, S, E, W components have fixed sizes. How do you expect the DockLayoutPanel to maintain those component sizes AND resize the center component to accomodate growing content inside?
Add the docklayout panel on rootlayout panel den it will resize properly:
DockLayoutPanel p = new DockLayoutPanel(Unit.EM);
/*add N S E W compenents */
RootLayoutPanel rp = RootLayoutPanel.get();
rp.add(p);
hope this will work for you.

Impossible custom layout in gwt?

I want to create a custom panel/layout and it's seeming pretty impossible at this point. I need the components to start in the upper left corner and stack downward until they fill the panel vertically, then wrap to the top of the next column and so on until they eventually fill the screen and create a horizontal scrollbar. After an entire day of trying I've decided it's only possible by abusing GWT (and I assume the whole web browser) adding crippling complexity and terrible performance. Please let me know if I'm missing something and layout like this is possible. Thank you!
Lame solution: Have a small (almost invisible) AbsolutePanel where every string is displayed within a div and measured (getClientWidth/height()). Then each panel can calculate it's size based on the strinsg, borders, padding, etc. it contains. Once each panel knows it's size, they can be layed out relative to the sizes of the other panels in the contianer.
Check out FlexTable, which allows you to specify the row,column for the widget to be added

In GWT, how can I make my widget escape the display bounds of its containing widget?

So for example, if a context menu was too small for its panel when the menu opened, I should like the menu to spill out of the panel in order to display properly.
In Swing, you can arrange for the widget to render on a 'glass pane' which is a transparent layer in front of 'everything else'. Is there an equivalent in GWT?
In my case, my 'context menu' is not a classical menu - it's some arbitrary GWT panel, which might contain (for example) a form with some editable fields, more resembling a dialog ... but it isn't modal, and its position needs to be anchored into the surrounding HTML.
GWT's PopupPanel appears to fulfil this role.