- 浏览: 590393 次
- 性别:
- 来自: 广州
-
最新评论
-
smilezhouwei:
请问CruiseControl在加载jar包时,由于jar包过 ...
修改CruiseControl的端口 -
zengxuefei:
不起作用啊,有bug
Flex+Java多文件上传 -
lzeus:
模仿的tomcat源码吧?
java事件处理机制(自定义事件)【转】 -
yangbobestone:
...
FreeMarker整合Struts2 -
fddjxllren:
那是因为你没配置事务,楼主的那个主要是针对事务的写法
Spring2.5+JUnit4单元测试
文章列表
AS右键菜单
- 博客分类:
- ActionScript
private function customContextMenu():void {
var help:String="帮助";
var videoResponse:String="反馈功能错误";
var copyRights:String="Copyright ?2008 VSEDU.COM";
var cm:ContextMenu=new ContextMenu ;
var item1:ContextMenuItem=new ContextMenuItem(help) ...
修改Aswing3源码中的AbstractCellEditor.as中的方法
private function __editorComponentFocusLost(e:Event):void{
trace("__editorComponentFocusLost");
stopCellEditing();
}
AS中跨域
- 博客分类:
- ActionScript
AS中跨域问题,可以在加载资源时调用下面的方法,
如myLoad.load(url, getLoaderContext()); //实际导入操作
/**
*返回LoaderContext
* @param checkPolicyFile 是否检测策略文件
* @return
*/
public static function getLoaderContext(checkPolicyFile:Boolean = true):LoaderContext{
return new LoaderContext(checkPolicyFile, Applica ...
/** 隐藏列 */
public function hideColumn($table:JTable, $column:int):void{
$table.getTableHeader().getColumnModel().getColumn($column).setMaxWidth(0);
$table.getTableHeader().getColumnModel().getColumn($column).setMinWidth(0);
$table.getColumnAt(0).setMaxWidth(0);
$table ...
AsWing中JFrame的简单应用
想做一个较为简单的聊天界面,用到了AsWing,发现AsWing不是一会就能掌握的东东。E文好的相对较快点吧。最后效果如下:
整体就3个组件,分别是JFrame,JTextArea,JTextInput。代码如下:
package
{
import flash.display.Sprite;
import org.aswing.JComboBox;
import org.aswing.JTextArea;
import org.aswing.UIManager;
i ...
- 2009-12-05 17:57
- 浏览 3471
- 评论(0)
ASWing JTable双击的问题
- 博客分类:
- AsWing
table.addEventListener(ClickCountEvent.CLICK_COUNT, onClickCount);
private function onClickCount(event:ClickCountEvent):void{
if(event.getCount >= 2){
//处理
}
}
- 2009-11-25 11:39
- 浏览 1623
- 评论(0)
ASWing JComboBox的问题
- 博客分类:
- AsWing
关键是JComboBox选项中显示的内容是通过调用选项对象的toString()方法,所以我们要重写toString()方法就可以了{... _data = [ new Sort(1, "上衣"), new Sort(2, "裤子"), new Sort(3, "鞋子"), ]; _combox = new JComboBox(_data); _combox.addActionListener ...
- 2009-11-25 11:36
- 浏览 2898
- 评论(0)
No.1 Copy content to clipboard:
System.setClipboard(strContent);
No.2 Clone an ArrayCollection:
//dummy solution( well, it works )
var bar:ArrayCollection = new ArrayCollection();
for each ( var i:Object in ac ){
bar.addItem( i );
}
// fantastic ! //
var bar:ListCollectionV ...
- 2009-11-10 14:32
- 浏览 1172
- 评论(0)
package {
import flash.display.Sprite;
import org.aswing.AsWingManager;
import org.aswing.BorderLayout;
import org.aswing.JFrame;
import org.aswing.JPanel;
import org.aswing.JScrollPane;
import org.aswing.JTree;
impo ...
- 2009-10-29 11:46
- 浏览 1783
- 评论(0)
原理很简单,使用replace函数,将要删除的子串替换为空字符即可。用法 :remove ( 原字符串, 要删除的子串);
function remove(str:String, remove:String):String
{
return replace(str, remove, "");
}
- 2009-10-26 11:29
- 浏览 1506
- 评论(0)
功能:将指定字符串中某子串替换成另一个字符串,并返回新字符串。用处极广。用法:replace (原字符串,要替换的子串,用来替换的子串)原字符串为 “Hi, a river is a story “,使用replace (”Hi, a river is a story “,”a”,”their”) ,则返回字符串“Hi, their river is their story”。常常用来替换词,屏蔽不好的用语等。
function replace (str:String, replace:String, replaceWith:String):String
{
var sb:String ...
- 2009-10-26 11:27
- 浏览 1779
- 评论(0)
AS常用的trim函数
- 博客分类:
- ActionScript
常用的trim函数:消除占位空字符函数
用处:删除字符串左右的占位空字符(以下简称空格),比如空格,回车,换行,制表Tab等符号,并返回删除后的String。 代码:
第一个函数:ltrim() 消除字符串左边空格的函数,返回一个新的字符串
function ltrim(str:String):String
{
var size =str.length;
for(var i = 0; i < size; i++)
{
if(str.charCodeAt(i) > 32) //解释:空格,tab,回车,换行charCode小于32
{
return str.su ...
- 2009-10-26 11:24
- 浏览 906
- 评论(0)
图片列表
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="top"
backgroundColor="white">
<mx:Array id="arr"> ...
- 2009-10-14 12:11
- 浏览 4133
- 评论(0)
缩放生成新的图片,需要附件中的gif4j.jar支持
public void zoomPic(File file) throws IOException{
BufferedImage img = ImageIO.read(file);
/** 原始高度 */
int originalHeight = img.getHeight();
/** 原始宽度 */
int originalWidth = img.getWidth();
//将要 ...
- 2009-10-14 11:31
- 浏览 1317
- 评论(0)
Hibernate Session的Flush模式
首先要知道的是:
Hibernate会尽量将与数据库的操作延迟,直到必须要与数据库进行交互,例如save方法一般会在提交时才真正执行,最终在提交时会以批处理的方式与数据库进行交互,以提高效率。 ...
- 2009-10-13 18:16
- 浏览 1633
- 评论(0)