/** * Configure Drawing object to support copy and paste. */ private void initDrawing(Drawing d) { LinkedList<InputFormat> inputFormats = new LinkedList<InputFormat>(); LinkedList<OutputFormat> outputFormats = new LinkedList<OutputFormat>(); DOMStorableInputOutputFormat ioFormat = new DOMStorableInputOutputFormat( new PertFactory()); inputFormats.add(ioFormat); outputFormats.add(ioFormat); outputFormats.add(new ImageOutputFormat()); d.setInputFormats(inputFormats); d.setOutputFormats(outputFormats); }
/** * Creates a new Drawing for this view. */ protected Drawing createDrawing() { Drawing drawing = new ODGDrawing(); LinkedList<InputFormat> inputFormats = new LinkedList<InputFormat>(); inputFormats.add(new ODGInputFormat()); inputFormats.add(new ImageInputFormat(new SVGImageFigure())); inputFormats.add(new TextInputFormat(new SVGTextFigure())); drawing.setInputFormats(inputFormats); LinkedList<OutputFormat> outputFormats = new LinkedList<OutputFormat>(); outputFormats.add(new SVGOutputFormat()); outputFormats.add(new SVGZOutputFormat()); outputFormats.add(new ImageOutputFormat()); outputFormats.add(new ImageOutputFormat("JPG", "Joint Photographics Experts Group (JPEG)", "jpg", BufferedImage.TYPE_INT_RGB)); outputFormats.add(new ImageOutputFormat("BMP", "Windows Bitmap (BMP)", "bmp", BufferedImage.TYPE_BYTE_INDEXED)); outputFormats.add(new ImageMapOutputFormat()); drawing.setOutputFormats(outputFormats); return drawing; }
/** * Creates a new Drawing object which can be used with this * {@code SVGDrawingPanel}. */ public Drawing createDrawing() { Drawing drawing = new QuadTreeDrawing(); LinkedList<InputFormat> inputFormats = new LinkedList<InputFormat>(); inputFormats.add(new SVGZInputFormat()); inputFormats.add(new ImageInputFormat(new SVGImageFigure(), "PNG", "Portable Network Graphics (PNG)", "png", "image/png")); inputFormats.add(new ImageInputFormat(new SVGImageFigure(), "JPG", "Joint Photographics Experts Group (JPEG)", "jpg","image/jpg")); inputFormats.add(new ImageInputFormat(new SVGImageFigure(), "GIF", "Graphics Interchange Format (GIF)", "gif", "image/gif")); inputFormats.add(new TextInputFormat(new SVGTextFigure())); drawing.setInputFormats(inputFormats); LinkedList<OutputFormat> outputFormats = new LinkedList<OutputFormat>(); outputFormats.add(new SVGOutputFormat()); outputFormats.add(new SVGZOutputFormat()); outputFormats.add(new ImageOutputFormat()); outputFormats.add(new ImageOutputFormat("JPG", "Joint Photographics Experts Group (JPEG)", "jpg", BufferedImage.TYPE_INT_RGB)); outputFormats.add(new ImageOutputFormat("BMP", "Windows Bitmap (BMP)", "bmp", BufferedImage.TYPE_BYTE_INDEXED)); outputFormats.add(new ImageMapOutputFormat()); drawing.setOutputFormats(outputFormats); return drawing; }
/** * Configure Drawing object to support copy and paste. */ @SuppressWarnings("unchecked") private void initDrawing(Drawing d) { d.setInputFormats((java.util.List<InputFormat>) Collections.EMPTY_LIST); d.setOutputFormats((java.util.List<OutputFormat>) Collections.EMPTY_LIST); DOMStorableInputOutputFormat ioFormat = new DOMStorableInputOutputFormat( new NetFactory()); d.addInputFormat(ioFormat); d.addInputFormat(new ImageInputFormat(new ImageFigure())); d.addInputFormat(new TextInputFormat(new TextFigure())); d.addOutputFormat(ioFormat); d.addOutputFormat(new ImageOutputFormat()); }
/** * Configure Drawing object to support copy and paste. */ @SuppressWarnings("unchecked") private void initDrawing(Drawing d) { d.setInputFormats((java.util.List<InputFormat>) Collections.EMPTY_LIST); d.setOutputFormats((java.util.List<OutputFormat>) Collections.EMPTY_LIST); DOMStorableInputOutputFormat ioFormat = new DOMStorableInputOutputFormat( new DrawFigureFactory()); d.addInputFormat(ioFormat); d.addInputFormat(new ImageInputFormat(new ImageFigure())); d.addInputFormat(new TextInputFormat(new TextFigure())); d.addOutputFormat(ioFormat); d.addOutputFormat(new ImageOutputFormat()); }