Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Heavy/Light-weightness of Mac vs. non-Mac components



SWT is another toolkit entirely. On the Mac, the SWT is implemented in Carbon, while the AWT is implemented in Cocoa.

It is possible that some SWT components are lightweight, since if an SWT component doesn't have a native equivalent, a lightweight replacement is used. I don't know the SWT implementation details, so I don't know if this is the case for any SWT components on the Mac.

In the current implementation (1.4.2 and 1.5), all AWT components are heavyweight and most Swing components are lightweight. However, I believe that Popup Menus are heavyweight (so that menu's have proper translucency and shadows).

Karl

On Jun 30, 2005, at 9:25 AM, Michael Rasmussen wrote:

  To continue confusing the issue, there is the SWT which could
constitute a third class of windowing.  SWT is implemented as , I
think, native components compiled for the OS, then wrapped with Java
using JNI.  I suppose this could constitute a third "weightedness" but
it is available not only for Mac, but for almost all Java platforms.
  It is also possible that what your colleagues mean is that Sun was
not responsible for writing the code for the Apple GUI stuff.  That
was all Apple's doing.  This is different from other Java platforms
like Windows or Solaris.
  Cocoa* is in there somewhere too, but I do not do any GUI
programming on the Mac so I don't have the slightest clue how it fits
into the Mac/Java integration.

*it is entirely possible that when I say Cocoa I really mean Carbon.

Michael

On 6/30/05, Anthony Magee <email@hidden> wrote:
On Jun 30, 2005, at 10:03 AM, Eric Christiansen wrote:

Hello all,

My company develops a cross platform C++/Java application, but they
have Mac specific code in places where it may not be needed.  The
justification for some of this is that Mac Java components are not
implemented the same as Java on other platforms.  This seems
believable since Apple has their own JVM.  But is it true?

Two questions:

1) If an AWT component is heavyweight on Win XP, is it on the Mac
also?

I'm sure others will give a more concise answer for you, but I'll give it a shot. Java defined the AWT when it was very early in age, so the java code eventually calls some native code to draw its windows and so on. This is controlled by the JVM. Heavyweights, while not exactly the same on every system, do show the same characteristics of being drawn by native code and not interacting well with pure java -- lightweight-- components.

2) Is there a third in-between weight-ness on Mac? This is what my cohorts say that prompted this e-mail. If true, what does this mean?
         I know of no third class of windowing components. But to
comment on your pre-question ideas, pure java windowing components,
i.e. Swing, are designed to behave the same on all operating systems.
What they lack is a unified look-and-feel, and this is largely, if
not entirely, up to the programmer with that caveat that some LAFs
are copyrighted.

I hope this informs you.

Thought I'd ask the experts.


TIA, Eric


Anthony Magee
email@hidden
MereRealia.com:  http://myweb.cableone.net/macawm81
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

--

if( ((shouldClose && !((pageName != null) && (pageName.equals("Close") || pageName.equals("Open")))) ||
(!Singleton.sharedInstance().isConnectionAvailable())) &&
!((aString != null) && (aContext.component().name().equals("Wait"))) &&
!((request.formValueForKey("page") != null) && (request.formValueForKey("page").equals("Message"))) ) {
// insert content here
}


Homepage:
     http://homepage.mac.com/khsu/index.html

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Heavy/Light-weightness of Mac vs. non-Mac components (From: Eric Christiansen <email@hidden>)
 >Re: Heavy/Light-weightness of Mac vs. non-Mac components (From: Anthony Magee <email@hidden>)
 >Re: Heavy/Light-weightness of Mac vs. non-Mac components (From: Michael Rasmussen <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.