Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > legality of mimicking the Windows look and feel

Reply
Thread Tools

legality of mimicking the Windows look and feel

 
 
Thomas Fritsch
Guest
Posts: n/a
 
      12-13-2006
Daniel Pitts wrote:
>
> It was my impression that Windows LAF used native components,

No, Sun implemented the Windows LAF without any native components, but
recreated the whole thing in pure Java (in package
com.sun.java.swing.plaf.windows).

> and thats
> why it wouldn't work on anything non-native, but I could be mistaken.

The abstract LookAndFeel class has the method:
/**
* Return true if the underlying platform supports and or permits
* this look and feel. This method returns false if the look
* and feel depends on special resources or legal agreements that
* aren't defined for the current platform.
*/
public abstract boolean isSupportedLookAndFeel();

The implementation in the WindowsLookAndFeel class is (probably enforced
by Microsoft's lawyers):
public boolean isSupportedLookAndFeel() {
/* return true if running on Windows; */
}
and that is why it doesn't work on Linux or Mac.

--
Thomas
 
Reply With Quote
 
 
 
 
Thomas Hawtin
Guest
Posts: n/a
 
      12-13-2006
Andrew Thompson wrote:
>
> Therefore the best PLAF (for the user) is generally
> whatever lookAndFeelForPlatform(?) the JVM produces.
> (I think that only leaves the Linux folks to stress over the
> fact they chose Motif, when GTK is offered).


But which GTK engine? Then there is Qt, or the weirdo **** Firefox does,
or same for Opera, or n different media players each broken in different
ways, etc., etc. There is no one native look and feel on Linux, but most
can be made to look like Metal.

Tom Hawtin
 
Reply With Quote
 
 
 
 
Thomas Hawtin
Guest
Posts: n/a
 
      12-13-2006
Daniel Dyer wrote:
>
> I believe that the Windows LAF files are provided with other platforms'
> JREs but that by default you can't use them. I remember that I was able
> to sub-class the Windows look and feel with Java 1.4 to make it usable
> on Linux, although it didn't look that good (presumably because it
> normally depends on features of the OS). I think it is a breach of some
> licence or other to deploy such code.


It's not in the JRE, but the source is in src.zip of the JDK. Using
classic (pre-Windows XP) is easy enough. XP style can be used, but all
the skin information is read from Windows so it doesn't look too great...

http://jroller.com/page/tackline?entry=xp_pl_f_on_linux

IIRC, Apple were really into "look and feel" suits in the early nineties
(late eighties?). Sun approached Microsoft, but failed to get an
assurance that they would not sue.

Tom Hawtin
 
Reply With Quote
 
Steve W. Jackson
Guest
Posts: n/a
 
      12-13-2006
In article <(E-Mail Removed). com>,
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

> > I don't recall where I've read information on this topic in the past.
> > But you'll find that the Mac LAF isn't available with the Windows or
> > Linux Java installations, and the Windows LAF isn't available on Macs.
> > The entire reason, from what I read, has to do with copyrights. You
> > might want to do a little web searching on the topic for more details.
> > But it's apparently illegal to copy the Windows LAF files, for instance,
> > to another platform for use with your Java app.

>
> Interesting. Thanks for the response. So if I were interested in
> creating a Java app that mimicked iTunes's appearance (but not its
> functionality), and ran on all platforms, that would be a copyright
> violation? I'll do some more searching.
>
> Jared


There's a difference in the Mac LAF (Aqua) and the iTunes "brushed
metal" appearance -- and I have no idea for certain, but I'd bet you
could find a copyright-free way to implement it elsewhere, particularly
since the Windows version of iTunes (last I looked) had that same
appearance.

= Steve =
--
Steve W. Jackson
Montgomery, Alabama
 
Reply With Quote
 
Daniel Pitts
Guest
Posts: n/a
 
      12-13-2006

Thomas Fritsch wrote:
> Daniel Pitts wrote:
> >
> > It was my impression that Windows LAF used native components,

> No, Sun implemented the Windows LAF without any native components, but
> recreated the whole thing in pure Java (in package
> com.sun.java.swing.plaf.windows).
>
> > and thats
> > why it wouldn't work on anything non-native, but I could be mistaken.

> The abstract LookAndFeel class has the method:
> /**
> * Return true if the underlying platform supports and or permits
> * this look and feel. This method returns false if the look
> * and feel depends on special resources or legal agreements that
> * aren't defined for the current platform.
> */
> public abstract boolean isSupportedLookAndFeel();
>
> The implementation in the WindowsLookAndFeel class is (probably enforced
> by Microsoft's lawyers):
> public boolean isSupportedLookAndFeel() {
> /* return true if running on Windows; */
> }
> and that is why it doesn't work on Linux or Mac.
>
> --
> Thomas


Well, I've tried to override isSupportedLookAndFeel, and I ended up
with other problems as well. It could be more than just legal issues
at work.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows Look & Feel for applet? Ramon F Herrera Java 9 09-26-2007 09:55 PM
Giving Windows XP look and feel to ASP.NET AJAX Website =?Utf-8?B?TWFuaXNoIEJhZm5h?= ASP .Net 6 02-23-2007 04:23 PM
look and feel windows XP for menu bar Ken Cox [Microsoft MVP] ASP .Net 2 09-09-2006 05:17 PM
How to set windows XP look and feel for my Eclipse IDE Srikanth Java 1 12-03-2005 09:06 AM
Specifying look and feel for embedded windows user control Marina ASP .Net 3 01-28-2004 05:14 PM



Advertisments