/[fenfire]/fenfire/docs/pegboard/nodeview_abstract--mudyc/peg.rst
ViewVC logotype

Diff of /fenfire/docs/pegboard/nodeview_abstract--mudyc/peg.rst

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by mudyc, Fri Apr 4 07:14:52 2003 UTC revision 1.6 by mudyc, Fri Apr 4 07:48:08 2003 UTC
# Line 14  Introduction Line 14  Introduction
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    
# Line 67  are in the node's enfilade. Line 68  are in the node's enfilade.
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    
# Line 83  about view context nor node's content. Line 85  about view context nor node's content.
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    
# Line 144  I propous several interfaces to be imple Line 146  I propous several interfaces to be imple
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    
# Line 158  Abstract Line 160  Abstract
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
# Line 194  And now ViewContext is able to do it's j Line 196  And now ViewContext is able to do it's j
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    

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26