... newer stories
Freitag, 2. Januar 2009
Eclipse Plugin für JavaFX
mattki, 00:17h
Wie lautet die Adresse der Update Site für das JavaFX-Eclipse-Plugin?
http://download.java.net/general/openjfx/plugins/eclipse/site.xml
http://download.java.net/general/openjfx/plugins/eclipse/site.xml
... link (0 Kommentare) ... comment
Mittwoch, 10. Dezember 2008
Decompiler für Eclipse
mattki, 10:04h
Wo findet man einen guten Java Decompiler für die Eclipse IDE?
http://sourceforge.net/projects/jadclipse/
http://sourceforge.net/projects/jadclipse/
... link (0 Kommentare) ... comment
Freitag, 12. September 2008
Aus Icon wird Image
mattki, 20:02h
Diese Methode macht aus einem javax.swing.Icon ein java.awt.Image Objekt:
public Image iconToImage(Icon icon) {
if (icon instanceof ImageIcon) {
return ((ImageIcon)icon).getImage();
}
else {
int w = icon.getIconWidth();
int h = icon.getIconHeight();
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice gd = ge.getDefaultScreenDevice();
GraphicsConfiguration gc = gd.getDefaultConfiguration();
BufferedImage image = gc.createCompatibleImage(w, h);
Graphics2D g = image.createGraphics();
icon.paintIcon(null, g, 0, 0);
g.dispose();
return image;
}
}
public Image iconToImage(Icon icon) {
if (icon instanceof ImageIcon) {
return ((ImageIcon)icon).getImage();
}
else {
int w = icon.getIconWidth();
int h = icon.getIconHeight();
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice gd = ge.getDefaultScreenDevice();
GraphicsConfiguration gc = gd.getDefaultConfiguration();
BufferedImage image = gc.createCompatibleImage(w, h);
Graphics2D g = image.createGraphics();
icon.paintIcon(null, g, 0, 0);
g.dispose();
return image;
}
}
... link (0 Kommentare) ... comment
... older stories