DecoratedPopupPanel / Visual Themes
Hi, I don't really understand the way some of the visual themes stuff works, and haven't had much luck googling/RTFMing... Any clarification about the below would be appreciated! I've got a DecoratedPopupPanel. It appears to be transparent, and with no border images etc. Here's a screenshot: http://i39.tinypic.com/2ijkeat.jpg Even if I add all the DecoratedPopupPanel CSS rules from the documentation to my application .css file, and put absolute URLs in the image paths, the centre of the window is still transparent. Am I missing something stupid? Also, on the subject of visual themes - the GWT showcase has a bunch of CSS and images for each theme under war/showcase/gwt/. Are these supposed to be copied into your own application directory to support the default styles? And if so, how would they need to be referenced? Since the default styles just use relative paths like "url(images/ hborder.png)". Apologies if I'm missing some nice documentation about this stuff, but I haven't found any! Cheers -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: HorizontalSplitPanel children
Aha! It was something stupid, I was just missing a setSize() at one of the levels of nested controls. Not sure how I missed that. Thanks for the below Ian, I'll definitely use that style stuff to debug the layout! On Mar 22, 10:25 pm, Ian Bambury wrote: > Sorry, I didn't read that properly. > > If you want to post some code, that would be good. > > This works OK, though... > > import com.google.gwt.core.client.EntryPoint; > import com.google.gwt.dom.client.Style.BorderStyle; > import com.google.gwt.dom.client.Style.Unit; > import com.google.gwt.user.client.ui.DockPanel; > import com.google.gwt.user.client.ui.HorizontalSplitPanel; > import com.google.gwt.user.client.ui.Label; > import com.google.gwt.user.client.ui.RootPanel; > > public class BasicProject implements EntryPoint > { > public void onModuleLoad() > { > DockPanel d = new DockPanel(); > RootPanel.get().add(d); > d.setSize("400px", "400px"); > d.getElement().getStyle().setMargin(50, Unit.PX); > d.getElement().getStyle().setBorderColor("red"); > d.getElement().getStyle().setBorderWidth(1, Unit.PX); > d.getElement().getStyle().setBorderStyle(BorderStyle.DOTTED); > > HorizontalSplitPanel p = new HorizontalSplitPanel(); > d.add(p, DockPanel.CENTER); > p.setSize("100%", "100%"); > > Label left = new Label("Left"); > left.getElement().getStyle().setBackgroundColor("cyan"); > p.setLeftWidget(left); > > Label right = new Label("Left"); > right.getElement().getStyle().setBackgroundColor("yellow"); > p.setRightWidget(right); > } > > } > > Ian > > http://examples.roughian.com > > On 22 March 2010 21:39, TM wrote: > > > I'm trying to keep it simple and avoid any extensions like gwt-ext > > unless I have to. I thought this seemed like a fairly straightforward > > use of HorizontalSplitPanel? > > > BTW Ian, I have found your site very useful lately, thanks! > > > On Mar 22, 8:45 pm, Ian Bambury wrote: > > > You might be better off in a gwt-ext forum > > > > Ian > > > >http://examples.roughian.com > > > > On 22 March 2010 19:39, TM wrote: > > > > > BorderLayout > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google Web Toolkit" group. > > To post to this group, send email to google-web-tool...@googlegroups.com. > > To unsubscribe from this group, send email to > > google-web-toolkit+unsubscr...@googlegroups.com > > . > > For more options, visit this group at > >http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: HorizontalSplitPanel children
I'm trying to keep it simple and avoid any extensions like gwt-ext unless I have to. I thought this seemed like a fairly straightforward use of HorizontalSplitPanel? BTW Ian, I have found your site very useful lately, thanks! On Mar 22, 8:45 pm, Ian Bambury wrote: > You might be better off in a gwt-ext forum > > Ian > > http://examples.roughian.com > > On 22 March 2010 19:39, TM wrote: > > > BorderLayout -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: HorizontalSplitPanel children
Hmm, is it just that the HorizontalSplitPanel just doesn't support resizing its children automatically? I saw some vague discussion somewhere about building a replacement out of a BorderLayout, but I'm sure I must just be missing something obvious? On Mar 21, 3:49 pm, TM wrote: > Hi, I'm having quite a lot of trouble with panels and layouts. My app > currently consists of a DockPanel containing a HorizontalSplitPanel, > which in turn contains various widgets either side of the split. > > However, when the HorizontalSplitPanel splitter is moved nothing > happens to the sizes of the child widgets. I have set their widths to > 100%, so I was expecting them to fill the available space. > > I already have added a custom resize handler to make the DockPanel > fill the client area when the browser is resized. Would I have to do > something similar for every other panel that might resize? > > Thanks -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
HorizontalSplitPanel children
Hi, I'm having quite a lot of trouble with panels and layouts. My app currently consists of a DockPanel containing a HorizontalSplitPanel, which in turn contains various widgets either side of the split. However, when the HorizontalSplitPanel splitter is moved nothing happens to the sizes of the child widgets. I have set their widths to 100%, so I was expecting them to fill the available space. I already have added a custom resize handler to make the DockPanel fill the client area when the browser is resized. Would I have to do something similar for every other panel that might resize? Thanks -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: String.equals not working in IE
I had implemented something similar to your first suggestion, I just thought I had missed something obvious. The second suggestion is interesting. I'll be mulling over both, thanks! On Jan 9, 7:39 am, Thomas Broyer wrote: > On Jan 7, 1:46 am, TM wrote: > > > > > > > Here is the scenario: > > > I have a TextArea on my page that displays a couple of paragraphs > > pulled from the database for editing. When the form is submitted the > > TextArea contents are checked to see if any changes have been made. > > > Here is the Java code to test for changes: > > > if (newFormText.equals(originalDBText)) > > formChanged = false; > > > This works fine for Firefox but fails on IE. > > > I had a hunch it was the returns between the paragraphs so I URL- > > encoded the text to see. > > > Original text from db: paragraph%0D%0A%0D%0Aparagraph > > > IE sends back this: paragraph%0A%0Aparagraph > > > while FF sends back: paragraph%0D%0A%0D%0Aparagraph > > > The classic Unix/DOS carriage return / line feed problem. > > > So even if the text is unchanged by the user the browser may sent back > > different text. > > > I may be missing something obvious, but I would have thought this > > would be something GWT or Javascript took care of automatically. > > > Is there a quick fix / best practice / alternative method available? > > Have a look at the JavaDoc for > setText:http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/g...) > > In your case, I'd either: > - normalize the text (replace \r\n with \n before comparing strings) > - "normalize" the "original text" by retrieving it from the TextArea > just after you set it, so what you compare it later you don't have to > "normalize" anything yet again. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
String.equals not working in IE
Here is the scenario: I have a TextArea on my page that displays a couple of paragraphs pulled from the database for editing. When the form is submitted the TextArea contents are checked to see if any changes have been made. Here is the Java code to test for changes: if (newFormText.equals(originalDBText)) formChanged = false; This works fine for Firefox but fails on IE. I had a hunch it was the returns between the paragraphs so I URL- encoded the text to see. Original text from db: paragraph%0D%0A%0D%0Aparagraph IE sends back this: paragraph%0A%0Aparagraph while FF sends back: paragraph%0D%0A%0D%0Aparagraph The classic Unix/DOS carriage return / line feed problem. So even if the text is unchanged by the user the browser may sent back different text. I may be missing something obvious, but I would have thought this would be something GWT or Javascript took care of automatically. Is there a quick fix / best practice / alternative method available? -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.