~josejuan-sanchez/+junk/original-jhv-experimental-version

« back to all changes in this revision

Viewing changes to src/viewmodel/src/org/helioviewer/viewmodel/view/RegionView.java

  • Committer: José Juan Sánchez Hernández
  • Date: 2013-02-05 13:32:08 UTC
  • Revision ID: josejuan.sanchez@gmail.com-20130205133208-dfz1sh1uge5pjkny
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package org.helioviewer.viewmodel.view;
 
2
 
 
3
import org.helioviewer.viewmodel.changeevent.ChangeEvent;
 
4
import org.helioviewer.viewmodel.region.Region;
 
5
 
 
6
/**
 
7
 * View to manage the region of the image currently shown.
 
8
 * 
 
9
 * <p>
 
10
 * This view manages the region, which is currently displayed. By accessing this
 
11
 * view, changing the region is also possible.
 
12
 * 
 
13
 * <p>
 
14
 * Note, that the region is not necessarily specified in pixels. Instead, the
 
15
 * region should be given in an unit, that allows calculating the location and
 
16
 * size of different images in relation to each other correctly. Since a pixel
 
17
 * might be referring to an physical area, whose real physical size might be
 
18
 * different from image to image, solar images usually specify their region in
 
19
 * kilometers.
 
20
 * 
 
21
 * <p>
 
22
 * Also note, that it is expected to have at least one RegionView in every path
 
23
 * of the view chain. To take care of this requirement, implement the
 
24
 * {@link ImageInfoView} as recommended.
 
25
 * 
 
26
 * <p>
 
27
 * For further informations about regions, also see
 
28
 * {@link org.helioviewer.viewmodel.region}
 
29
 * 
 
30
 * @author Ludwig Schmidt
 
31
 * 
 
32
 */
 
33
public interface RegionView extends View {
 
34
 
 
35
    /**
 
36
     * Sets the current region.
 
37
     * 
 
38
     * @param r
 
39
     *            The new region
 
40
     * @param event
 
41
     *            ChangeEvent to append all changes following
 
42
     * @return True, if the region has changed, false otherwise
 
43
     * @see #getRegion
 
44
     */
 
45
    public boolean setRegion(Region r, ChangeEvent event);
 
46
 
 
47
    /**
 
48
     * Returns the current region.
 
49
     * 
 
50
     * @return Current region
 
51
     * @see #setRegion
 
52
     */
 
53
    public Region getRegion();
 
54
}