org.jdesktop.swingx.painter.ImagePainterBeanInfo Maven / Gradle / Ivy
package org.jdesktop.swingx.painter;
import org.jdesktop.beans.BeanInfoSupport;
import org.jdesktop.beans.editors.EnumPropertyEditor;
import org.jdesktop.beans.editors.ImageEditor;
/**
* BeanInfo of ImagePainter.
*
* @author joshy, Jan Stola
*/
public class ImagePainterBeanInfo extends BeanInfoSupport {
/** Creates a new instance of ImagePainterBeanInfo */
public ImagePainterBeanInfo() {
super(ImagePainter.class);
}
@Override
protected void initialize() {
setPropertyEditor(ImageEditor.class,"image");
setPropertyEditor(ScaleTypePropertyEditor.class, "scaleType");
setPreferred(true, "image", "scaleType", "scaleToFit");
}
public static final class ScaleTypePropertyEditor extends EnumPropertyEditor {
public ScaleTypePropertyEditor() {
super(ImagePainter.ScaleType.class);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy