swt与open flash chart
昨天看了IBM网站上写到rcp中运行open flash chart觉得不错自己就试着写了一下。
package com.chart.test;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.ole.win32.OLE;
import org.eclipse.swt.ole.win32.OleAutomation;
import org.eclipse.swt.ole.win32.OleControlSite;
import org.eclipse.swt.ole.win32.OleFrame;
import org.eclipse.swt.ole.win32.Variant;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
public class ChartTest {
/**
* Launch the application
* @param args
*/
public static void main(String[] args) {
String file="D:\\我的文档\\学习资料\\SWT\\open-flash-chart-2-Lug-Wyrm-Charmer\\open-flash-chart.swf";
final Display display = new Display();
Shell shell = new Shell(display);
shell.setLayout(new FillLayout());
shell.setSize(500, 375);
shell.setText("SWT Application");
OleFrame oleFrame=new OleFrame(shell,SWT.NONE);
oleFrame.setLayoutData(new GridData(GridData.FILL_BOTH));
OleControlSite controlSite =
new OleControlSite(oleFrame, SWT.NONE, "ShockwaveFlash.ShockwaveFlash");
/**
* doVerb() Requests that the OLE Document or ActiveX Control
* perform an action; actions are almost always changes to the activation state.
*/
controlSite.doVerb(OLE.OLEIVERB_SHOW); //
//
final OleAutomation automation = new OleAutomation(controlSite);
/**
* getIDsOfNames()得到控件方法对应的 id 值
*/
int[] methodIDs = automation.getIDsOfNames(new String[] { "LoadMovie" });
System.out.println(methodIDs.length);
System.out.println("methodIDs[0]="+methodIDs[0]);
Variant[] methodArgs = {
new Variant(0), new Variant(file+"?data-file=/bar-3d.txt") };
System.out.println(methodArgs.length);
automation.invoke(methodIDs[0], methodArgs);
shell.open();
shell.layout();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sle
相关文档:
笔者经过长时间的使用,总结了几条为Flash减肥的小技巧,希望与各位闪客们分享。
1、尽量减少文字的叙述。
2、应尽量把图画转为“电影剪切”或“图形”。
3、导入的图片格式最好是*.jpg或*.gif图片格式。
4、如果需要导入音乐文件,最好是*.MP3,这样你的源代码不会太大。
5 ......
ROM、RAM、DRAM、SRAM、FLASH的区别?
ROM和RAM指的都是半导体存储器,ROM是Read Only Memory的缩写,RAM是Random Access Memory的缩写。
ROM在系统停止供电的时候仍然可以保持数据,而RAM通常都是在掉电之后就丢失数据,典型的RAM就是计算机的内存。
RAM有两大类:一种称为静态RAM(Static RAM/SRAM),SRAM速度非常快, ......
HTML clipboardThese days a
16GB USB thumb drive
is as necessary as your house keys. Whether you are
taking large work files back and forth from the office or are sharing pictures,
videos, and music with friends, nothing beats the convenience of a USB storage
drive. Well, why not make sure t ......
Ubuntu下装完Adobe的Flash插件后,浏览器里可以播放Flash动画了。但是还存在一个问题就是汉字无法正确显示,显示为方格
解决办法:
修改这个配置文件
/etc/fonts/conf.d/49-sansserif.conf
把其中所有的字体名替换为中文字体名即可,我这里用的是“微软雅黑”和“Consolas“。
<?xml version=" ......
之前在Windows下用过Firefox的64位版本-Shiretoko,但是由于64位的flash player plugin一直安装不上,导致很多应用都用不了,据说可以使用NSPlugin Wrapper包和32位的类库来使用32位的flash player,我没有尝试。最近安装了64位的Gentoo,opera和shiretoko还是无法自动安装64位的flash player plugin。 ......