View unanswered posts | View active topics It is currently 2018-12-15 0:33



This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 
 关于node动态显示和隐藏 
Author Message
新手上路

Joined: 2013-04-15 13:03
Posts: 24
Post 关于node动态显示和隐藏
if(name.equals("node1"))
{
jscnode.setVisible(true);
jscnode2.setVisible(true);
}else if(name.equals("node2"))
{
jscnode.setVisible(false);
jscnode2.setVisible(false);
}


双击某个网元时,名称为node1时候,true(显示),在显示的状态下,双击为node2时,也就是将 setVisable(true)变成false,就无效了。是什么情况啊?


2013-04-15 13:17
Profile
TWaver开发组
User avatar

Joined: 2010-07-22 10:58
Posts: 906
Post Re: 关于node动态显示和隐藏
false就是不可见阿.你的问题是什么??


2013-04-15 13:20
Profile
新手上路

Joined: 2013-04-15 13:03
Posts: 24
Post Re: 关于node动态显示和隐藏
我的意思是 ,当为false时不管用,node还是显示,一点击,显示,在点击隐藏

我现在是一点击显示,在点击不隐藏


2013-04-15 13:27
Profile
TWaver开发组
User avatar

Joined: 2010-07-30 14:18
Posts: 304
Post Re: 关于node动态显示和隐藏
可以把name 打印出来,调试下试试。


2013-04-15 13:36
Profile
新手上路

Joined: 2013-04-15 13:03
Posts: 24
Post Re: 关于node动态显示和隐藏
我已经调试了,能进入该方法,但是就是不管用


2013-04-15 13:55
Profile
TWaver开发组
User avatar

Joined: 2010-07-30 14:18
Posts: 304
Post Re: 关于node动态显示和隐藏
能否把代码贴上来,我们测试下。


2013-04-15 15:11
Profile
新手上路

Joined: 2013-04-15 13:03
Posts: 24
Post Re: 关于node动态显示和隐藏
ShapeNode jscnode = new ShapeNode();
jscnode.addPoint(new Point(293,640));
jscnode.addPoint(new Point(293,710));
jscnode.putShapeNodeToArrow(true);
jscnode.putCustomDrawOutlineStroke(TWaverConst.STROKE_SOLID_1);
jscnode.putCustomDrawOutlineColor(Color.red);
jscnode.setShapeNodeType(TWaverConst.SHAPENODE_ORTHOGONAL_LINE );
jscnode.setVisible(false);
box.addElement(jscnode);

if(name.equals("node2"))
{
jscnode.setVisible(false);

}
if(name.equals("node3"))
{
jscnode.setVisible(true);

}


前台是个双击事件,双击node2和node3两个网元,为true时可以,在点击为false时,还是显示


2013-04-15 15:41
Profile
TWaver开发组
User avatar

Joined: 2009-04-20 18:37
Posts: 3115
Post Re: 关于node动态显示和隐藏
请不要重复发帖


2013-04-15 18:01
Profile
Display posts from previous:  Sort by  
This topic is locked, you cannot edit posts or make further replies.   [ 8 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron