Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [gef-dev] is it an elegance solution?


This is correct.  This was just asked recently, maybe on the newsgroup.
I think you can also call:
getViewer().getControl().getShell()




道平 张 <chauntowpin@xxxxxxxxxxxx>
Sent by: gef-dev-admin@xxxxxxxxxxx

09/11/2003 10:25 PM
Please respond to gef-dev

       
        To:        gef-dev@xxxxxxxxxxx
        cc:        
        Subject:        [gef-dev] is it an elegance solution?



My object is to add a dialog triggered by a double
click on a figure. the flowing is my code.it works well,
but I wonder it is a good solution.
       In the figure's editpart, add an  method-- performRequest inherited
from the AbstractEditPart.

public void performRequest(Request req) {
    if(req.getType().equals(REQ_OPEN))
    MessageDialog.openInformation(
      ((DefaultEditDomain)getViewer().getEditDomain()).getEditorPart().getSite().getShell(),"Readme Editor","View Action executed");
 }



Do You Yahoo!?
启用电邮帐号,领会雅虎通[身临其境聊电影]的动感魅力,还有网络摄像头+雅虎通收音机等你来拿


Back to the top