Package open.dolphin.infomodel

Examples of open.dolphin.infomodel.SchemaModel


       
        // 二重起動の解除
        //kartePane.getTextPane().setEditable(true);
        this.setEditable(true);
       
        SchemaModel newSchema = (SchemaModel)e.getNewValue();
        if (newSchema ==  null) {
            return;
        }
       
        schema = newSchema;
View Full Code Here


                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());
View Full Code Here

    protected Transferable createTransferable(JComponent c) {
        SchemaHolder source = (SchemaHolder) c;
        KartePane context = source.getKartePane();
        context.setDrragedStamp(new ComponentHolder[]{source});
        context.setDraggedCount(1);
        SchemaModel schema = source.getSchema();
        SchemaList list = new SchemaList();
        list.schemaList = new SchemaModel[]{schema};
        Transferable tr = new SchemaListTransferable(list);
        return tr;
    }
View Full Code Here

TOP

Related Classes of open.dolphin.infomodel.SchemaModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.