下面列出了java.awt.Image#UndefinedProperty() 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
/**
* Return a property of the image by name. Individual property names
* are defined by the various image formats. If a property is not
* defined for a particular image, then this method will return the
* UndefinedProperty object. If the properties for this image are
* not yet known, then this method will return null and the ImageObserver
* object will be notified later. The property name "comment" should
* be used to store an optional comment which can be presented to
* the user as a description of the image, its source, or its author.
*/
public Object getProperty(String name, ImageObserver observer) {
if (name == null) {
throw new NullPointerException("null property name is not allowed");
}
if (src != null) {
src.checkSecurity(null, false);
}
if (properties == null) {
addWatcher(observer, true);
if (properties == null) {
return null;
}
}
Object o = properties.get(name);
if (o == null) {
o = Image.UndefinedProperty;
}
return o;
}
/**
* Return a property of the image by name. Individual property names
* are defined by the various image formats. If a property is not
* defined for a particular image, then this method will return the
* UndefinedProperty object. If the properties for this image are
* not yet known, then this method will return null and the ImageObserver
* object will be notified later. The property name "comment" should
* be used to store an optional comment which can be presented to
* the user as a description of the image, its source, or its author.
*/
public Object getProperty(String name, ImageObserver observer) {
if (name == null) {
throw new NullPointerException("null property name is not allowed");
}
if (src != null) {
src.checkSecurity(null, false);
}
if (properties == null) {
addWatcher(observer, true);
if (properties == null) {
return null;
}
}
Object o = properties.get(name);
if (o == null) {
o = Image.UndefinedProperty;
}
return o;
}
/**
* Return a property of the image by name. Individual property names
* are defined by the various image formats. If a property is not
* defined for a particular image, then this method will return the
* UndefinedProperty object. If the properties for this image are
* not yet known, then this method will return null and the ImageObserver
* object will be notified later. The property name "comment" should
* be used to store an optional comment which can be presented to
* the user as a description of the image, its source, or its author.
*/
public Object getProperty(String name, ImageObserver observer) {
if (name == null) {
throw new NullPointerException("null property name is not allowed");
}
if (src != null) {
src.checkSecurity(null, false);
}
if (properties == null) {
addWatcher(observer, true);
if (properties == null) {
return null;
}
}
Object o = properties.get(name);
if (o == null) {
o = Image.UndefinedProperty;
}
return o;
}
/**
* Return a property of the image by name. Individual property names
* are defined by the various image formats. If a property is not
* defined for a particular image, then this method will return the
* UndefinedProperty object. If the properties for this image are
* not yet known, then this method will return null and the ImageObserver
* object will be notified later. The property name "comment" should
* be used to store an optional comment which can be presented to
* the user as a description of the image, its source, or its author.
*/
public Object getProperty(String name, ImageObserver observer) {
if (name == null) {
throw new NullPointerException("null property name is not allowed");
}
if (src != null) {
src.checkSecurity(null, false);
}
if (properties == null) {
addWatcher(observer, true);
if (properties == null) {
return null;
}
}
Object o = properties.get(name);
if (o == null) {
o = Image.UndefinedProperty;
}
return o;
}
/**
* Return a property of the image by name. Individual property names
* are defined by the various image formats. If a property is not
* defined for a particular image, then this method will return the
* UndefinedProperty object. If the properties for this image are
* not yet known, then this method will return null and the ImageObserver
* object will be notified later. The property name "comment" should
* be used to store an optional comment which can be presented to
* the user as a description of the image, its source, or its author.
*/
public Object getProperty(String name, ImageObserver observer) {
if (name == null) {
throw new NullPointerException("null property name is not allowed");
}
if (src != null) {
src.checkSecurity(null, false);
}
if (properties == null) {
addWatcher(observer, true);
if (properties == null) {
return null;
}
}
Object o = properties.get(name);
if (o == null) {
o = Image.UndefinedProperty;
}
return o;
}
/**
* Return a property of the image by name. Individual property names
* are defined by the various image formats. If a property is not
* defined for a particular image, then this method will return the
* UndefinedProperty object. If the properties for this image are
* not yet known, then this method will return null and the ImageObserver
* object will be notified later. The property name "comment" should
* be used to store an optional comment which can be presented to
* the user as a description of the image, its source, or its author.
*/
public Object getProperty(String name, ImageObserver observer) {
if (name == null) {
throw new NullPointerException("null property name is not allowed");
}
if (src != null) {
src.checkSecurity(null, false);
}
if (properties == null) {
addWatcher(observer, true);
if (properties == null) {
return null;
}
}
Object o = properties.get(name);
if (o == null) {
o = Image.UndefinedProperty;
}
return o;
}
/**
* Return a property of the image by name. Individual property names
* are defined by the various image formats. If a property is not
* defined for a particular image, then this method will return the
* UndefinedProperty object. If the properties for this image are
* not yet known, then this method will return null and the ImageObserver
* object will be notified later. The property name "comment" should
* be used to store an optional comment which can be presented to
* the user as a description of the image, its source, or its author.
*/
public Object getProperty(String name, ImageObserver observer) {
if (name == null) {
throw new NullPointerException("null property name is not allowed");
}
if (src != null) {
src.checkSecurity(null, false);
}
if (properties == null) {
addWatcher(observer, true);
if (properties == null) {
return null;
}
}
Object o = properties.get(name);
if (o == null) {
o = Image.UndefinedProperty;
}
return o;
}
/**
* Return a property of the image by name. Individual property names
* are defined by the various image formats. If a property is not
* defined for a particular image, then this method will return the
* UndefinedProperty object. If the properties for this image are
* not yet known, then this method will return null and the ImageObserver
* object will be notified later. The property name "comment" should
* be used to store an optional comment which can be presented to
* the user as a description of the image, its source, or its author.
*/
public Object getProperty(String name, ImageObserver observer) {
if (name == null) {
throw new NullPointerException("null property name is not allowed");
}
if (src != null) {
src.checkSecurity(null, false);
}
if (properties == null) {
addWatcher(observer, true);
if (properties == null) {
return null;
}
}
Object o = properties.get(name);
if (o == null) {
o = Image.UndefinedProperty;
}
return o;
}
/**
* Return a property of the image by name. Individual property names
* are defined by the various image formats. If a property is not
* defined for a particular image, then this method will return the
* UndefinedProperty object. If the properties for this image are
* not yet known, then this method will return null and the ImageObserver
* object will be notified later. The property name "comment" should
* be used to store an optional comment which can be presented to
* the user as a description of the image, its source, or its author.
*/
public Object getProperty(String name, ImageObserver observer) {
if (name == null) {
throw new NullPointerException("null property name is not allowed");
}
if (src != null) {
src.checkSecurity(null, false);
}
if (properties == null) {
addWatcher(observer, true);
if (properties == null) {
return null;
}
}
Object o = properties.get(name);
if (o == null) {
o = Image.UndefinedProperty;
}
return o;
}
/**
* Return a property of the image by name. Individual property names
* are defined by the various image formats. If a property is not
* defined for a particular image, then this method will return the
* UndefinedProperty object. If the properties for this image are
* not yet known, then this method will return null and the ImageObserver
* object will be notified later. The property name "comment" should
* be used to store an optional comment which can be presented to
* the user as a description of the image, its source, or its author.
*/
public Object getProperty(String name, ImageObserver observer) {
if (name == null) {
throw new NullPointerException("null property name is not allowed");
}
if (src != null) {
src.checkSecurity(null, false);
}
if (properties == null) {
addWatcher(observer, true);
if (properties == null) {
return null;
}
}
Object o = properties.get(name);
if (o == null) {
o = Image.UndefinedProperty;
}
return o;
}
/**
* Return a property of the image by name. Individual property names
* are defined by the various image formats. If a property is not
* defined for a particular image, then this method will return the
* UndefinedProperty object. If the properties for this image are
* not yet known, then this method will return null and the ImageObserver
* object will be notified later. The property name "comment" should
* be used to store an optional comment which can be presented to
* the user as a description of the image, its source, or its author.
*/
public Object getProperty(String name, ImageObserver observer) {
if (name == null) {
throw new NullPointerException("null property name is not allowed");
}
if (src != null) {
src.checkSecurity(null, false);
}
if (properties == null) {
addWatcher(observer, true);
if (properties == null) {
return null;
}
}
Object o = properties.get(name);
if (o == null) {
o = Image.UndefinedProperty;
}
return o;
}
/**
* Return a property of the image by name. Individual property names
* are defined by the various image formats. If a property is not
* defined for a particular image, then this method will return the
* UndefinedProperty object. If the properties for this image are
* not yet known, then this method will return null and the ImageObserver
* object will be notified later. The property name "comment" should
* be used to store an optional comment which can be presented to
* the user as a description of the image, its source, or its author.
*/
public Object getProperty(String name, ImageObserver observer) {
if (name == null) {
throw new NullPointerException("null property name is not allowed");
}
if (src != null) {
src.checkSecurity(null, false);
}
if (properties == null) {
addWatcher(observer, true);
if (properties == null) {
return null;
}
}
Object o = properties.get(name);
if (o == null) {
o = Image.UndefinedProperty;
}
return o;
}
/**
* Return a property of the image by name. Individual property names
* are defined by the various image formats. If a property is not
* defined for a particular image, then this method will return the
* UndefinedProperty object. If the properties for this image are
* not yet known, then this method will return null and the ImageObserver
* object will be notified later. The property name "comment" should
* be used to store an optional comment which can be presented to
* the user as a description of the image, its source, or its author.
*/
public Object getProperty(String name, ImageObserver observer) {
if (name == null) {
throw new NullPointerException("null property name is not allowed");
}
if (src != null) {
src.checkSecurity(null, false);
}
if (properties == null) {
addWatcher(observer, true);
if (properties == null) {
return null;
}
}
Object o = properties.get(name);
if (o == null) {
o = Image.UndefinedProperty;
}
return o;
}
private static void validate(final BufferedImage bi, final int expected) {
final String[] names = bi.getPropertyNames();
if (names.length != expected) {
throw new RuntimeException("Wrong number of names");
}
for (final String name : names) {
final Object property = bi.getProperty(name);
if (property == Image.UndefinedProperty || property == null) {
throw new RuntimeException("Unexpected property");
}
}
}
private static void validate(final BufferedImage bi, final int expected) {
final String[] names = bi.getPropertyNames();
if (names.length != expected) {
throw new RuntimeException("Wrong number of names");
}
for (final String name : names) {
final Object property = bi.getProperty(name);
if (property == Image.UndefinedProperty || property == null) {
throw new RuntimeException("Unexpected property");
}
}
}
private static void validate(final BufferedImage bi, final int expected) {
final String[] names = bi.getPropertyNames();
if (names.length != expected) {
throw new RuntimeException("Wrong number of names");
}
for (final String name : names) {
final Object property = bi.getProperty(name);
if (property == Image.UndefinedProperty || property == null) {
throw new RuntimeException("Unexpected property");
}
}
}
private static void validate(final BufferedImage bi, final int expected) {
final String[] names = bi.getPropertyNames();
if (names.length != expected) {
throw new RuntimeException("Wrong number of names");
}
for (final String name : names) {
final Object property = bi.getProperty(name);
if (property == Image.UndefinedProperty || property == null) {
throw new RuntimeException("Unexpected property");
}
}
}
private static void validate(final BufferedImage bi, final int expected) {
final String[] names = bi.getPropertyNames();
if (names.length != expected) {
throw new RuntimeException("Wrong number of names");
}
for (final String name : names) {
final Object property = bi.getProperty(name);
if (property == Image.UndefinedProperty || property == null) {
throw new RuntimeException("Unexpected property");
}
}
}
@Override
public Object getProperty(String name, ImageObserver observer) {
updateInfo(observer, ImageObserver.PROPERTIES);
return Image.UndefinedProperty;
}
@Override public Object getProperty(String name) {return Image.UndefinedProperty;}