1 | /* |
---|
2 | * $Id: LayerChild.java,v 1.6 2001/01/31 23:41:04 dwd Exp $ |
---|
3 | * |
---|
4 | * This software is provided by NOAA for full, free and open release. It is |
---|
5 | * understood by the recipient/user that NOAA assumes no liability for any |
---|
6 | * errors contained in the code. Although this software is released without |
---|
7 | * conditions or restrictions in its use, it is expected that appropriate |
---|
8 | * credit be given to its author and to the National Oceanic and Atmospheric |
---|
9 | * Administration should the software be included by the recipient as an |
---|
10 | * element in other product development. |
---|
11 | */ |
---|
12 | |
---|
13 | package gov.noaa.pmel.sgt; |
---|
14 | import java.awt.Graphics; |
---|
15 | import java.awt.Rectangle; |
---|
16 | |
---|
17 | /** |
---|
18 | * <code>LayerChild</code> defines an interface to allow classes to be |
---|
19 | * associated with a <code>Layer</code>. The interface is sufficient to |
---|
20 | * provide scaling, translation, and mouse selection. |
---|
21 | * |
---|
22 | * @author Donald Denbo |
---|
23 | * @version $Revision: 1.6 $, $Date: 2001/01/31 23:41:04 $ |
---|
24 | * @since 1.0 |
---|
25 | */ |
---|
26 | public interface LayerChild extends Selectable { |
---|
27 | |
---|
28 | /** |
---|
29 | * Draw the <code>LayerChild</code>. |
---|
30 | * |
---|
31 | * @param g Graphics context |
---|
32 | * @exception LayerNotFoundException No layer is associated with the <code>LayerChild</code>. |
---|
33 | */ |
---|
34 | public void draw(Graphics g) throws LayerNotFoundException ; |
---|
35 | |
---|
36 | /** |
---|
37 | * Get the associated <code>Layer</code>. |
---|
38 | * |
---|
39 | * @return Associated layer |
---|
40 | */ |
---|
41 | public Layer getLayer(); |
---|
42 | |
---|
43 | /** |
---|
44 | * Associate a <code>Layer</code> with the <code>LayerChild</code>. |
---|
45 | * |
---|
46 | * @param l Parent layer. |
---|
47 | */ |
---|
48 | public void setLayer(Layer l); |
---|
49 | |
---|
50 | /** |
---|
51 | * Get the identifier. |
---|
52 | * |
---|
53 | * @return <code>LayerChild</code> identification. |
---|
54 | */ |
---|
55 | public String getId(); |
---|
56 | |
---|
57 | /** |
---|
58 | * Set the identifier. |
---|
59 | * |
---|
60 | * @param id <code>LayerChild</code> identification. |
---|
61 | */ |
---|
62 | public void setId(String id); |
---|
63 | |
---|
64 | /** |
---|
65 | * Create a copy of the <code>LayerChild</code>. |
---|
66 | * |
---|
67 | * @return A copy of the <code>LayerChild</code>. |
---|
68 | */ |
---|
69 | public LayerChild copy(); |
---|
70 | |
---|
71 | /** |
---|
72 | * Return a string that represents the <code>LayerChild</code>. |
---|
73 | * |
---|
74 | * @return Stringified <code>LayerChild</code> representation. |
---|
75 | */ |
---|
76 | public String toString(); |
---|
77 | |
---|
78 | /** |
---|
79 | * Check if <code>LayerChild</code> is visible. |
---|
80 | * |
---|
81 | * @since 2.0 |
---|
82 | * @return true if visible |
---|
83 | */ |
---|
84 | public boolean isVisible(); |
---|
85 | |
---|
86 | /** |
---|
87 | * Set visibility for a <code>LayerChild</code>. |
---|
88 | * |
---|
89 | * @since 2.0 |
---|
90 | * @param visible visible if true |
---|
91 | */ |
---|
92 | public void setVisible(boolean visible); |
---|
93 | /** |
---|
94 | * Get <code>AbstractPane</code> of the <code>LayerChild</code>. |
---|
95 | * @since 2.0 |
---|
96 | */ |
---|
97 | public AbstractPane getPane(); |
---|
98 | /** |
---|
99 | * Used by sgt internally. |
---|
100 | * @since 2.0 |
---|
101 | */ |
---|
102 | public void modified(String mess); |
---|
103 | } |
---|