[icedtea-web] RFC: PR918: java applet windows uses a low resulution black/white icon

Omair Majid omajid at redhat.com
Thu Apr 19 10:50:26 PDT 2012


On 04/19/2012 06:08 AM, Jiri Vanek wrote:
> On 04/19/2012 05:22 AM, Omair Majid wrote:
>> On 04/18/2012 12:32 PM, Jiri Vanek wrote:
>>> On 04/18/2012 05:55 PM, Omair Majid wrote:
>>>> On 04/18/2012 11:46 AM, Jiri Vanek wrote:
>>>>
>>>> Yes, I can certainly modify ImageResources to take care of more
>>>> sizes.
>>>
>>> Then there rises question when to use which :)
>>
>> Eh? We can just set them all (using setIconImages) and let the window
>> manager pick whatever it wants! Or do you mean at places other than the
>> window icon?
> Yes this will probably make the best deal. And is it one more reason to
> hide the setting of icons (as already discussed lower). Or to use
> setIconImages already now and so prevent future refactoring.

Done.

> 
>>+ public enum ImageResources {
> 
> Wou I have never seen this :)
> I'm used for pattern like:
> class Class{
> private static final Class INSTANCE=new Class();
> 
> public static Class getInstance(){retrun INSTANCE;}
> }
> 
> But I like this enum approach. By my lack of knowledge the advantage(but
> also disadvantge compared with yours)  of above is method returning the
> singleton. But I really like your approach! Can you tell me  (just from
> curiosity) what you consider as advantages for your enum?
> 

Josh Bloch recommended this way to implement singletons in his book
"Effective Java". There is probably tons about this on the internet, but
a quick summary is available at:
http://en.wikipedia.org/wiki/Singleton_pattern#The_Enum_way

I have pushed this as:
http://icedtea.classpath.org/hg/icedtea-web/rev/f13777a89e0d

Cheers,
Omair



More information about the distro-pkg-dev mailing list