de.sciss.jcollider
Class JCollider

java.lang.Object
  extended by de.sciss.jcollider.JCollider

public abstract class JCollider
extends java.lang.Object

This is a helper class containing utility static functions

Version:
0.36, 11-Oct-09
Author:
Hanns Holger Rutz

Field Summary
static boolean isMacOS
          true if we're running on Mac OS X.
static boolean isWindows
          true if we're running on a Windows system
 
Constructor Summary
JCollider()
           
 
Method Summary
static void displayError(java.awt.Component component, java.lang.Exception exception, java.lang.String title)
          Displays an error message dialog by examining a given Exception.
static java.lang.String getCopyrightString()
          Returns a copyright information string about the library
static java.lang.String getCreditsString()
          Returns a license and website information string about the library
static java.lang.String getResourceString(java.lang.String key)
           
static double getVersion()
          Returns the library's version.
static void main(java.lang.String[] args)
          This method gets called when one tries to start the .jar file directly.
static void setDeepFont(java.awt.Container c, java.awt.Font fnt)
          Set a font for a container and all children we can find in this container (calling this method recursively).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isMacOS

public static final boolean isMacOS
true if we're running on Mac OS X. This value can be used to check if certain UGens are available, or to find the location of scsynth.


isWindows

public static final boolean isWindows
true if we're running on a Windows system

Constructor Detail

JCollider

public JCollider()
Method Detail

main

public static void main(java.lang.String[] args)
This method gets called when one tries to start the .jar file directly. It prints copyright information and quits, unless one of the test methods is specified in the arguments

Parameters:
args - shell arguments. there may be a single argument "--test1" or "--test2" to run the demos. "--bindefs" to create a binary def file from the xml descriptions

getVersion

public static final double getVersion()
Returns the library's version.

Returns:
the current version of JCollider

getCopyrightString

public static final java.lang.String getCopyrightString()
Returns a copyright information string about the library

Returns:
text string which can be displayed in an about box

getCreditsString

public static final java.lang.String getCreditsString()
Returns a license and website information string about the library

Returns:
text string which can be displayed in an about box

getResourceString

public static final java.lang.String getResourceString(java.lang.String key)

setDeepFont

public static void setDeepFont(java.awt.Container c,
                               java.awt.Font fnt)
Set a font for a container and all children we can find in this container (calling this method recursively). This is necessary because calling setFont on a JPanel does not cause the Font of the gadgets contained in the panel to change their fonts.

Parameters:
c - the container to traverse for children whose font is to be changed
fnt - the new font to apply
See Also:
Component.setFont( Font )

displayError

public static void displayError(java.awt.Component component,
                                java.lang.Exception exception,
                                java.lang.String title)
Displays an error message dialog by examining a given Exception. Returns after the dialog was closed by the user.

Parameters:
component - the component in which to open the dialog. null is allowed in which case the dialog will appear centered on the screen.
exception - the exception that was thrown. the message's text is displayed using the getLocalizedMessage method.
title - name of the action in which the error occurred
See Also:
JOptionPane.showOptionDialog( Component, Object, String, int, int, Icon, Object[], Object ), Throwable.getLocalizedMessage()