14 |
|
|
15 |
This PEG includes three abstract which are |
This PEG includes three abstract which are |
16 |
|
|
17 |
- Node content ('NodeView') |
- Node content ('NodeContent and first definition of NodeView') |
18 |
- Node content state ('xyzState') |
- Node content state ('xyzState') |
19 |
- Node content with view context ('xyzContext') |
- Node content with view context ('xyzContext') |
20 |
|
- My proposal for abstract NodeView |
21 |
|
|
22 |
- xyz implicates Text, Image, Sound and Page etc. |
- xyz implicates Text, Image, Sound and Page etc. |
23 |
|
|
68 |
} |
} |
69 |
} |
} |
70 |
|
|
71 |
I propous that we abstract ViewContext away and let |
I suggest that we abstract ViewContext away and let |
72 |
someone else to handle the view context. |
someone else to handle the view context['3)']. |
73 |
|
Now, make a new interface from the rest: |
74 |
|
|
75 |
:: |
:: |
76 |
|
|
85 |
Note: |
Note: |
86 |
- **Very important thing** is that we don't know anything |
- **Very important thing** is that we don't know anything |
87 |
about the content. We can only assume what an enfilade includes. |
about the content. We can only assume what an enfilade includes. |
88 |
That's why I like to propouse additional methods to NodeContent |
That's why I like to suggest additional methods to the interface |
89 |
interface which would be: |
which would then be: |
90 |
|
|
91 |
:: |
:: |
92 |
|
|
146 |
|
|
147 |
|
|
148 |
These would be easily called from NodeView public attributes, i.e., |
These would be easily called from NodeView public attributes, i.e., |
149 |
nodeview.text.setColor(Color.red); or nodeview.pagespan.setBackgroundTexVisible(false); |
nodeview.text.setColor(Color.red); or nodeview.page.setBackgroundTexVisible(false); |
150 |
|
|
151 |
|
|
152 |
|
|
160 |
View context isn't very easy task. When you place a node it's correct time to ask from |
View context isn't very easy task. When you place a node it's correct time to ask from |
161 |
view context if it has plans for current node. View context might want to set |
view context if it has plans for current node. View context might want to set |
162 |
cursor offset, pagespan view coordinates or it might want to set text's |
cursor offset, pagespan view coordinates or it might want to set text's |
163 |
color more important by reddishing for example. |
color more important by reddishing it for example. |
164 |
|
|
165 |
|
|
166 |
Issues |
Issues |
196 |
float[] getViewCoords(); |
float[] getViewCoords(); |
197 |
} |
} |
198 |
|
|
199 |
|
Of course ViewContext can change also states, i.e., text color and font, defined in the '2)'. |
200 |
|
|
201 |
|
|
202 |
|
|
203 |
|
4) NodeView |
204 |
|
=========== |
205 |
|
|
206 |
|
My proposal for NodeView: |
207 |
|
|
208 |
|
:: |
209 |
|
|
210 |
|
public abstract class NodeView implements NodeContent { |
211 |
|
|
212 |
|
// Space/FenfireContext |
213 |
|
// for asking content - see the PEG followed be this PEG ;) |
214 |
|
protected Space/FFC/Fen foo; |
215 |
|
|
216 |
|
// ViewContext - see 3) |
217 |
|
protected ViewContext viewContext; |
218 |
|
|
219 |
|
// Current node - see 3) |
220 |
|
// NodeView places nodes one by one. |
221 |
|
protected RDFNode current; |
222 |
|
|
223 |
|
// correct state/context handlers.- see 2) and 3) |
224 |
|
public TextContextState text; |
225 |
|
public ImageContextState image; |
226 |
|
public PageContextState page; |
227 |
|
} |
228 |
|
|
229 |
|
It's important that all 1), 2) and 3) are combined in NodeView because it's so often used. |
230 |
|
Noone wants to use continuos type casting with long interface names. |
231 |
|
|