Wednesday, August 29, 2012

Re: Request for change of access control of CellTree.BasicStyle



On Wednesday, August 29, 2012 5:42:44 PM UTC+2, Thad wrote:
Maybe I'm not understanding how resources are used or applied, but that is not working for me. If I try the following interface, the resulting CellTree looks like CellTree.Style, not BasicStyle:

  interface TreeBasicResources extends CellTree.Resources {
    @Override
    @Source(value = { CellTree.Style.DEFAULT_CSS, 
        "com/google/gwt/user/cellview/client/CellTreeBasic.css" })
    CellTree.Style cellTreeStyle();
  }
  ...
  Cell Tree myTree = new CellTree(treeModel, null, 
          GWT.<TreeBasicResources> create(TreeBasicResources.class));

You have to create an interface that extends CellTree.Style and use that inerface as the return type of the overridden cellTreeStyle().
See http://code.google.com/p/google-web-toolkit/issues/detail?id=6144

Also, BasicStyle does not use CellTree.Style.DEFAULT_CSS (that's the whole reason it exists in the first place!)

(that being said, BasicStyle not being public is probably an oversight)


And if it did work, how then to add my change? Extend this interface with another? (All I want is cellTreeItem padding-top/-bottom to be 0px).

Add a CSS file and list it in the @Source annotation.
In your CSS file, only include the cellTreeItem definition. And if you override rules, make sure you list your file after CellTreeBasic.css: CSS cascading rules apply when processing CssResources.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/avycD2caY1AJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment