Package java.awt

Examples of java.awt.AWTError


     *
     * @param target
     */
    private void checkTarget(final Container target) {
        if (this.target != target) {
            throw new AWTError("BoxLayout should be used for one container only");
        }
    }
View Full Code Here


     *
     * @param target
     */
    private void checkTarget(final Container target) {
        if (this.target != target) {
            throw new AWTError("OverlayLayout can't be shared");
        }
    }
View Full Code Here

        Int32Pointer minorPtr = nb.createInt32Pointer(1, false);
        int res = 0;
        res = x11.XTestQueryExtension(dpy, dummyPtr, dummyPtr,
                                      majorPtr, minorPtr);
        if (res != X11Defs.True) {
            throw new AWTError("XTest is not supported by your X server!");
        }
    }
View Full Code Here

                }
                try {
                    return (PrinterJob) Class.forName(s).newInstance();
                } catch (ClassNotFoundException cnfe) {
                    // awt.5A=Default class for PrinterJob is not found
                    throw new AWTError(Messages.getString("awt.5A")); //$NON-NLS-1$
                } catch (IllegalAccessException iae) {
                    // awt.5B=No access to default class for PrinterJob
                    throw new AWTError(Messages.getString("awt.5B")); //$NON-NLS-1$
                } catch (InstantiationException ie) {
                    // awt.5C=Instantiation exception for PrinterJob
                    throw new AWTError(Messages.getString("awt.5C")); //$NON-NLS-1$
                }
            }
        });
    }
View Full Code Here

            public Object run() {
                String nm = System.getProperty("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

            public Object run() {
                String nm = System.getProperty("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

                                  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 = 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

        int res = 0;
        res = x11.XTestQueryExtension(dpy, dummyPtr, dummyPtr,
                                      majorPtr, minorPtr);
        if (res != X11Defs.True) {
            // awt.12=XTest is not supported by your X server\!
            throw new AWTError(Messages.getString("awt.12")); //$NON-NLS-1$
        }
    }
View Full Code Here

                : accessibleContext;
    }

    @Override
    public void setLayout(LayoutManager layout) {
        throw new AWTError(Messages.getString("swing.err.01")); //$NON-NLS-1$
    }
View Full Code Here

     *
     * @param target
     */
    private void checkTarget(final Container target) {
        if (this.target != target) {
            throw new AWTError(Messages.getString("swing.err.03")); //$NON-NLS-1$
        }
    }
View Full Code Here

TOP

Related Classes of java.awt.AWTError

Copyright © 2018 www.massapicom. 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.