gzz-commits
[Top][All Lists]
Advanced

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

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


From: Asko Soukka
Subject: [Gzz-commits] gzz/doc/pegboard/vob_bgvob--humppake peg.rst
Date: Thu, 06 Mar 2003 05:37:30 -0500

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Asko Soukka <address@hidden>    03/03/06 05:37:28

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

Log message:
        update and uml

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

Patches:
Index: gzz/doc/pegboard/vob_bgvob--humppake/peg.rst
diff -u gzz/doc/pegboard/vob_bgvob--humppake/peg.rst:1.4 
gzz/doc/pegboard/vob_bgvob--humppake/peg.rst:1.5
--- gzz/doc/pegboard/vob_bgvob--humppake/peg.rst:1.4    Wed Mar  5 11:59:47 2003
+++ gzz/doc/pegboard/vob_bgvob--humppake/peg.rst        Thu Mar  6 05:37:24 2003
@@ -1,90 +1,141 @@
-=====================================================
-PEG ``vob_bgvob--humppake``: Background Vob interface
-=====================================================
+====================================================
+PEG ``vob_bgvob--humppake``: Abstract Background Vob
+====================================================
 
 :Authors:   Asko Soukka
 :Stakeholders: Benja Fallenstein, Tuomas Lukka 
 :Date-created: 2003-03-05
-:Last-Modified: $Date: 2003/03/05 16:59:47 $
-:Revision: $Revision: 1.4 $
-:Status:   Incomplete
+:Last-Modified: $Date: 2003/03/06 10:37:24 $
+:Revision: $Revision: 1.5 $
+:Status:   Current
 :Scope:    Trivial
 :Type:     Feature
 
-This PEG proposes of creating **Background Vob interface**, which at
-first includes the border flag and color handling originally made for
-``RectBgVob``. The new interface allows the easy use of different
-(*Background*) Vobs in a single View.
+This PEG proposes creating **Abstract Background Vob** class, which
+implies creation of **Background Vob interface** and **Colored Vob
+Interface**.
+
+Background Vob is a very basic vob type, which enhances the Vob
+currently with the the following features:
+
+ - single color background
+ - possibility for single color border
+ - possibility for multiple background colors, which are shown 
+   e.g. as parallel vertical stripes
+
+Background Vob implements interface for single color backround and
+border from Background Vob Interface and handling of multiple
+background colors from Colored Vob Interface.
 
 Issues
 ------
 
-- How interface should be named?
+- How should the new interfaces and classes be named?
 
-  RESOLVED: Interface ``BgVob``
-
-- Where it will be located?
-
-  RESOLVED: Currently at ``gzz.vob.BgVob``, probably in the
-  future at ``org.libvob.vob.BgVob``.
-
-- What should interface ``BgVob`` contain?
-
-  RESOLVED: At first it should containt the handling of background 
-  color and *solid colors* from ``RectBgVob``. Those are currently
-  also copied to ``ColoredSectorVob``.
+  RESOLVED: **public interface BackgroundVob**, **public interface
+  ColoredVob** and **public abstract class AbstractBgVob**. In
+  AbstractBgVob the word Background is truncated after the current
+  *background vob* naming practice (SolidBgVob, RectBgVob, OvalBgVob).
+
+- Where they should be located?
+
+  RESOLVED: Currently in the package **``gzz.vob``**
+  (``gzz.vob.ColoredVob``, ``gzz.vob.BackgroundVob`` and
+  ``gzz.vob.AbstractBgVob``). Probably in the future they will be 
+  moved into package ``org.libvob.vob``.
+
+- How should the common features of current background vobs be
+  splitted between Background Vob Interface and Colored Vob Interface?
+
+  RESOLVED: Methods for single color backround and border will be
+  defined in Background Vob Interface and methods of multiple
+  background colors in Colored Vob Interface. The AbstractBgVob will
+  contain the default implementations for them.
 
 - How should *solids* be renamed?
 
-  RESOLVED: *cellColors* has been proposed, but now we are
-  moving away from *cells* to *nodes*. Therefore *solids* could
-  be called simply *colors*. Already the method adding them
-  have been called *addColor*.
-
-- Should we use an *array* or *Vector* to store *colors*?
-
-  RESOLVED: We should use ``java.util.Vector`` if it's performance
-  is not a problem. Currently ``RectBgVob`` uses array and resizing
-  it needs additional work. Also those AWT tools, which have used Vobs'
-  ``java.awt.Color`` arrays are already moved to ``basalt``. Though, the
-  content of vector could still be passed on in an array.
-  
+  RESOLVED: Earlier, *cellColors* has been proposed. Although, we are
+  currently moving away from *cells* to *nodes*. Therefore *solids*
+  should be called simply **colors**. Note that already the method
+  adding them has been called *addColor*.
+
+- How should we store *colors*?
+
+  RESOLVED: Since we are using the *java.util Collections API*
+  the **ArrayList** implementation of List should be used.
+
+- What should be the default values for **bgcolor**, **drawBorder** and
+  **colors**?
+
+  RESOLVED: Default **bgColor** will be ``java.awt.Color.white``,
+  **drawborder** will be **true** and **colors** will be **null**.
+  These are the currently used default settings for background vobs.
+ 
 Changes
 -------
 
-Interface BgVob with following attributes and methods will
-be created::
-
-    /** Flag for drawing border. */
-    public boolean drawBorder = true;
-
-    /** Vector to store Colors. */
-    protected Vector colors = new Vector(5, 5);
-       
-    /** Background color of the Vob */
-    protected Color bg = Color.white;
-
-    /** Set the background color of the Vob */
-    public void setBg(Color c){ if( c != null ) bg = c; }
-
-    /** @return the background color of the Vob */
-    public Color getBg() { return bg; }
-
-    /** Adds one more color to be drawn inside the Vob. */
-    public void addColor(Color c) {
-       if (Color != null) colors.addElement(c);
-    }
-
-    /** The currently put node colors.
-     * @return an array of Colors or null if no colors is set. 
-     */
-    public Color[] getColors() {
-       if (colors.size() == 0) return null;
-        Color[] c = new Color[colors.size()];
-       for (i=0; i<colors.size(); i++)
-           c[i] = (Color)colors.elementAt(i);
-       return c; 
-    }
+The Java classes **public interface BackgroundVob**, **public interface
+ColoredVob** and **public abstract class AbstractBgVob** will be
+created after the following diagram:
+
+.. UML:: backgroundvob
+
+    jlinkpackage gzz.vob
+
+    class Vob
+        jlink
+
+    class BackgroundVob Interface
+        methods
+           +void setBgColor(Color c)
+           +Color getBgColor()
+           +void setBorderColor(Color c)
+           +Color getBorderColor()
+           +void setDrawBorder(Boolean b)
+            +Boolean getDrawBorder()
+   
+    class ColoredVob Interface
+        methods
+           +void addColor(Color c)
+           +List getColors()
+
+    class AbstractBgVob Abstract
+        realize ColoredVob
+        realize BackgroundVob
+        inherit Vob
+        methods
+           #Boolean drawBorder
+           #Color bgColor
+           #List colors
+            
+    class vobs.RectBgVob
+        realize AbstractBgVob
+
+    class vobs.SolidBgVob
+        realize AbstractBgVob
+
+    class vobs.OvalBgVob
+        realize AbstractBgVob
+
+    class vobs.ColoredSectorVob
+        realize AbstractBgVob
+
+    class vobs.ColoredSquareSectorVob
+        inherit vobs.ColoredSectorVob
+
+   ---
+   horizontally(50, vob_h, ColoredVob, Vob, BackgroundVob);
+   vertically(50, vob_v, Vob, AbstractBgVob, vobs.RectBgVob);
+   horizontally(50, vobs_h, vobs.SolidBgVob, vobs.RectBgVob, vobs.OvalBgVob);
+   vertically(50, sector_v, vobs.SolidBgVob, vobs.ColoredSectorVob);
+   horizontally(50, sector_h, vobs.ColoredSectorVob, 
vobs.ColoredSquareSectorVob);
+
+The following background vobs should be modified to inherit from 
+AbstractBgVob:
+
+ - gzz.vob.vobs.RectBgVob
+ - gzz.vob.vobs.SolidBgVob
+ - gzz.vob.vobs.BgVob
 
 Some of the current vobs should be changed to implement this interface
 (``RectBgVob`` and ``ColoredSectorVob``). Also some other Vobs should




reply via email to

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