[Logo] JCVSForum - Community Support For JCVS Users and Developers
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Re: jCVS version using Swing UI available  XML
Forum Index » JCVS Mailing List
Author Message
jcvslist


[Avatar]

Joined: 03/06/2004 19:54:53
Messages: 3096
Location: Earth
Offline

<pre>I'm afraid I am late to this thread. (I just joined the mailing list today) Is
there
a version of jCVS which uses Swing? If so is it possible for developers to
obtain this version? I would hate to edit an old version implementing stuff in
AWT if Swing is the UI which future releases will use.

Thanks,
Erik Meade
s972059@jinx.umsl.edu

</pre>

jCVS Maoiling List arvhive.
[WWW]
jcvslist


[Avatar]

Joined: 03/06/2004 19:54:53
Messages: 3096
Location: Earth
Offline

<pre>



time@ice.com wrote:

> > > The other complaint I have heard about JTree is
> > > that is is not very "pixel efficient", but I believe
> > > this can be fixed with a customer renderer.
> >
> > Yes, I think you mean that it always paints the background for
> > every cell. The version I made does that too; for the renderer,
> > it uses a JPanel with three JLabel's, one for the name and the
> > icon in front of it, one for the version and one for the
> > timestamp. But I don't see how that could be changed a lot.
>
> In ICEMail, I had a problem with the rendering when I was trying
> to mix a JLabel with my own drawing. That was bad. I think, however,
> that if I went with my own JComponent I could get it to work right,
> but then I am reproducing JLabel, which sucks.

I haven't used it, but perhaps OverlayLayout would help here?

> How did you manage to get the columns of labels to line up properly?
> In other words, how did you get the timestamps to line up vertically,
> or did you just punt on that?

I first tried to do it in the CellRenderer, but the layout manager would
mock it up. I suppose you could set the layout manager of a JPanel to
null and do it in the JPanel, but I went for writing a simple
LayoutManager instead.

What it does is:

- I added a parent field to CVSListItem
- the layoutmanager looks up the sublist of the parent
- in CVSListItemVector I some methods that, given a FontMetrics object,
looks up the maximum length of the name, version and timestamp of all
it's children. It uses caching so it doesn't get recalculated all the
time.

That way the indenting of the labels is local to each "directory" only,
but that looks good. It doesn't add too much whitespace.

Erwin


</pre>

jCVS Maoiling List arvhive.
[WWW]
jcvslist


[Avatar]

Joined: 03/06/2004 19:54:53
Messages: 3096
Location: Earth
Offline

<pre>> > The other complaint I have heard about JTree is
> > that is is not very "pixel efficient", but I believe
> > this can be fixed with a customer renderer.
>
> Yes, I think you mean that it always paints the background for
> every cell. The version I made does that too; for the renderer,
> it uses a JPanel with three JLabel's, one for the name and the
> icon in front of it, one for the version and one for the
> timestamp. But I don't see how that could be changed a lot.

In ICEMail, I had a problem with the rendering when I was trying
to mix a JLabel with my own drawing. That was bad. I think, however,
that if I went with my own JComponent I could get it to work right,
but then I am reproducing JLabel, which sucks.

How did you manage to get the columns of labels to line up properly?
In other words, how did you get the timestamps to line up vertically,
or did you just punt on that?

tim.
Tim Endres, ICE Engineering, Inc.
mailto: time@ice.com http://www.ice.com
"Usenet - A slow moving self parody." -- Peter Honeyman

</pre>

jCVS Maoiling List arvhive.
[WWW]
 
Forum Index » JCVS Mailing List
Go to:   
Powered by JForum 2.1.9 © JForum Team