Package model

Examples of model.DrawModel


        AdaptedStandardStorageFormat storef = new AdaptedStandardStorageFormat();
        try {
          for (int i = 0; i < drawingViews.length; i++) {
            sw = new StringWriter();
            storef.store(sw, drawingViews[i].getDrawing());
            drawings.add(new DrawModel(drawingViews[i].getDrawing()
                .getId(), drawingViews[i].getDrawing()
                .getTitle(), sw.toString()));
            sw.close();
          }
          fileModel.setDraws(drawings);
View Full Code Here


        if (viewNameArray.length > 0) {
            //begin ��ȡͼԪ��Ϣ�ļ�
            try {
                drawingArray = new Drawing[viewNameArray.length];
                for (int i = 0; i < viewNameArray.length; i++) {
                    DrawModel draw = dataSrc.getDrawModel(viewNameArray[i]);
                    InputStream input = new ByteArrayInputStream(draw.getContent().getBytes());
//                    InputStream input = new StringBufferInputStream(draw.getContent());
                    drawingArray[i] = reader.restore(input);
                    drawingArray[i].setId(draw.getId());
                }

            } catch (Exception exception) {
                errorInfo = "Exception occurs when read project graphic file.\n" + exception;
                exception.printStackTrace();
View Full Code Here

            AdaptedStandardStorageFormat storef =  new AdaptedStandardStorageFormat();
            try{
              for(int i = 0 ;i<drawingViews.length;i++){
                sw = new StringWriter();
                storef.store(sw, drawingViews[i].getDrawing());
                drawings.add(new DrawModel(drawingViews[i].getDrawing().getId(),drawingViews[i].getDrawing().getTitle(),sw.toString()));
                sw.close();
              }
              fileModel.setDraws(drawings);
            }catch(Exception exec){
              exec.printStackTrace();
View Full Code Here

        if (viewNameArray.length > 0) {
            //begin ��ȡͼԪ��Ϣ�ļ�
            try {
                drawingArray = new Drawing[viewNameArray.length];
                for (int i = 0; i < viewNameArray.length; i++) {
                    DrawModel draw = dataSrc.getDrawModel(viewNameArray[i]);
                    InputStream input = new StringBufferInputStream(draw.getContent());
                    drawingArray[i] = reader.restore(input);
                    drawingArray[i].setId(draw.getId());
                }

            } catch (Exception exception) {
                errorInfo = "Exception occurs when read project graphic file.\n" + exception;
                return false;
View Full Code Here

TOP

Related Classes of model.DrawModel

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.