87 * @see ImageConsumer#setDimensions
88 */
89 public void setDimensions(int width, int height) {
90 consumer.setDimensions(width, height);
91 }
92
93 /**
94 * Passes the properties from the source object along after adding a
95 * property indicating the stream of filters it has been run through.
96 * <p>
97 * Note: This method is intended to be called by the ImageProducer
98 * of the Image whose pixels are being filtered. Developers using
99 * this class to filter pixels from an image should avoid calling
100 * this method directly since that operation could interfere
101 * with the filtering operation.
102 *
103 * @param props the properties from the source object
104 * @exception NullPointerException if <code>props</code> is null
105 */
106 public void setProperties(Hashtable<?,?> props) {
107 Hashtable<Object,Object> p = (Hashtable<Object,Object>)props.clone();
108 Object o = p.get("filters");
109 if (o == null) {
110 p.put("filters", toString());
111 } else if (o instanceof String) {
112 p.put("filters", ((String) o)+toString());
113 }
114 consumer.setProperties(p);
115 }
116
117 /**
118 * Filter the information provided in the setColorModel method
119 * of the ImageConsumer interface.
120 * <p>
121 * Note: This method is intended to be called by the ImageProducer
122 * of the Image whose pixels are being filtered. Developers using
123 * this class to filter pixels from an image should avoid calling
124 * this method directly since that operation could interfere
125 * with the filtering operation.
126 * @see ImageConsumer#setColorModel
|
87 * @see ImageConsumer#setDimensions
88 */
89 public void setDimensions(int width, int height) {
90 consumer.setDimensions(width, height);
91 }
92
93 /**
94 * Passes the properties from the source object along after adding a
95 * property indicating the stream of filters it has been run through.
96 * <p>
97 * Note: This method is intended to be called by the ImageProducer
98 * of the Image whose pixels are being filtered. Developers using
99 * this class to filter pixels from an image should avoid calling
100 * this method directly since that operation could interfere
101 * with the filtering operation.
102 *
103 * @param props the properties from the source object
104 * @exception NullPointerException if <code>props</code> is null
105 */
106 public void setProperties(Hashtable<?,?> props) {
107 @SuppressWarnings("unchecked")
108 Hashtable<Object,Object> p = (Hashtable<Object,Object>)props.clone();
109 Object o = p.get("filters");
110 if (o == null) {
111 p.put("filters", toString());
112 } else if (o instanceof String) {
113 p.put("filters", ((String) o)+toString());
114 }
115 consumer.setProperties(p);
116 }
117
118 /**
119 * Filter the information provided in the setColorModel method
120 * of the ImageConsumer interface.
121 * <p>
122 * Note: This method is intended to be called by the ImageProducer
123 * of the Image whose pixels are being filtered. Developers using
124 * this class to filter pixels from an image should avoid calling
125 * this method directly since that operation could interfere
126 * with the filtering operation.
127 * @see ImageConsumer#setColorModel
|