Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Java程序分享区 » 工具  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
reply to topicflat modethreaded modego to previous topicgo to next topicgo to back
话题被移动
该话题已被移动 - tzutolin , 2005-12-13 14:25
如果您尚不清楚该话题被移动的原因,请参考论坛规则以及本版公告或者联系本版版主。
作者 【home-made】 Swing视感外挂 v0.3 [精华]
Jove



CJSDN高级会员


发贴: 1228
于 2004-02-24 11:29 user profilesend a private message to userreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
简介:
这是一个很简单的小程序,作用是修改某个swing程序预设的 LookAndFeel,而不需要动他的代码或字节码

使用方法:
运行exe,如果是Linux则java -jar SwingNOW.exe 或 java -cp SwingNOW.exe SwingNOW
单击ClassPath,指定一个或多个jar(或等同的zip,exe), 它会试图读出Main Class,如果未遂,只好劳您自己输入
new 如果该jar指定了Class-Path,会把那些jar也试图加入
new 支持拖放,即从资源管理器中选中一个或多个jar,拖放到此软件即可完成Class-Path和Main-Class的设置
Delay是指执行那个程序后多少秒后改成你希望的lookandfeel,建议选择2秒以上
Repeat是指每隔一定时间强行设定你指定的LookAndFeel
按下Run启动你指定的Swing程序, 在${delay}秒后,修改其当前 LookAndFeel
并在当前目录产生一个properties文件,下次启动时使用该文件的设置

自带Alloy和Borland的LookAndFeel
new 支持动态加载其他lookandfeel, 按下LookAndFeel选择框旁的..按钮
选择本地的一个或多个lookandfeel包(jar),程序会搜索到包中的LookAndFeel类,动态加载他们
无需关闭重新运行,即可尝试新的LookAndFeel
【推荐】可从 http://javootoo.l2fprod.com/ 下载大量免费LookAndFeel: Liquid,Kunststoff,JGoodies ..
注:
为表示对某大侠的滔滔敬意,特为本软件起名 SwingNOW! Big Smile
参考链接 http://www.cjsdn.com/post/view?bid=32&id=79587&tpg=1&ppg=1&sty=0&age=0#79587

Change Log:
2004-02-29 version 0.3
add support for drag and drop
add support for non-build-in lookandfeel, dynamic lookandfeel loading
bug fix

2004-02-26 version 0.2
add Borland LookAndFeel
add ArgoUML support (put argouml.jar and SwingNOW.exe in the same folder)
auto Class-Path and Main-Class discover, multi jar add/remove
change the title of active window(if possible) while updating UI
bug fix

2004-02-24 version 0.1
Initial Release



SwingNOW.exe (457.16k)


Jove edited on 2004-03-01 18:22

作者 Re:【home-made】 Swing视感外挂 [Re:Jove]
wes109

以梦为马

CJSDN高级会员


发贴: 857
于 2004-02-25 10:07 user profilesend a private message to userreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
ArgoUML-0.14

搞不定:Sad

(缩略图,点击图片链接看原图)



作者 Re:【home-made】 Swing视感外挂 [Re:wes109]
Jove



CJSDN高级会员


发贴: 1228
于 2004-02-25 10:37 user profilesend a private message to userreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
sigh, 没处理好ClassLoader,一会儿再改改代码

你先用命令行试试 java -cp argouml.jar;swingNOW.exe jove.swinglauncher.SwingAppLauncher
<必要时,或许还需要目录下的别的jar>

argouml的启动似乎要做很多工作,建议把delay值改成5
或许会发现有些panel的Lnf不统一,请海涵 Sad



作者 Re:【home-made】 Swing视感外挂 [Re:wes109]
rainman

阿熊

元老


发贴: 5644
于 2004-02-25 10:42 user profilesend a private message to userreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list




作者 Re:【home-made】 Swing视感外挂 [Re:Jove]
wes109

以梦为马

CJSDN高级会员


发贴: 857
于 2004-02-25 12:50 user profilesend a private message to userreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
起来了,但基本没法用呀

启动的时候就报很多错误

菜单没了:(

(缩略图,点击图片链接看原图)



作者 Re:【home-made】 Swing视感外挂 [Re:Jove]
wes109

以梦为马

CJSDN高级会员


发贴: 857
于 2004-02-25 12:52 user profilesend a private message to userreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
hehe

应该是alloy的bug

选windows look and feel就没有问题:)



作者 Re:【home-made】 Swing视感外挂 [Re:Jove]
wes109

以梦为马

CJSDN高级会员


发贴: 857
于 2004-02-25 13:11 user profilesend a private message to userreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
现在通过修改argo.user.properties实现了

用alloy也没有问题

看来还是查一下你的code吧 Smile



作者 Re:【home-made】 Swing视感外挂 [Re:wes109]
Jove



CJSDN高级会员


发贴: 1228
于 2004-02-25 16:31 user profilesend a private message to userreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
sigh, ArgoUML中喜欢用ClassLoader.getSystemResourceAsStream(..)
如果是MyClass.class.getResourceAsStream(..)就好了
那些资源文件都在argouml.jar中,何苦非要用getSystemResourceAsStream Stupid

Sad



作者 Re:【home-made】 Swing视感外挂 [Re:Jove]
wes109

以梦为马

CJSDN高级会员


发贴: 857
于 2004-02-25 17:36 user profilesend a private message to userreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
没关系,搞定了 :)

(缩略图,点击图片链接看原图)



作者 Re:【home-made】 Swing视感外挂 [Re:wes109]
Jove



CJSDN高级会员


发贴: 1228
于 2004-02-29 23:37 user profilesend a private message to userreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
version 0.3 Big Smile

Liquid LookAndFeel



作者 Re:【home-made】 Swing视感外挂 v0.3 [Re:Jove]
floater

Java Jedi

总版主


发贴: 3233
于 2004-03-01 05:49 user profilesend a private message to userreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Good job, Jove!

I love this kind of non-invasive tools. Neat!



"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
- Martin Fowler, Refactoring - Improving the Design of Existing Code
作者 Re:【home-made】 Swing视感外挂 [Re:Jove]
wes109

以梦为马

CJSDN高级会员


发贴: 857
于 2004-03-01 09:51 user profilesend a private message to userreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Jove wrote:
version 0.3 Big Smile

Liquid LookAndFeel


wo kao !!

简直就是绝配!!!
太棒了!!!



作者 Re:【home-made】 Swing视感外挂 v0.3 [Re:Jove]
Starcraft

Think Liquid!



发贴: 376
于 2004-04-27 15:47 user profilesend a private message to userreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
才看见,支持一把,好东西Smile


Think BIG while I am still SMALL.
作者 Re:【home-made】 Swing视感外挂 v0.3 [Re:Jove]
云动



发贴: 0
于 2004-06-11 16:14 user profilesend a private message to userreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
好东西


作者 Re:【home-made】 Swing视感外挂 v0.3 [Re:Jove]
javatalker





发贴: 15
于 2004-06-16 10:44 user profilesend a private message to userreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
能讲讲实现的原理吗?最好能把源码公布一下


作者 Re:【home-made】 Swing视感外挂 v0.3 [Re:javatalker]
Jove



CJSDN高级会员


发贴: 1228
于 2004-06-16 11:35 user profilesend a private message to userreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
时隔半年,有些细节记不清了
大致思路是,使用该程序调用某Swing程序的main方法,过一段时间用KeyboardFocusManager.getCurrentKeyboardFocusManager().getActiveWindow();得到当前主界面,设置其LookAndFeel。
其实这部分的代码倒很简单,程序很多工作是在做LookAndFeel的动态载入,配置的载入和初始化等。

源代码如下 (代码比较简陋,见谅)

src.zip (10.87k)


Jove edited on 2004-06-16 11:48


reply to topicflat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923