代码如下import Java.awt.Component; import java.awt.Dimension; import java.awt.FontMetrics; import javax.swing.JLabel; import javax.swing.JTable;...
分类:
编程语言 时间:
2014-11-17 10:36:29
阅读次数:
181
void Main(){ Component root = new Composite(); Component nodeA = new Composite(); Component nodeB = new Composite(); root.Add(nodeA); r...
分类:
其他好文 时间:
2014-11-17 10:30:41
阅读次数:
148
void Main(){ Component c1 = new Component(); Decorator da = new DecoratorA(); da.Decorate(c1); Decorator db = new DecoratorB(); db.Deco...
分类:
其他好文 时间:
2014-11-17 10:17:43
阅读次数:
147
装饰模式(Decorator):动态地给一个对象添加一些额外的职责,就增加功能来说,装饰模式比生成子类更为灵活。装饰模式结构图:装饰模式实现代码: /// /// 声明一个Component的抽象基类 /// abstract class Component { ...
分类:
其他好文 时间:
2014-11-16 22:51:31
阅读次数:
256
packageorg.xnat.dao;importjava.util.List;importjava.util.Map;importorg.apache.ibatis.annotations.Param;importorg.springframework.stereotype.Component;importorg.xnat.dao.util.AutoMap;importorg.xnat.dao.util.Page;/***不直接用此baseDao外部访问数据用baseDaoUtil..
分类:
其他好文 时间:
2014-11-16 18:56:02
阅读次数:
235
珍爱生命,远离折腾!一、怎么显示歌词。①官网下载安装component: Lyric Show Panel 3,不多解释。②设置一个显示歌词的快捷键Ctrl + L:二、改个背景颜色,因为白色太剌眼。①用到 PhotoShop CS6中的颜色库功能:②设置foobar的Text 以及 Backgro...
分类:
其他好文 时间:
2014-11-15 18:20:34
阅读次数:
220
using System.Collections.Generic;namespace DesignPattern.Structural.Composite{ public abstract class Component { public virtual void Show...
分类:
其他好文 时间:
2014-11-14 19:38:44
阅读次数:
155
namespace DesignPattern.Structural.Decorator{ public class Component { public virtual void Show() { } } public class Decorator:Comp...
分类:
其他好文 时间:
2014-11-14 19:20:42
阅读次数:
168
SpringMVC回归MVC本质,简简单单的Restful式函数,没有任何基类之后,应该是传统Request-Response框架中最好用的了。Tips1.事务失效的惨案Spring MVC最打击新人的事情,你必须保证spring-mvc.xml的context:component-scan只扫描C...
分类:
编程语言 时间:
2014-11-14 17:38:34
阅读次数:
322
问题如下方式可以成功扫描到@Controller注解的Bean,不会扫描@Service/@Repository的Bean。正确Java代码但是如下方式,不仅仅扫描@Controller,还扫描@Service/@Repository的Bean,可能造成一些问题Java代码这个尤其在springmv...
分类:
其他好文 时间:
2014-11-14 17:08:57
阅读次数:
172