Package net.sf.jiga.xtended

Examples of net.sf.jiga.xtended.JXAException


     * @param strMetadata stream metadata, that can be obtained from the
     * ImageReader or let it null. Default IIOM. is used in that case.
     */
    public void writeToOutput(IIOMetadata imgMetadata, IIOMetadata strMetadata, ImageWriter w, ImageWriteParam iwp, RenderedImage ndata) throws IOException, InterruptedException {
        if (!writeBlock.isOn()) {
            throw new JXAException(JXAException.LEVEL.SYSTEM, "not in write code block, use prepareWrite() before");
        }
        /**
         * untiled picture
         */
        IIOImage iioimage = new IIOImage((RenderedImage) ndata, null, imgMetadata);
View Full Code Here


     * @param isize input and output size (unmutable size)
     * @param imageIndex index of the image to read in the input stream
     */
    public void writeToOutput(Dimension isize, ImageWriter w, ImageWriteParam iwp, ImageReader r, int _type, int imageIndex, Object baseTransform) throws IOException, InterruptedException {
        if (!writeBlock.isOn()) {
            throw new JXAException(JXAException.LEVEL.SYSTEM, "not in write code block, use prepareWrite() before");
        }
        IIOMetadata metadata = r.getImageMetadata(0);
        metadata = metadata instanceof IIOMetadata ? _getIIOMforImageType(w, metadata, _getITS(_type), iwp) : _getIIOMforDefaultImage(w, _getITS(_type), iwp);
        RenderedImage dataDst;
        BufferedImage i;
View Full Code Here

                found = true;
                break;
            }
        }
        if (!found) {
            throw new JXAException("incompatible mime type specified " + mime + " for writer " + w.toString());
        }
        iwp.setDestinationType(_getITS(bufferedType));
        if (iwp.canWriteTiles()) {
            /*
             * if (_WRITE_TILES_DIMENSION.width < srcDim.width ||
View Full Code Here

    /**
     *
     */
    public void bindTex(SpriteGLHandler spgl) {
        if (GLHandler._GLisTiledTexture(spgl.getTexHash())) {
            throw new JXAException(JXAException.LEVEL.SYSTEM, "This Texture " + spgl + "is tiled in " + spgl.sTex.getTextureTilesCount(spgl.getTexHash()));
        }
        int spLogoName = GLHandler.sTex.getTextureName(spgl.getTexHash()).get(spgl.getTexHash());
        GL11.glBindTexture(Sf3Texture._EXTtex, spLogoName);
        bindings.begin();
        Util.checkGLError();
View Full Code Here

     * default data
     */
    public ReadAndSaveSettings(File dataFile, DATA data, URL input) {
        this(dataFile, data);
        if (input == null) {
            notify(new JXAException(JXAException.LEVEL.APP, "null input"), new Date(), saving | done);
        } else {
            try {
                BufferedInputStream bis = new BufferedInputStream(input.openStream());
                RandomAccessFile raf = new RandomAccessFile(this.dataFile, "rw");
                raf.setLength(bis.available());
View Full Code Here

     * the cache of the loaded sound files
     */
    public final static SortedMap<String, Map<String, Serializable>> _ALCache = Collections.synchronizedSortedMap(_ALBackBuffer);

    private static JXAException _getALNoRsrcEx(String fileRsrc) {
        return new JXAException(JXAException.LEVEL.APP, "No such buffer has been loaded before, cannot create openAL source : " + fileRsrc);
    }
View Full Code Here

                    }
                }
            }
        } catch (Exception ex) {
            loaded = false;
            throw new JXAException(ex);
        } finally { /* run even after a thrown exception !!*/
            fileRsrc = filename;
            if (loaded) {
                switchState(SND_STATE_BIT, SND_STATE_STOPPED);
                if (JXAenvUtils._debug) {
View Full Code Here

                            } else {
                                break;
                            }
                        }
                    } catch (Exception ex) {
                        throw new JXAException(ex);
                    }
                }
            }, "T-loop-mp3");
            t_mp3.setPriority(Thread.MAX_PRIORITY);
            t_mp3.start();
View Full Code Here

        }
        if ((soundState & bits._getMask(SND_INTERFACE_BIT) & SND_INTERFACE_OPENAL) != 0) {
            try {
                loadALBuffer();
            } catch (OpenALException ex) {
                throw new JXAException(ex);
            }
        }
        if (isRepeatEnabled()) {
            loop();
        } else {
            if (JXAenvUtils._debug) {
                System.out.println(toString() + " playback");
            }
            final Thread tmute = getMuteThread();
            if ((soundState & bits._getMask(SND_INTERFACE_BIT) & SND_INTERFACE_JLAYER) != 0) {
                Thread t_mp3 = new Thread(soundTG, new Runnable() {
                                    @Override
                    public void run() {
                        try {
                            if (player instanceof Player) {
                                if (JXAenvUtils._debug) {
                                    System.out.println(toString() + " mp3 playback");
                                }
                                switchState(SND_STATE_BIT, SND_STATE_PLAYING);
                                tmute.start();
                                if (!isMute()) {
                                    player.play();
                                    stop();
                                }
                            }
                        } catch (JavaLayerException ex) {
                            throw new JXAException(ex);
                        }
                    }
                }, "T-play-mp3");
                t_mp3.setPriority(Thread.MAX_PRIORITY);
                t_mp3.start();
View Full Code Here

        return ticktime;
    }

    public void setTickTime(long delay) {
        if (delay < 0) {
            throw new JXAException("no negative value please");
        }
        ticktime = delay;
    }
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.