MemoryImageSource.java, [...]: New versions from classpath.
2003-07-14 Michael Koch <konqueror@gmx.de> * java/awt/image/MemoryImageSource.java, java/beans/PropertyEditorManager.java, javax/naming/CompoundName.java, javax/naming/spi/NamingManager.java, javax/swing/AbstractButton.java, javax/swing/ButtonModel.java, javax/swing/SwingUtilities.java, javax/swing/UIManager.java, javax/swing/colorchooser/DefaultColorSelectionModel.java, javax/swing/event/AncestorEvent.java, javax/swing/event/InternalFrameEvent.java, java/util/zip/ZipFile.java: New versions from classpath. From-SVN: r69321
This commit is contained in:
parent
6e98504002
commit
6a71677713
13 changed files with 1095 additions and 1077 deletions
|
@ -74,7 +74,7 @@ public class MemoryImageSource implements ImageProducer
|
|||
this.props = props;
|
||||
int max = (( scansize > width ) ? scansize : width );
|
||||
pixelb = new byte[ max * height ];
|
||||
System.arraycopy( pix, 0, pixelb, 0, max );
|
||||
System.arraycopy( pix, 0, pixelb, 0, max * height );
|
||||
}
|
||||
/**
|
||||
Constructs an ImageProducer from memory
|
||||
|
@ -100,7 +100,7 @@ public class MemoryImageSource implements ImageProducer
|
|||
this.props = props;
|
||||
int max = (( scansize > width ) ? scansize : width );
|
||||
pixeli = new int[ max * height ];
|
||||
System.arraycopy( pix, 0, pixeli, 0, max );
|
||||
System.arraycopy( pix, 0, pixeli, 0, max * height );
|
||||
}
|
||||
/**
|
||||
Constructs an ImageProducer from memory using the default RGB ColorModel
|
||||
|
@ -226,6 +226,7 @@ public class MemoryImageSource implements ImageProducer
|
|||
if( props != null ) {
|
||||
ic.setProperties( props );
|
||||
}
|
||||
ic.setDimensions(width, height);
|
||||
if( pixeli != null ) {
|
||||
ic.setPixels( 0, 0, width, height, cm, pixeli, offset, scansize );
|
||||
} else {
|
||||
|
|
|
@ -140,9 +140,13 @@ public class PropertyEditorManager
|
|||
return (PropertyEditor)found.newInstance();
|
||||
}
|
||||
|
||||
ClassLoader contextClassLoader
|
||||
= Thread.currentThread().getContextClassLoader();
|
||||
|
||||
try
|
||||
{
|
||||
found = Class.forName(editedClass.getName()+"Editor");
|
||||
found = Class.forName(editedClass.getName()+"Editor", true,
|
||||
contextClassLoader);
|
||||
registerEditor(editedClass,found);
|
||||
return (PropertyEditor)found.newInstance();
|
||||
}
|
||||
|
@ -150,14 +154,18 @@ public class PropertyEditorManager
|
|||
{
|
||||
}
|
||||
|
||||
String appendName = "." + ClassHelper.getTruncatedClassName(editedClass) + "Editor";
|
||||
String appendName
|
||||
= "."
|
||||
+ ClassHelper.getTruncatedClassName(editedClass)
|
||||
+ "Editor";
|
||||
synchronized(editorSearchPath)
|
||||
{
|
||||
for(int i=0;i<editorSearchPath.length;i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
found = Class.forName(editorSearchPath[i] + appendName);
|
||||
found = Class.forName(editorSearchPath[i] + appendName,
|
||||
true, contextClassLoader);
|
||||
registerEditor(editedClass,found);
|
||||
return (PropertyEditor)found.newInstance();
|
||||
}
|
||||
|
|
|
@ -308,7 +308,7 @@ public class ZipFile implements ZipConstants
|
|||
*/
|
||||
protected void finalize() throws IOException
|
||||
{
|
||||
if (!closed) close();
|
||||
if (!closed && raf != null) close();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue