Page Index Toggle Pages: [1] 2  Send TopicPrint
Hot Topic (More than 10 Replies) DiagramView Display (Read 7271 times)
Green
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 21
Joined: Jun 30th, 2011
DiagramView Display
Jun 30th, 2011 at 1:53am
Print Post  
I want to  create TableNode  with image using the behavior of pan ,but DiagramView  display nothing  and the diagramView become edit so that  I can draw shapnode,why ? what should i do?

I create TableNode without image ,they display perfect . If I display less tableNode with image ,they also do it
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: DiagramView Display
Reply #1 - Jun 30th, 2011 at 6:01am
Print Post  
Are you using Java mode? Is there any error message shown in the Java console?
  
Back to top
 
IP Logged
 
Green
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 21
Joined: Jun 30th, 2011
Re: DiagramView Display
Reply #2 - Jun 30th, 2011 at 6:17am
Print Post  
I use ClientSideMode="JavaApplet" In ASP.NET,there is no error message about that .


  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: DiagramView Display
Reply #3 - Jun 30th, 2011 at 6:53am
Print Post  
You should be able to see a 'cup of coffee' icon in the taskbar tray that opens the Java console. Is there anything shown in the console?
  
Back to top
 
IP Logged
 
Green
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 21
Joined: Jun 30th, 2011
Re: DiagramView Display
Reply #4 - Jun 30th, 2011 at 7:24am
Print Post  
the console message is :
basic: 已添加进度监听程序:
sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@18e2b22
basic: Plugin2ClassLoader.addURL parent called for http://gr24-green-zhang.bqc.corp.com/ehrdev/eCompetence/JobCodeSettings/JDiagram...
security: 已启用黑名单撤销检查

security: 已启用可信库列表检查

network: 找到了高速缓存项 [url: http://gr24-green-zhang.bqc.corp.com/ehrdev/eCompetence/JobCodeSettings/JDiagram... null] prevalidated=false/0
network: 正在使用代理 DIRECT 连接 http://gr24-green-zhang.bqc.corp.com/ehrdev/eCompetence/JobCodeSettings/JDiagram...
network: 正在使用代理 DIRECT 连接 http://gr24-green-zhang.bqc.corp.com:80/
network: 正在连接 http://gr24-green-zhang.bqc.corp.com/ehrdev/eCompetence/JobCodeSettings/JDiagram... 与 cookie "loginroute=default; username=sa; language=ZH-CN; Logon_Name=BQC\SA; Logon_EmpId=0009000; Logon_Region=zh-CN; Continue_Approve=Y; Document_Domain=bqc.corp.com; Nt_Account; cardreadertype=71_2; LANG=zh-CN; Login_ID=1009003; Account=Green.Zhang; Company=00000000-0000-0000-0000-000000000000"
network: http://gr24-green-zhang.bqc.corp.com/ehrdev/eCompetence/JobCodeSettings/JDiagram... 的响应代码: 304
network: http://gr24-green-zhang.bqc.corp.com/ehrdev/eCompetence/JobCodeSettings/JDiagram... 的编码: null
network: 断开与 http://gr24-green-zhang.bqc.corp.com/ehrdev/eCompetence/JobCodeSettings/JDiagram... 的连接
cache: Reading Signers from 0 http://gr24-green-zhang.bqc.corp.com/ehrdev/eCompetence/JobCodeSettings/JDiagram... | C:\Documents and Settings\Green.Zhang\Application Data\Sun\Java\Deployment\cache\6.0\20\12279754-74ec9731.idx
network: 没有与未签名的 JAR 文件有关的证书信息: http://gr24-green-zhang.bqc.corp.com/ehrdev/eCompetence/JobCodeSettings/JDiagram...
network: 没有与未签名的 JAR 文件有关的证书信息: http://gr24-green-zhang.bqc.corp.com/ehrdev/eCompetence/JobCodeSettings/JDiagram...
cache:  Read manifest for http://gr24-green-zhang.bqc.corp.com/ehrdev/eCompetence/JobCodeSettings/JDiagram... read=110 full=110
basic: 小程序已载入。
basic: Applet resized and added to parent container
basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 194958 us, pluginInit dt 418103 us, TotalTime: 613061 us
basic: Applet initialized
basic: 已删除进度监听程序:
sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@18e2b22
basic: Applet made visible
basic: Starting applet
basic: completed perf rollup
basic: Applet started
basic: Told clients applet is started

Is the timeout ?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: DiagramView Display
Reply #5 - Jun 30th, 2011 at 7:51am
Print Post  
Does it show a message in Chinese, and are there any exceptions mentioned?

What might be happening if you load a lot of big images is that the applet runs our of memory (the JRE gives 96MB to applets by default) and loading the diagram fails, so it leaves in a default state where drawing new shapes is allowed. Try setting DiagramView.JavaArguments="-Xmx300m" to allocate more memory for the applet.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Green
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 21
Joined: Jun 30th, 2011
Re: DiagramView Display
Reply #6 - Jun 30th, 2011 at 8:48am
Print Post  
I think it's not the  memory of  the applet. the image is 7K .
the success message is:
network: connect http://gr24-green-zhang.bqc.corp.com/ehrdev/eCompetence/JobCodeSettings/META-INF... 与 cookie "loginroute=default; username=sa; language=ZH-CN; Logon_Name=BQC\SA; Logon_Region=zh-CN; cardreadertype=71_2; LANG=zh-CN"
basic: Applet initialized

  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: DiagramView Display
Reply #7 - Jun 30th, 2011 at 9:20am
Print Post  
Have you tried setting JavaArguments anyway? You might still need more memory if loading big diagrams.
  
Back to top
 
IP Logged
 
Green
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 21
Joined: Jun 30th, 2011
Re: DiagramView Display
Reply #8 - Jun 30th, 2011 at 9:41am
Print Post  
yes,I get the exception
Exception in thread "AWT-EventQueue-3" java.lang.NullPointerException
at com.mindfusion.diagramming.DiagramView.a(Unknown Source)
at com.mindfusion.diagramming.DiagramView.a(Unknown Source)
at com.mindfusion.diagramming.DiagramView$MouseMonitor.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: DiagramView Display
Reply #9 - Jun 30th, 2011 at 9:53am
Print Post  
When are you getting it?
  
Back to top
 
IP Logged
 
Green
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 21
Joined: Jun 30th, 2011
Re: DiagramView Display
Reply #10 - Jun 30th, 2011 at 9:56am
Print Post  
just show the diagramView
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: DiagramView Display
Reply #11 - Jun 30th, 2011 at 10:48am
Print Post  
I can't see how the mouseReleased event will appear in the call stack then. Could you send a sample project that shows the problem to support@mindfusion.eu?
  
Back to top
 
IP Logged
 
Green
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 21
Joined: Jun 30th, 2011
Re: DiagramView Display
Reply #12 - Jul 1st, 2011 at 7:08am
Print Post  
I hava sent the sample to your mail box ,please look it and tell me why
thank you !
  
Back to top
 
IP Logged
 
Green
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 21
Joined: Jun 30th, 2011
Re: DiagramView Display
Reply #13 - Jul 1st, 2011 at 7:56am
Print Post  
How many tableNode can be created for one time?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: DiagramView Display
Reply #14 - Jul 1st, 2011 at 9:20am
Print Post  
It loaded without errors for me. I still think JRE is running out of memory; if you are with an older Java version, it might have a lower default memory limit and ignores the max-memory applet argument.

So your sample creates near 1000 tables, and then four cells of each table have their Image set to a new Bitmap instance. If you save the diagram to xml before submitting using SaveToXml, you will see there are 4080 images transferred (<Images Count="4080"> element in the xml file). The content of the file created by SaveToXml is what the control transfers between the server and the applet in zipped form, and you can see it's 35MB big with the 4080 images, which might easily take two-three times more memory in the Java VM while parsing and creating diagram elements.

You can decrease your diagram memory requirements a lot by using shared images instead of creating a new Bitmap instance for each image cell. E.g. preload the images into an array:

Bitmap[] bitmaps = new Bitmap[]
{
     new Bitmap(Server.MapPath("PDF\\0.png")),
     new Bitmap(Server.MapPath("PDF\\1.png")),
     new Bitmap(Server.MapPath("PDF\\2.png")),
     new Bitmap(Server.MapPath("PDF\\3.png"))
};

and then replace such lines of code:

t[0, 0].Image = new Bitmap(
     Server.MapPath("PDF\\" + rnd.Next(4).ToString() + ".png"));

with

t[0, 0].Image = bitmaps[rnd.Next(4)];

Then if you save the xml file again you will see it contains only 4 images.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint