OffsetWidth not including padding/margins

2011-12-05 Thread decitrig
I have a PopupPanel with a Label inside. I'm trying to center the popup horizontally, so I'm calling setPopupPositionAndShow. In the callback, however, the offsetWidth and offsetHeight arguments don't take into account any margins or padding, whether I set them on the popup or the label: the

Re: OffsetWidth not including padding/margins

2011-12-05 Thread decitrig
It is? UIObject API: getOffsetWidth public int *getOffsetWidth*() Gets the object's offset width in pixels. This is the total width of the object, *including decorations such as border, margin, and padding.* *Returns:*the object's offset width Mozilla DOM

Stop KeyPressEvent propagation from text widgets by default

2011-05-04 Thread decitrig
I have an app with shortcut keys that I don't want to fire while text entry is going on. I'm using a FocusPanel to capture the hotkeys, but the KeyPressEvents are getting propagated out of text entry widgets to the FocusPanel that contains them. I can add a custom KeyPressHandler to each of

UiBinder.useSafeHtmlTemplates

2011-05-03 Thread decitrig
After upgrading to 2.3.0, I was getting a warning about UiBinder.useSafeHtmlTemplates being false. I couldn't find any documentation on this, but looking through various search results eventually led me to try adding set-configuration-property name=UiBinder.useSafeHtmlTemplates value=true /

CellTree with different types at same level

2010-11-16 Thread decitrig
The docs for CellTree say that nodes at the same level usually share a common type, but that it isn't necessary. However, since the data providers node info are parameterized, nodes seem to *have* to have a common type at a given level. What am I missing? are there examples anywhere of having

fixed-width numbers with NumberFormat

2010-11-14 Thread decitrig
I know I can pad a number with zeros, is there a way to pad them with blanks? There are a couple of rules in the EBNF that seem to point this way: number := (integer ('.' fraction)?) | sigDigits sigDigits := '#'* '@''@'* '#'* padSpec := '*' padChar padChar :=

unit test servlet with access to session

2010-11-11 Thread decitrig
I have a RemoteServiceServlet that I'd like to test independently from my client code, however it needs access to an HttpSession object for a great many of the methods. I've thought of a few methods that seem a little hackish: I could refactor most of the logic into @VisibleForTesting methods that

Re: CellTree reordering nodes?

2010-11-09 Thread decitrig
. maybe. On Nov 1, 3:04 am, decitrig rws...@gmail.com wrote: This problem is a bit tricky to describe; forgive me. I have a cell tree where nodes are added programmatically by doing a getList().add() on a ListDataProvider field. However, I found that using the .add(Object

CellTree reordering nodes?

2010-10-31 Thread decitrig
This problem is a bit tricky to describe; forgive me. I have a cell tree where nodes are added programmatically by doing a getList().add() on a ListDataProvider field. However, I found that using the .add(Object) method would do strange things to the ordering, i.e. the node *rendered* as Item 1

Re: How can I create a CellTree of Anchor nodes?

2010-10-31 Thread decitrig
On Oct 16, 5:50 pm, Tamer Sezgin tamer.sez...@gmail.com wrote: It's a little complex example, but the left menu of Showcase application is implemented using CellTree and contains Hyperlinks..    http://gwt.google.com/samples/Showcase/Showcase.html I assume after figuring out how it works, it

error with test classes in gwt packages

2010-10-29 Thread decitrig
I have my java source under src/ and my testing classes under test/, with the same package structure under each. After upgrading GPE and GWT recently, I'm getting errors about easymock and junit classes not being found in source packages. The app compiles runs just fine, but it's annoying to have

Re: clearing or preventing double-click selection

2010-09-13 Thread decitrig
:29 pm, decitrig rws...@gmail.com wrote: I'm working on an application that responds to double clicks on text labels, and I'd like to either disable double-click text selection or clear it from within the event handler. I tried $doc.selection.clear() in a native method, but apparently