Examples of AWTError


Examples of ae.java.awt.AWTError

                              if (cl != null) {
                                  try {
                                      cls = cl.loadClass(name);
                                  } catch (ClassNotFoundException ee) {
                                      ee.printStackTrace();
                                      throw new AWTError("DataTransferer not found: " + name);
                                  }
                              }
                          }
                          if (cls != null) {
                              try {
                                  method = cls.getDeclaredMethod("getInstanceImpl");
                                  method.setAccessible(true);
                              } catch (NoSuchMethodException e) {
                                  e.printStackTrace();
                                  throw new AWTError("Cannot instantiate DataTransferer: " + name);
                              } catch (SecurityException e) {
                                  e.printStackTrace();
                                  throw new AWTError("Access is denied for DataTransferer: " + name);
                              }
                          }
                          if (method != null) {
                              try {
                                  ret = (DataTransferer) method.invoke(null);
                              } catch (InvocationTargetException e) {
                                  e.printStackTrace();
                                  throw new AWTError("Cannot instantiate DataTransferer: " + name);
                              } catch (IllegalAccessException e) {
                                  e.printStackTrace();
                                  throw new AWTError("Cannot access DataTransferer: " + name);
                              }
                          }
                          return ret;
                      }
                    };
View Full Code Here

Examples of ae.java.awt.AWTError

            public Object run() {
                String nm = System.getProperty("ae.java.awt.printerjob", null);
                try {
                    return (PrinterJob)Class.forName(nm).newInstance();
                } catch (ClassNotFoundException e) {
                    throw new AWTError("PrinterJob not found: " + nm);
                } catch (InstantiationException e) {
                 throw new AWTError("Could not instantiate PrinterJob: " + nm);
                } catch (IllegalAccessException e) {
                    throw new AWTError("Could not access PrinterJob: " + nm);
                }
            }
        });
    }
View Full Code Here

Examples of java.awt.AWTError

                            x.printStackTrace();
                        }
                    }
                } else /*if (target instanceof JFrame) */ {
                    if (!isGuiActive()) {
                        throw new AWTError("Gui is not active");
                    }
                    log.debug("createFrame:normal(" + target + ")");
                    // Other frames are emulated
                    //return new SwingFramePeer(SwingToolkit.this, target);
                    synchronized (ret) {
View Full Code Here

Examples of java.awt.AWTError

    public void drawAlphaRaster(Raster raster, AffineTransform tx, int srcX, int srcY,
                                int dstX, int dstY, int width, int height, Color color) {
        if (bitmapGraphics != null) {
            bitmapGraphics.drawAlphaRaster(raster, tx, srcX, srcY, dstX, dstY, width, height, convertColor(color));
        } else {
            throw new AWTError("Not implemented");
        }
    }
View Full Code Here

Examples of java.awt.AWTError

    public static JNodeToolkit getJNodeToolkit() {
        final Toolkit tk = Toolkit.getDefaultToolkit();
        if (tk instanceof JNodeToolkit) {
            return (JNodeToolkit) tk;
        } else {
            throw new AWTError("Toolkit is not a JNodeToolkit");
        }
    }
View Full Code Here

Examples of java.awt.AWTError

    }

    public static boolean isGuiActive() {
        final Toolkit tk = Toolkit.getDefaultToolkit();
        if (!(tk instanceof JNodeToolkit)) {
            throw new AWTError("Toolkit is not a JNodeToolkit");
        }
        return (((JNodeToolkit) tk).graphics != null);
    }
View Full Code Here

Examples of java.awt.AWTError

    }

    public static void startGui() {
        final Toolkit tk = Toolkit.getDefaultToolkit();
        if (!(tk instanceof JNodeToolkit)) {
            throw new AWTError("Toolkit is not a JNodeToolkit");
        }
        ((JNodeToolkit) tk).incRefCount();
    }
View Full Code Here

Examples of java.awt.AWTError

    }

    public static void initGui() {
        final Toolkit tk = Toolkit.getDefaultToolkit();
        if (!(tk instanceof JNodeToolkit)) {
            throw new AWTError("Toolkit is not a JNodeToolkit");
        }
        ((JNodeToolkit) tk).incRefCount();
    }
View Full Code Here

Examples of java.awt.AWTError

    }

    public static void stopGui() {
        final Toolkit tk = Toolkit.getDefaultToolkit();
        if (!(tk instanceof JNodeToolkit)) {
            throw new AWTError("Toolkit is not a JNodeToolkit");
        }
        ((JNodeToolkit) tk).decRefCount(true);
        Toolkit.clearDefaultToolkit();
    }
View Full Code Here

Examples of java.awt.AWTError

    }

    public static void refreshGui() {
        final Toolkit tk = Toolkit.getDefaultToolkit();
        if (!(tk instanceof JNodeToolkit)) {
            throw new AWTError("Toolkit is not a JNodeToolkit");
        }
        ((JNodeToolkit) tk).refresh();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.