Package org.gbcpainter.loaders.textures

Examples of org.gbcpainter.loaders.textures.TextureNotFoundException


    try {
      GraphicsEnv.getInstance().getTextureLoader().loadTexture( HEADER_TEXTURE, false );

    } catch ( Exception e ) {

      final TextureNotFoundException textureException = new TextureNotFoundException( e );
      new ErrorDialog( this.gameView, LanguageDictionary.ERROR_STRING, LanguageDictionary.ERROR_LOAD_HEADER, textureException, true );
      throw textureException;
    }

    this.header = new Label() {

      @Override
      public void paint( Graphics g ) {
        super.paint( g );
        if ( this.getHeight() != 0 && this.getWidth() != 0 ) {

          try {
            Image img = GraphicsEnv.getInstance().getTextureLoader().loadTexture( HEADER_TEXTURE, false );
            g.drawImage( img.getScaledInstance( - 1, this.getHeight(), Image.SCALE_SMOOTH ),
                         0,
                         0,
                         this.getWidth(),
                         this.getHeight(),
                         null );
          } catch ( Exception e ) {
            final TextureNotFoundException textureException = new TextureNotFoundException( e );
            new ErrorDialog( MainPC.this.gameView, LanguageDictionary.ERROR_STRING,
                           LanguageDictionary.ERROR_LOAD_HEADER, textureException, true );
          }
        }
      }
View Full Code Here


    try {
      GraphicsEnv.getInstance().getTextureLoader().loadTexture( HEADER_TEXTURE, false );

    } catch ( Exception e ) {

      final TextureNotFoundException textureException = new TextureNotFoundException( e );
      new ErrorDialog( this.gameView, LanguageDictionary.ERROR_STRING, LanguageDictionary.ERROR_LOAD_HEADER, textureException, true );
      throw textureException;
    }

    this.header = new Label() {

      @Override
      public void paint( Graphics g ) {
        try {
          Image img = GraphicsEnv.getInstance().getTextureLoader().loadTexture( HEADER_TEXTURE, false );/*NON-NLS*/
          g.drawImage( img.getScaledInstance( - 1, getHeight(), Image.SCALE_SMOOTH ), 0, 0, getWidth(), getHeight(), null );
        } catch ( Exception e ) {
          final TextureNotFoundException textureException = new TextureNotFoundException( e );
          new ErrorDialog( gameView, LanguageDictionary.ERROR_STRING, LanguageDictionary.ERROR_LOAD_HEADER, textureException, true );
        }
      }
    };

View Full Code Here

    for (Iterable<String> slotList : resources.values()) {
      for (String resource : slotList) {
        try {
          loader.loadTexture( resource, true );
        } catch ( Exception e ) {
          throw new TextureNotFoundException( e );
        }
      }
    }

    this.nextTexture = resources.get( this.actualSlot ).iterator();
View Full Code Here

    for (String resource : resources) {
      try {
        loader.loadTexture( resource, true );
      } catch ( Exception e ) {
        throw new TextureNotFoundException( e );
      }
    }

    this.nextTexture = this.textures.iterator();
    this.actualTexture = this.nextTexture.next();
View Full Code Here

    if ( texture == null ) {
      try {
        texture = loader.loadTexture( requestedTexture, true );
      } catch ( Exception e ) {
        throw new TextureNotFoundException( "Can't find texture " + requestedTexture, e );
      }
    }

    setDrawTexture( texture );
  }
View Full Code Here

        if ( ! loader.mustReload( resourceName, tryAcceleration ) ) {
          done = true;
        }
      } catch ( NoSuchElementException e ) {
        if ( ! tryAcceleration ) {
          throw new TextureNotFoundException( e );
        }
        tryAcceleration = false;
      }
    } while ( ! done );
  }
View Full Code Here

TOP

Related Classes of org.gbcpainter.loaders.textures.TextureNotFoundException

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.