gzz-dev
[Top][All Lists]
Advanced

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

Re: [Gzz] cellview_naming


From: Benja Fallenstein
Subject: Re: [Gzz] cellview_naming
Date: Sat, 02 Nov 2002 15:08:42 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020913 Debian/1.1-1

Tuomas Lukka wrote:

benja wrote:
- ``CellView`` to ``CellBoxView``

``CellContentView`` keeps its name. This makes sense because after all,
both ``CellBoxView`` and ``CellContentView`` are just ways to view
a cell, one with and one without a box around.

I disagree; having separate interfaces makes using CellInBoxHook a bother:
you can't then use it for either of the derived interfaces, since they
are abstract classes..


Hm. There is no CellInBoxHook class as far as I can see, but I presume you mean CellPlacementHook/CellInBoxPlugin. What are the intended use cases for them? (It would be nice if this could be in the javadoc...)

I don't know, I like to have two different classes simply because through static typing, it avoids putting a box inside a box inside a box inside a box for a single cell... On the other hand, I wouldn't mind a cellview that would be just the content, without any box around. Hmmm.

-- If the user of the interface declares it so, I guess it should be possible to have box-in-box-in-box too, but the problem is that currently the CellView gets the CellContentView from the ViewContext:

CellView getCellView(); // used in the View
CellContentView getCellContentView(); // used in the cell view

If a CellView were returned by getCellContentView(), that CellView would potentially call getCellContentView().place() and go into an infinite loop.

It would be possible to have only the CellView interface and make the box views work like this:

BoxCellView(CellView sub) { this.sub = sub; }
void place(...) {
-- Place the box, set the clipping.
sub.place(...); // inside the box
-- Remove the clipping.
}

The problem I see with this is that the box view and the content view are not independently selectable.

- Benja





reply via email to

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