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
;
20 import java
.awt
.image
.BufferedImage
;
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
{
29 * Return image for rendering
31 * @return Image renderer
36 * Return current image.
38 * @return Return current buffered image
40 BufferedImage
getValue();
47 void setValue(BufferedImage image
);
50 * Return 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
);