Make Label to have serval editable parts? [message #41643] |
Tue, 12 November 2002 22:12 |
Hal Messages: 67 Registered: July 2009 |
Member |
|
|
Hi,
Couple weeks ago I post a message about how to make label to have several
editable parts. Randy Hudson, that can be done if a simple change is made in
GEF. Would you please tell me if that change is in the latest build? Or
should I open a change request in GEF?
Thank you.
Subject: Re: Make Label to have serval editable parts?
From: hudsonr@us.eye-bee-em.com (Randy Hudson)
Newsgroups: eclipse.tools.gef
Organization: EclipseCorner
Date: Oct 09 2002 20:24:13
If we make a simple change in GEF (SelectEditPartTracker), Hal could use
this figure with a single editpart. The change would be to make "direct
edit" a LocationRequest. Hal could just take the Request and compare its
location to the location of the 3 labels.
However, both of these solution only work with the mouse. You would still
have to figure out how to switch between the 3 CellEditors with the
keyboard.
> > public void performRequest(Request request) {
> > if (request.getType() == RequestConstants.REQ_DIRECT_EDIT) {
Point where = ((LocationRequest)request).getLocation(); //Returns the
location on the Canvas
getMonthLabel().translateToRelative(where); //You could use any of the
3 labels for this translation
if (getMonthLabel().containsPoint(where)){
performMonthDirectEdit();
} else if ...
//etc.
> > }
> > }
|
|
|
Powered by
FUDForum. Page generated in 0.02758 seconds