Thanks everyone. I'm almost done with the implementation.
What should getSkinAdditions return? A Collection or a List?
Also, SkinAddition is a public API, since it is needed by Skin.java, which is public.

Here are the signatures/doc:

 /**
* Adds a SkinAddition on this Skin. You can call this method as many times * as you like for the Skin, and it will add the SkinAddition to the list of
  * SkinAdditions.
  * However, it does not make sense to call this method more than once
  * with the same SkinAddition object.
* This is meant for the skin-addition use-cases, where a custom component * developer has a style sheet and/or resource bundle for their custom * components, and they want the style sheet and/or resource bundle
  * to work for this Skin and the children Skins.
  * The stylesheets specified in the SkinAdditions will be merged with the
  * Skin's own styles.
* The resource bundles specified in the SkinAdditions will be looked into
  * if the translated key is not found in the Skin's own resource bundle
  * during the call to getTranslatedString or getTranslatedValue.
  *
  * @param skinAddition The SkinAddition object to add to the Skin.
  * @throws NullPointerException if SkinAddition is null.
  */
 abstract public void addSkinAddition (
   SkinAddition skinAddition
   );
/**
  * Gets a Collection of SkinAdditions that have been added on this Skin.
  * @return Collection a Collection of SkinAdditions.
  */
 abstract public Collection<SkinAddition> getSkinAdditions ();


-- Jeanne

Adam Winer wrote:
Looks good.

-- Adam


On 7/19/07, Matt Cooper <[EMAIL PROTECTED]> wrote:
Hi Jeanne,

I also like these changes.

Thank you,
Matt


On 7/19/07, Blake Sullivan <[EMAIL PROTECTED] > wrote:
> Considering that I reviewed them, it isn't surprising that I like all of
> these changes.
>
> -- Blake Sullivan
>
> Jeanne Waldman wrote:
> > Hi there,
> >
> > I have some new Skin API proposals I would like to run by everyone.
> > This involves public API changes and some private IMPL changes, and
> > comes up while I (with code reviews by Blake Sullivan) am trying to
> > fix JIRA issue
https://issues.apache.org/jira/browse/TRINIDAD-105
> > "enable registerResourceBundle to any skin". (currently we get severe > > errors when running custom components against the simple skin because
> > the resource bundle keys do not exist in the simple skin).
> >
> > Our Skin API already has the method registerStyleSheetName, so I was
> > going to add a registerResourceBundleName method.
> > But I have to admit that these apis really confuse me because we also
> > have a getStyleSheetName API. But that doesn't get the skin-addition
> > stylesheets, that gets the Skin's original stylesheet. I think we need
> > to differentiate these two things better.
> >
> > The registerStyleSheetName API is meant for skin-additions (In
> > trinidad-skins.xml , custom component developers use skin-additions to > > add a stylesheet -- and with this JIRA fixed also a resource bundle --
> > to any skin, most likely the simple skin).
> >
> > I think that registerStyleSheetName should be something like
> > addSkinAdditionStyleSheetName. And the registerResourceBundleName
> > method I wanted to add would be addSkinAdditionResourceBundle. This
> > would be a big improvement.
> >
> > But now that we will have two skin-addition properties on the Skin
> > (stylesheetname and resourcebundlename), it seems clearer to add a new
> > SkinAddition object to a Skin instead of having these two skin
> > addition methods. A SkinAddition object can take
> > styleSheetName/resourceBundleName in its constructor.
> >
> > [Summary for Skin.java]
> >
> > replace registerStyleSheetName with addSkinAddition
> > add getSkinAdditions
> >
> > [Summary for new SkinAddition object:]
> >
> > Constructor takes styleSheetName and resourceBundleName
> > add getStyleSheetName
> > add getResourceBundleName
> >
> > [Changes to SkinImpl object]
> >
> > remove setStyleSheetName (move to constructor)
> > remove setBundleName (move to constructor)
> > Add the above properties to the constructor. This will clean up the
> > API and prevent someone from changing the stylesheet and bundle on a
Skin
> > Change getBundleName to getResourceBundleName
> >
> >
> > Thanks for your feedback!
> >
> > - Jeanne
> >
> >
> >
> >
> >
> >
> >
>
>



Reply via email to