images plugin now part of a CE
[fedora-idea.git] / images / src / org / intellij / images / editor / ImageDocument.java
blob3c39a8220a03d76a78339ef3b9beab21882a144c
1 /*
2 * Copyright 2004-2005 Alexey Efimov
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package org.intellij.images.editor;
18 import javax.swing.event.ChangeListener;
19 import java.awt.*;
20 import java.awt.image.BufferedImage;
22 /**
23 * Image document to show or edit in {@link ImageEditor}.
25 * @author <a href="mailto:aefimov.box@gmail.com">Alexey Efimov</a>
27 public interface ImageDocument {
28 /**
29 * Return image for rendering
31 * @return Image renderer
33 Image getRenderer();
35 /**
36 * Return current image.
38 * @return Return current buffered image
40 BufferedImage getValue();
42 /**
43 * Set image value
45 * @param image Value
47 void setValue(BufferedImage image);
49 /**
50 * Return image format.
52 * @return Format name
54 String getFormat();
56 /**
57 * Set image format.
59 * @param format Format from ImageIO (GIF, PNG, JPEG etc)
61 void setFormat(String format);
63 void addChangeListener(ChangeListener listener);
65 void removeChangeListener(ChangeListener listener);