コード例 #1
0
  protected Icon[] makeIcons(String location, int count, boolean horizontal) {
    Icon[] icons = new Icon[count];

    BufferedImage[] images = Images.split(createImage(location), count, horizontal);

    for (int i = 0; i < count; i++) {
      icons[i] = new IconUIResource(new ImageIcon(images[i]));
    }
    return icons;
  }
コード例 #2
0
ファイル: ResourceIcon.java プロジェクト: jasonchaffee/VUE
  private synchronized void loadImage(Object imageData) {
    if (DEBUG.IMAGE) out("loadImage " + imageData);

    // test of synchronous loading:
    // out("***GOT IMAGE " + Images.getImage(imageData));

    // TODO: refactor ResourceIcon to use the new ImageRef --
    // will be much simpler.

    if (Images.getImage(imageData, this) == null) {
      // will make callback to gotImage when we have it
      isLoading = true;
      showLoadingStatus();
    } else {
      // gotImage has already been called
      isLoading = false;
    }
  }
コード例 #3
0
ファイル: TitleScreen.java プロジェクト: zadjii/demigods
 public void init(GameContainer arg0, StateBasedGame arg1) throws SlickException {
   Images.init();
   Audio.init();
 }