364365366367368369370371372373374
return true; } private Sprite createSprite(int width, int height, boolean crop, TextureLoader textureLoader, BufferedImage image, String namer) { Texture texture; Point offset; if (crop) { offset = new Point();
18192021222324252627
return value instanceof Texture; } @Override protected void updateIcon(Object value) { Texture texture = (Texture) value; Icon textureIcon = getTextureIcon(texture); icon.setIcon(textureIcon); }
2627282930313233343536
icon.setIcon(textureIcon); } @Override protected void updateText(Object value) { Texture texture = (Texture) value; RenderedImage image = texture.image; label.setText(String.format(TEXTURE_NAME_FORMAT, image.getWidth(), image.getHeight())); }
17181920212223242526
} @Override protected void updateIcon(Object value) { Sprite sprite = (Sprite) value; Texture texture = sprite.texture; Icon textureIcon = getTextureIcon(texture); icon.setIcon(textureIcon); }
293031323334353637
if (!(value instanceof Texture)) { return; } Texture texture = (Texture) value; factory.setActiveTexture(texture); }
2930313233343536373839
setIcon(ICON_NAME, false); } @Override public void actionPerformed(ActionEvent e) { Texture texture = factory.getActiveTexture(); if (texture == null) { Dialogs.warning(parent, Messages.getString("RemoveTextureAction.NO_TEXTURE")); //$NON-NLS-1$
5758596061626364656667
List<Sprite> spritelist = new ArrayList<Sprite>(images.length); TextureLoader textureLoader = factory.getTextureLoader(); for (File each : images) { Texture texture = textureLoader.load(each); if (texture == null) { continue; }
8283848586878889909192
TextureLoader textureLoader = factory.getTextureLoader(); for (File each : images) { Point point = new Point(); Texture texture = textureLoader.loadCroped(each, point); if (texture == null) { continue; }
177178179180181182183184185186187
continue; } int offsetx = (Integer) offsxselected; int offsety = (Integer) offsyselected; Texture texture = (Texture) texselected; Sprite sptere = new Sprite(offsetx, offsety, spritename, texture); factory.addSprite(animation, sptere);