SwingOSC – Java-based cross-platform replacements for Cocoa GUI classes

This document lists most of the available classes. last mod: 17-jul-09 sciss

Cocoa vs. Java GUI classes

SuperCollider Language on Mac OS comes with a large set of GUI classes that create windows and gadgets to control a synth, a performance or an application. Unlike the language itself and the server, these class are deeply connected to the Mac OS Cocoa API and have not been ported to other platforms. Alternative controls include SCUM and Emacs for Linux, and of course all OSC aware applications, like Max for example. However the crucial point is to have ready language classes to build GUIs. In SwingOSC GUI (Java based GUI) we have started to create classes very similar to the original SuperCollider Mac classes with the aim of being able to write almost usual syntax and run it on different platforms.

 

Translated Classes

Most of the Mac OS only GUI elements have been converted, with some functionality still missing. To switch from Cocoa to Java GUI, you should use the GUI class if possible. You can also use SwingOSC classes directly, by using its replacement classes which have the same name but an additional initial J character. So instead of the Cocoa SCWindow class, SwingOSC provides you with JSCWindow, and SCButton becomes JSCButton, etc.

Views that only exists in Cocoa at the moment:

 

Helper classes that do not work with SwingOSC at the moment:

 

Views that only exists in Swing at the moment:

 

Besides, there is few missing methods or additional methods in the existing views. The compatibility is documented with each individual view's help file.

Helper Classes

Some helper classes work in both contexts : EZSlider, EZNumber, EZRanger, Color, FlowLayout, Gradient

UGen Replacements

There are replacements for the Mac-only Mouse UGens:

CocoaJava (SwingOSC)
MouseXJMouseXtrack horizontal mouse position
MouseYJMouseYtrack vertical mouse position
MouseButtonJMouseButtontrack mouse button pressing
KeyStateJKeyStatetrack keyboard typing

 

Other Platform Specific Classes

CocoaJava (SwingOSC)
SpeechJSCSpeechtext-to-speech synthesizer