Package net.sf.jiga.xtended

Examples of net.sf.jiga.xtended.JXAException


     * @see #begin()
     */
    public void end() {
        _isBlock.set(_isBlock.get() - 1);
        if (_isBlock.get() < 0) {
            throw new JXAException(JXAException.LEVEL.SYSTEM, "end threadblock which has not begun; it maybe another thread that is using it.");
        }
    }
View Full Code Here


         * {@linkplain #beginEdit(boolean)} and {@linkplain #endEdit(boolean)}
         * call.
         */
        public BufferedImage getPicture(Component obs, String key) {
                if (!isEdit(key, false)) {
                        throw new JXAException("no edit-paint is current or another edit-paint is current on another Thread " + (lock.threadEdit));
                }
                try {
                        waitForPicture(key);
                        Sprite sprite;
                        if (collection.containsKey(key)) {
View Full Code Here

         * {@linkplain #beginEdit(boolean)} and {@linkplain #endEdit(boolean)}
         * call.
         */
        public Map<String, Serializable> getPictureStore(String key) {
                if (!isEdit(key, false)) {
                        throw new JXAException("no edit-paint is current or another edit-paint is current on another Thread " + (lock.threadEdit));
                }
                return collection.get(key);
        }
View Full Code Here

         * {@linkplain #beginEdit(boolean)} and {@linkplain #endEdit(boolean)}
         * call.
         */
        public Map<String, Serializable> getThumbnailPictureStore(String key) {
                if (!isEdit(key, true)) {
                        throw new JXAException("no edit-paint is current or another edit-paint is current on another Thread " + (tbLock.threadEdit));
                }
                return tbCollection.get(key);
        }
View Full Code Here

         * {@linkplain #beginEdit(boolean)} and {@linkplain #endEdit(boolean)}
         * call.
         */
        public Sprite getCollectionSprite(String key, boolean thumbnail) {
                if (!isEdit(key, thumbnail)) {
                        throw new JXAException("no edit-paint is current or another edit-paint is current on another Thread " + (thumbnail ? tbLock.threadEdit : lock.threadEdit));
                }
                Sprite picture;
                if (hasPicture(key, thumbnail)) {
                        picture = thumbnail ? (Sprite) tbCollection.get(key).get(ATTRIBUTE_SPRITE) : (Sprite) collection.get(key).get(ATTRIBUTE_SPRITE);
                } else {
View Full Code Here

                if (!env.silent) {
                    String errors = "";
                    for (String id : env.getErroredFiles()) {
                        errors += id + " > " + env.getEnvSourceFile(id) + File.pathSeparator + " ";
                    }
                    throw new JXAException(JXAException.LEVEL.SYSTEM, (libpath ? "Native libraries" : "Jar resources") + " environment loading process had one or more errors." + Console.newLine + "Set jxa.debugSys=true jxa.debugECL=true to see more info. " + Console.newLine + errors);
                }
            } else if (libpath) {
                synchronized (extsMap) {
                    ClassLoader cL = _switchToClassLoader(env.getEnvClassLoader());
                    for (String id : extsMap.keySet()) {
                        if (!((Map<URL, Boolean>) extsMap.get(id)).values().iterator().next()) {
                            continue;
                        }
                        try {
                            if (_debugSys) {
                                System.out.print("System.loadLibrary " + id);
                            }
                            System.loadLibrary(id);
                            if (_debugSys) {
                                System.out.println(" OK");
                            }
                        } catch (Throwable e) {
                            if (_debugSys) {
                                System.out.println(" FAILED " + e.getMessage());
                            }
                            String fullPath = env.getEnvInstalledFile(id).getAbsolutePath();
                            if (_debugSys) {
                                System.out.print("System.load library " + id + " from " + fullPath);
                            }
                            try {
                                System.load(fullPath);
                                if (_debugSys) {
                                    System.out.println(" OK");
                                }
                            } catch (Throwable ex) {
                                if (_debugSys) {
                                    System.out.println(" FAILED " + ex.getMessage());
                                }
                                if (!env.silent) {
                                    throw new JXAException(e.getLocalizedMessage(), ex);
                                }
                            }
                        }
                    }
                    _switchToClassLoader(cL);
View Full Code Here

    private static ExtensionsClassLoader _INSTANCE;
    private ClassLoader ECL;

    public static ExtensionsClassLoader getInstance() {
        if (!isResourceLoaded()) {
            throw new JXAException(JXAException.LEVEL.SYSTEM, "classloader instance not loaded yet !! ECL INSTANCE is not ready. !!");
        }
        return _INSTANCE;
    }
View Full Code Here

     * @discuss seems like Mac OS JDK doesn'y store static field properly on
     * certain circumstances (booting runtime)
     */
    public static void _load(final JXAenvUtils env) {
        if (isResourceLoaded()) {
            throw new JXAException(JXAException.LEVEL.SYSTEM, "trying to change environment classloader, but it was already loaded");
        }
        _INSTANCE = new ExtensionsClassLoader(env);
        env._switchToClassLoader(_INSTANCE.ECL);
        AccessController.doPrivileged(new PrivilegedAction() {
            public Object run() {
View Full Code Here

                        this.base = (url == null) ? null : url.toURI();
                } else {
                        this.base = new File(filename).toURI();
                }
                if (base == null) {
                        throw new JXAException(filename + " is not found by current context ClassLoader");
                }
                this.load = load;
                setSize(size);
                innerResource = rsrcMode;
                diskCached = true;
View Full Code Here

                if (isDebugEnabled()) {
                        System.out.println("loading " + file);
                }
                this.base = file.toURI();
                if (base == null) {
                        throw new JXAException(file.getAbsolutePath() + " was not found");
                }
                this.load = load;
                setSize(size);
                innerResource = false;
                diskCached = true;
View Full Code Here

TOP

Related Classes of net.sf.jiga.xtended.JXAException

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.