Ejemplo n.º 1
0
  static {
    // 1) Need JDK1.2 or higher. 2) JAI should have been installed

    if (!JMFSecurityManager.isJDK12()) {
      throw new UnsatisfiedLinkError("Fatal Error: JAI Effects need JDK1.2 or higher VM");
    }
    try {
      Class.forName("javax.media.jai.PlanarImage");
    } catch (ClassNotFoundException e) {
      throw new UnsatisfiedLinkError("Fatal Error: JAI classes are not present");
    }
  }
Ejemplo n.º 2
0
 /** Return the control based on a control type for the PlugIn. */
 public Object getControl(String controlType) {
   try {
     Class cls = Class.forName(controlType);
     Object cs[] = getControls();
     for (int i = 0; i < cs.length; i++) {
       if (cls.isInstance(cs[i])) return cs[i];
     }
     return null;
   } catch (Exception e) { // no such controlType or such control
     return null;
   }
 }