Swing编程学习(二)

MVC,我接触和了解这个名词是从Web的开发模式的时候开始接触的。准确的说,MVC不是一种开发模式,而是一种开发架构。MVC起源于SmartTalk中的GUI编程。
 
Controller和Viewer没什么太多好说的,至于Model,Swing定义了许多custom models,这些数据模型为swing 编程提供了许多方便。举几个例子。
 
ButtonModel
Used by: All AbstractButton subclasses.
Stores: A boolean representing whether the button is selected (armed) or unselected (disarmed).
 
TreeModel
Used by: JTree.
Stores: Objects that can be displayed in a tree. Implementations must be able to distinguish between branch and leaf objects, and the objects must be organized hierarchically.
 
Document
Used by: All text components.Stores: Content. Normally this is text (character data). More complex implementations support styled text, images, and other forms of content (such as embedded components).
 

UI Delegates

Swing packages each component’s view and controller into an object called a UI delegate.
UI Delegates 主要是把viewer和controller结合起来了。
y1pnein_qeE00rolukWkl_dtNORZcKG3F0ZiXpQKL2dgtW4qhK3IFq7U-0ofSWZYa4s 
Pluggable Look And Feel

7DBDF42EE58F4A79!225:thumbnail

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值