Logger.getLogger(DrawTest.class.getName()).log(Level.SEVERE, null, ex);
}
}
SchemaEditorImpl editor = new SchemaEditorImpl();
SchemaModel schema = new SchemaModel();
String sample1 = "/open/dolphin/impl/scheam/resources/Sample-square.JPG";
String sample2 = "/open/dolphin/impl/scheam/resources/Sample-large.JPG";
String sample3 = "/open/dolphin/impl/scheam/resources/Sample-landscape.JPG";
String sample4 = "/open/dolphin/impl/scheam/resources/Sample-portrait.JPG";
InputStream in = getClass().getResourceAsStream(sample2);
byte[] buf = null;
try {
int n = in.available();
buf = new byte[n];
for(int i=0; i<n; i++) buf[i] = (byte) in.read();
} catch (IOException ex) {
}
schema.setIcon(new ImageIcon(buf));
ExtRefModel ref = new ExtRefModel();
ref.setContentType("image/jpeg");
ref.setTitle("Schema Image");
schema.setExtRef(ref);
schema.setFileName("Test");
ref.setHref("Test");
editor.addPropertyChangeListener(new PropertyChangeListener(){
public void propertyChange(PropertyChangeEvent evt) {
// System.out.println("oldValue = " + evt.getOldValue());