gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] gzz/doc/pegboard/vob_colorable--humppake peg.rst


From: Asko Soukka
Subject: [Gzz-commits] gzz/doc/pegboard/vob_colorable--humppake peg.rst
Date: Fri, 14 Mar 2003 04:50:28 -0500

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Asko Soukka <address@hidden>    03/03/14 04:50:14

Modified files:
        doc/pegboard/vob_colorable--humppake: peg.rst 

Log message:
        ColorableVob update

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/doc/pegboard/vob_colorable--humppake/peg.rst.diff?tr1=1.5&tr2=1.6&r1=text&r2=text

Patches:
Index: gzz/doc/pegboard/vob_colorable--humppake/peg.rst
diff -u gzz/doc/pegboard/vob_colorable--humppake/peg.rst:1.5 
gzz/doc/pegboard/vob_colorable--humppake/peg.rst:1.6
--- gzz/doc/pegboard/vob_colorable--humppake/peg.rst:1.5        Wed Mar 12 
05:59:43 2003
+++ gzz/doc/pegboard/vob_colorable--humppake/peg.rst    Fri Mar 14 04:50:03 2003
@@ -5,16 +5,16 @@
 :Authors:   Asko Soukka
 :Stakeholders: Benja Fallenstein, Tuomas Lukka 
 :Date-created: 2003-03-05
-:Last-Modified: $Date: 2003/03/12 10:59:43 $
-:Revision: $Revision: 1.5 $
+:Last-Modified: $Date: 2003/03/14 09:50:03 $
+:Revision: $Revision: 1.6 $
 :Status:   Current
 :Scope:    Trivial
 :Type:     Feature
 
-This PEG proposes creating **Abstract ColorableVob** class, which
-implements a new **Colorable interface** also defined by this PEG.
+This PEG proposes creating **AbstractColorableVob** class, which
+implements a new **ColorableVob interface** also defined by this PEG.
 
-**Colorable Vob** is a very basic vob type, which enhances the regular
+**ColorableVob** is a very basic vob type, which enhances the regular
 Vob with interface for placing multiple solid colors on its
 background. The multiple solid colors are used a lot in basic views
 i.e. to show cursor location and node properties. In the current
@@ -23,6 +23,10 @@
 
 This PEG replaces the older `PEG for Abstract Background Vob`__.
 
+This PEG is depends on replacing current abstract class Vob with
+interface Vob and abstract class AbstractVob, which implements the
+first one.
+
 .. _PEG: ../vob_bgvob--humppake/peg.gen.html
 __ PEG_
 
@@ -57,20 +61,27 @@
   Multi-coloring stored vob prototype (which implements Colorable Vob)
   could be cloned using method::
   
-    Colorable cloneColored(Color[] colors);
+    ColorableVob cloneColored(Color[] colors);
+
+  There will be also several shorthands for that method, which are
+  discussed later.
 
 - How is Colorable Vob related to background vobs?
 
   RESOLVED: Colorable Vob won't define any background vob properties
   like background color or border. Although, background vobs should be
   immutable and use the common interface for multiple solid colors;
-  They should be inherited from ``ColorableVob``.
+  They should be inherited from ``AbstractColorableVob``.
 
 - How should Colorable Vob be assembled?
 
   RESOLVED: ColorableVob extends the basic Vob class and implements
   Colorable interface for multiple background colors.
 
+  RE-RESOLVED: AbstractColorableVob extends AbstractVob and implements
+  ColorableVob interface. ColorableVob interface is extended from 
+  interface Vob.
+
 - How should the new interfaces and classes be named?
 
   RESOLVED: **public interface Colorable** and **public abstract class
@@ -86,10 +97,15 @@
   interface Colorable + abstract class Vob = 
   abstract class ColorableVob
 
+  RE-RESOLVED: **public interface ColorableVob** and
+  **public abstract class AbstractColorableVob**, because creation of
+  AbstractVob
+
 - Where they should be located?
 
   RESOLVED: Currently in the package **``gzz.vob``**
-  (``gzz.vob.Colorable`` and ``gzz.vob.ColorableVob``. Probably in the
+  (``gzz.vob.ColorableVob`` and
+  ``gzz.vob.AbstractColorableVob``. Probably in the
   future they will be moved into package ``org.libvob.vob``.
 
 - How should *solids* be renamed?
@@ -113,6 +129,9 @@
   It still possible to use ArrayList for building up the colors and pass
   ``List.toArray()`` to ``Colorable.cloneColored()``.
 
+  Even the inner presentation of colors in ColorableVob is Color Array, 
+  It should also be possible to call cloneColored with an ArrayList.
+
 - How should the colors be set?
 
   RESOLVED: Since Colorable Vob should be immutable, colors
@@ -128,6 +147,26 @@
   colors == its own colors, but it's not obligated to compare the
   lists.
 
+  There should be also several shorthands for the default
+  cloneColored::
+
+    ColorableVob cloneColored(List); // for List
+    ColorableVob cloneColored(Color); // for single color
+
+  RE-RESOLVED: Previously introduced methods add the new colors
+  (parameters) next to old ones (the colors of the original vob).
+  Actually, the methods are only overloading methods for ones
+  with overriding flag::
+                                                                               
     
+    ColorableVob cloneColored(Color[], boolean);
+    ColorableVob cloneColored(List), boolean;
+    ColorableVob cloneColored(Color, boolean);
+                                                                               
     
+  When flag is set, old colors will
+  be replaced when cloning, if unset, the new colors
+  will be added next to old ones. ?
+
+
 - Should SolidBgVob be inherited from Colorable Vob?
 
   RESOLVED: No. ``SolidBgVob`` is not a such background vob than other
@@ -146,43 +185,51 @@
 - Interface Colorable needs Object.clone(), that needs implenting
   java.lang.Cloneable interface. Who should implement it?
 
-  RESOLVED: Since it's currently needed only by interface Colorable,
-  its implementation ColorableVob should implement also interface
+  RESOLVED: Since it's currently needed only by interface ColorableVob,
+  its implementation AbstractColorableVob should implement also interface
   Cloneable.
 
 Changes
 -------
 
-The Java classes **public interface Colorable** and **public abstract
-class ColorableVob** should be created after the following
+The Java classes **public interface ColorableVob** and **public abstract
+class AbstractColorableVob** should be created after the following
 diagram:
 
 .. UML:: abstractcolorablevob
 
     jlinkpackage gzz.vob
 
-    class Vob "abstract"
-        jlink
+    class Vob "interface"
 
-    class Colorable "interface"
+    class AbstractVob "abstract"
+       realize Vob
+
+    class ColorableVob "interface"
+       inherit Vob
         methods
-           +Colorable cloneColored(Color[] colors)
+           +ColorableVob cloneColored(Color[] colors)
+           +ColorableVob cloneColored(List colors)
+           +ColorableVob cloneColored(Color c)
+           +ColorableVob cloneColored(Color[] colors, boolean override)
+           +ColorableVob cloneColored(List colors, boolean override)
+           +ColorableVob cloneColored(Color c, boolean override)
            +Color[] getColors()
    
     class java.lang.Cloneable "interface"
 
-    class ColorableVob "abstract"
+    class AbstractColorableVob "abstract"
        realize java.lang.Cloneable
-        realize Colorable
-        inherit Vob
+        realize ColorableVob
+        inherit AbstractVob
         methods
            #Color[] colors
             
     class vobs.RectBgVob
-        realize ColorableVob
+        realize AbstractColorableVob
 
     class vobs.OvalBgVob
-       realize ColorableVob
+       realize AbstractColorableVob
 
     class vobs.ColoredSectorVob
        inherit vobs.OvalBgVob
@@ -191,14 +238,15 @@
        inherit vobs.ColoredSectorVob
 
    ---
-   horizontally(50, vob_h, Colorable, Vob, java.lang.Cloneable);
-   vertically(50, vob_v, Vob, ColorableVob, vobs.RectBgVob);
+   horizontally(50, vob_h, Vob, AbstractVob, java.lang.Cloneable);
+   vertically(50, vob_v, java.lang.Cloneable, AbstractColorableVob, 
vobs.OvalBgVob);
+   horizontally(50, colorable_h, ColorableVob, AbstractColorableVob);
    horizontally(50, vobs_h, vobs.RectBgVob, vobs.OvalBgVob);
    vertically(50, sector_v, vobs.OvalBgVob, vobs.ColoredSectorVob);
    horizontally(50, sector_h, vobs.ColoredSquareSectorVob, 
vobs.ColoredSectorVob);
 
 The following background vobs should be modified to inherit
-``ColorableVob``:
+``AbstractColorableVob``:
 
  - ``gzz.vob.vobs.RectBgVob``
  - ``gzz.vob.vobs.OvalBgVob``
@@ -213,4 +261,4 @@
 implements Colorable) is needed, it will be created by passing colors
 to prototype's cloning method::
 
-    Colorable cloneColored(Color[] colors);
+    ColorableVob cloneColored(Color[] colors);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]