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).
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.
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.
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结合起来了。
Pluggable Look And Feel
UI Delegates 主要是把viewer和controller结合起来了。
Pluggable Look And Feel

