Pierre Hébert with the addition of extend() and getMy() items and containers now share a lot of functionality.

Pierre Hébert with the addition of extend() and getMy() items and containers now share a lot of functionality. Would it be possible to pull this up into a common superclass?

methods I think should be shared:

extend()

getId()

getMy()

getProperties()

get/setTag()

I’m not sure about

getHeight()

getWidth()

getParent()

while position related methods have the same signature too, I don’t think they should be shared as they do completely different things.

]]>

3 Commentsto Pierre Hébert with the addition of extend() and getMy() items and containers now share a lot of functionality.

  1. Anonymous says:

    < ![CDATA[

    They share some functionalities but that’s mostly a coincidence. I would say that gathering methods under a base class would be factorization, not generalization. I don’t think that having a common ancestor would bring any benefit on the script side, and this won’t be useful on the java code side because not all methods share the same implementations.


    In fact some of these methods (extend, my, tag) could have been removed from Container if all containers had an opener item. Using the services offered by the opener item would have been enough (probably). But this is not the case for root containers (desktops). I had the idea to add a dummy opener item for desktops, but too late.

    ]]>

  2. Anonymous says:

    < ![CDATA[

    Pierre Hébert what do you mean by “opener item” ?

    ]]>

  3. Anonymous says:

    < ![CDATA[

    The folder or panel item that gives access to the container

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *