`
文章列表
官方下载开发包http://www.sencha.com/products/extjs/download/ 解压后创建一个web项目,放到tomcat下面,就可以正常访问里面的例子了和api了。 来个最简单的,项目里面我引入了以下文件:  ux是examples下面的文件夹。 在html页面只需导入以下3个文件就ok,很方便了。在ext加载后调用了一个静态方法。: <!-- Ext --> <link rel="stylesheet" type="text/css" href="ext4/resources/ ...
撤销与恢复主要用到了命令模式,也许还会和其他模式相结合:   package org.forever.drawlines { //命令接口 public interface Command { function execute():void;//执行操作 function unexecute():void;//取消操作 function canExecute():Boolean;//是否 ...
package org.foreverframework.office; import java.io.File; public class MSWordUtil { private static final String COLUMNS = "Columns"; private static final String CELLS = "Cells"; private static final String ROWS = "Rows"; private static final String COU ...
该例子来自阎宏提供的例子程序,以画线为例: 命令接口Command: package com.javapatterns.command.drawlines; //命令接口 public interface Command { abstract public void execute();// 执行操作 abstract public void unexecute();// 取消操作 abstract public ...
只要是设计器就逃不脱对组件的动态调整。比如大小,位置是最常见的。 在flashBuilder中可以看到下面效果图: 在此简单实现,更多细节不予考虑,有点伤到我的神经了,总体设计思路图:  由resizeUI完成核心功能。 ResizeContainer容器类: package org.forever.view { import flash.events.MouseEvent; import mx.collections.ArrayList; import mx.core.IUIComponent; import spark.components.Ski ...

java zip

    博客分类:
  • JAVA
import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.util.Enumeration; import org.apache.tools.zip.ZipEntry; import org.apache.tools.zip.ZipFile; import org.apache.tools.zip ...

doc转swf

    博客分类:
  • JAVA
将doc转换成swf,然后显示在html页面上。 package org.forever.util; import java.io.File; import java.util.HashMap; import java.util.Map; import org.apache.log4j.Logger; public class FlashPaperUtil { private static final String UNINSTALL_BAT = "uninstall.bat"; private static final String INST ...
MailInfo类: //发送邮件的信息类 public class MailInfo { private String personal;// 姓名 private String subject;// 主题 private Date sentDate = new Date();// 发送时间 private List<String> toList = new ArrayList<String>();// 主送人集合 private List<String> ccList = new ArrayList<String>(); ...

web版的视频转换

    博客分类:
  • web
采用s2sh设计。转换器使用的是FormatFactory软件。这里以视频转flv作为例子。 工具类ConvertVideoUtil如下: package org.forever.convertVideo.util; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; /** * 视频转换工具类 * * @author 陈均 */ public class ConvertVideoUtil { private String forma ...
利用flex来开发程序很快,有时难免会和js交互. flex代码: <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth ...
无意间发现的不错的网站http://raphaeljs.com/,做流程设计器感觉还不错。下面是一个简单例子,画两个矩形,进行连接,拖动: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <me ...
Base.js,用于类的设计使用: /* Base.js, version 1.1a Copyright 2006-2010, Dean Edwards License: http://www.opensource.org/licenses/mit-license.php */ var Base = function() { // dummy }; Base.extend = function(_instance, _static) { // subclass var extend = Base.prototype.extend; // build ...
利用prototype实现继承:   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content=&qu ...
如题index.html top.html: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content ...
修改了xloadtree的部分源码以适合自己使用。 1.修改了因节点个数过多而造成刷新时候的缓慢。(你可以用原版试试加上500个子节点,然后调用reload()方法)。 2.加入了单选和复选的功能。 3.加入了线程,在500个子节点以上才会启用。引用Thread.js,设置webFXTreeConfig.useThread=true. 4.增加了data属性,使得每个节点都可以绑定自己想绑定的数据上去。 确定线程不能保证节点的顺序,如果对顺序有要求,那就不适用了。 该例子实现了对一颗树的增删改查。 因为是延迟加载,所以在每个父节点的子节点1000以内都是比较快的。 看哈效果图: ...
Global site tag (gtag.js) - Google Analytics