Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: 答复: [gef-dev] Help: Error , thread with GEF


You should not need to use multiple threads to acheive animation.  It is easy enough to do just on the UI thread.  See Draw2d's Animation class and its uses.

-Randy



LiuJF <liu-jf@xxxxxxxxxxx>
Sent by: gef-dev-bounces@xxxxxxxxxxx

04/28/2006 08:33 PM

Please respond to
liu-jf@xxxxxxxxxxx; Please respond to
GEF development <gef-dev@xxxxxxxxxxx>

To
"'GEF development'" <gef-dev@xxxxxxxxxxx>
cc
Subject
答复: [gef-dev] Help: Error , thread with GEF





Yesterday , I got the same problem when I tried to generate an animation,
 
I think multi-thread is not enabled in GEF,  operations must be acted in Display's thread
 
 
 
刘建峰
沈阳东软软件股份有限公司
基础软件事业部
Neusoft Software Co.,Ltd.Dalian Branch
Tel:0411-84835706
 


发件人: gef-dev-bounces@xxxxxxxxxxx [mailto:gef-dev-bounces@xxxxxxxxxxx] 代表 ricky
发送时间:
2006年4月29日 7:17
收件人:
GEF development
主题:
[gef-dev] Help: Error , thread with GEF


Can someone help me, if I use Thread, in order to
move the Figure from GEF , but unfortunately with me
always return errors, if I Thread with start() start
(es is hier unbelievably , wenn with run(), then no problem, but that is not Thread),
following errors message:


Exception in thread "Thread-5" java.lang.NullPointerException
at
org.eclipse.draw2d.DeferredUpdateManager.queueWork(DeferredUpdateManager.java:174)
at
org.eclipse.draw2d.DeferredUpdateManager.addInvalidFigure(DeferredUpdateManager.java:117)
at org.eclipse.draw2d.Figure.revalidate(Figure.java:1351)
at org.eclipse.draw2d.Figure.revalidate(Figure.java:1353)
at org.eclipse.draw2d.Figure.revalidate(Figure.java:1353)
at org.eclipse.draw2d.Figure.revalidate(Figure.java:1353)
at org.eclipse.draw2d.Figure.revalidate(Figure.java:1353)
at org.eclipse.draw2d.Figure.revalidate(Figure.java:1353)
at org.eclipse.draw2d.Figure.revalidate(Figure.java:1353)
at org.eclipse.draw2d.Figure.revalidate(Figure.java:1353)
at org.eclipse.draw2d.Figure.revalidate(Figure.java:1353)
at org.eclipse.draw2d.Figure.setConstraint(Figure.java:1464)
at
org.eclipse.gef.editparts.AbstractGraphicalEditPart.setLayoutConstraint(AbstractGraphicalEditPart.java:789)
at com.test.subject.parts.ShapePart.refreshVisuals(ShapePart.java:95)
at com.test.subject.parts.NodePart.propertyChange(NodePart.java:40)
at com.test.subject.parts.ShapePart.propertyChange(ShapePart.java:118)
at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
at com.test.subject.model.Element.firePropertyChange(Element.java:21)
at com.test.subject.model.StateShape.setName(StateShape.java:66)
at com.test.subject.trace.RobotTrace.run(RobotTrace.java:310)
at java.lang.Thread.run(Unknown Source)

here ist code  this method, which I think, error:
protected void refreshVisuals() {

 Rectangle bounds = new Rectangle(getCastedModel().getLocation(),
   getCastedModel().getSize());
 createFigureForModel();

 if(getFigure()!=null && ((GraphicalEditPart) getParent())!=null
   && bounds !=null && this != null)
 ((GraphicalEditPart) getParent()).setLayoutConstraint(this,
   getFigure(), bounds);

}




Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) is intended only for the use of the intended recipient and may be confidential and/or privileged of Neusoft Group Ltd., its subsidiaries and/or its affiliates. If any reader of this communication is not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying is strictly prohibited, and may be unlawful. If you have received this communication in error, please immediately notify the sender by return e-mail, and delete the original message and all copies from your system. Thank you.
_______________________________________________
gef-dev mailing list
gef-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/gef-dev


Back to the top