<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>Tools/nib2cib/NSColorWell.j</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -38,6 +38,7 @@ var _CPColorWellDidBecomeExclusiveNotification = @&quot;_CPColorWellDidBecomeExclusiv
 @implementation CPColorWell : CPControl
 {
     BOOL    _active;
+    BOOL    _bordered;
     
     CPColor _color;
     CPView  _wellView;
@@ -50,30 +51,56 @@ var _CPColorWellDidBecomeExclusiveNotification = @&quot;_CPColorWellDidBecomeExclusiv
     if (self)
     {
         _active = NO;
-        
+        _bordered = YES;
         _color = [CPColor whiteColor];
         
         [self drawBezelWithHighlight:NO];
         [self drawWellInside:CGRectInset([self bounds], 3.0, 3.0)];
         
-        var defaultCenter = [CPNotificationCenter defaultCenter];
-        
-        [defaultCenter
-            addObserver:self
-               selector:@selector(colorWellDidBecomeExclusive:)
-                   name:_CPColorWellDidBecomeExclusiveNotification
-                 object:nil];
-
-        [defaultCenter
-            addObserver:self
-               selector:@selector(colorPanelWillClose:)
-                   name:CPWindowWillCloseNotification
-                 object:[CPColorPanel sharedColorPanel]];
+        [self _registerForNotifications];
     }
     
     return self;
 }
 
+- (void)_registerForNotifications
+{
+    var defaultCenter = [CPNotificationCenter defaultCenter];
+
+    [defaultCenter
+        addObserver:self
+           selector:@selector(colorWellDidBecomeExclusive:)
+               name:_CPColorWellDidBecomeExclusiveNotification
+             object:nil];
+
+    [defaultCenter
+        addObserver:self
+           selector:@selector(colorPanelWillClose:)
+               name:CPWindowWillCloseNotification
+             object:[CPColorPanel sharedColorPanel]];
+}
+
+/*!
+    Returns whether the color well is bordered
+*/
+- (BOOL)isBordered
+{
+    return _bordered;
+}
+
+/*!
+    Sets the color well's current color.
+*/
+- (void)setBordered:(BOOL)bordered
+{
+    if (_bordered == bordered)
+        return;
+        
+    _bordered = bordered;
+    
+    [self drawWellInside:CGRectInset([self bounds], 3.0, 3.0)];
+}
+
 // Managing Color From Color Wells
 
 /*!
@@ -226,3 +253,51 @@ var _CPColorWellDidBecomeExclusiveNotification = @&quot;_CPColorWellDidBecomeExclusiv
 }
 
 @end
+
+var CPColorWellColorKey     = &quot;CPColorWellColorKey&quot;,
+    CPColorWellBorderedKey  = &quot;CPColorWellBorderedKey&quot;;
+
+@implementation CPColorWell (CPCoding)
+
+/*!
+    Initializes the color well by unarchiving data from &lt;code&gt;aCoder&lt;/code&gt;.
+    @param aCoder the coder containing the archived &lt;objj&gt;CPColorWell&lt;/objj&gt;.
+*/
+- (id)initWithCoder:(CPCoder)aCoder
+{
+    self = [super initWithCoder:aCoder];
+    
+    if (self)
+    {
+        _active = NO;
+        _bordered = [aCoder decodeObjectForKey:CPColorWellBorderedKey];
+        _color = [aCoder decodeObjectForKey:CPColorWellColorKey];
+        
+        [self _registerForNotifications];
+    }
+    
+    return self;
+}
+
+/*!
+    Archives this button into the provided coder.
+    @param aCoder the coder to which the color well's instance data will be written.
+*/
+- (void)encodeWithCoder:(CPCoder)aCoder
+{
+    // We do this in order to avoid encoding the _wellView, which 
+    // should just automatically be created programmatically as needed.
+    var actualSubviews = _subviews;
+    
+    _subviews = [_subviews copy];
+    [_subviews removeObjectIdenticalTo:_wellView];
+    
+    [super encodeWithCoder:aCoder];
+    
+    _subviews = actualSubviews;
+    
+    [aCoder encodeObject:_color forKey:CPColorWellColorKey];
+    [aCoder encodeObject:_bordered forKey:CPColorWellBorderedKey];
+}
+
+@end</diff>
      <filename>AppKit/CPColorWell.j</filename>
    </modified>
    <modified>
      <diff>@@ -23,6 +23,7 @@
 @import &quot;NSButton.j&quot;
 @import &quot;NSCell.j&quot;
 @import &quot;NSColor.j&quot;
+@import &quot;NSColorWell.j&quot;
 @import &quot;NSControl.j&quot;
 @import &quot;NSCustomObject.j&quot;
 @import &quot;NSCustomView.j&quot;</diff>
      <filename>Tools/nib2cib/NSAppKit.j</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>1457f5d1c89bd293c34f55bdc19e385936742fab</id>
    </parent>
  </parents>
  <author>
    <name>Tom Robinson</name>
    <email>tom@280north.com</email>
  </author>
  <url>http://github.com/280north/cappuccino/commit/ed5aa5b54c03d8e0b11913312667b0fdff2412e7</url>
  <id>ed5aa5b54c03d8e0b11913312667b0fdff2412e7</id>
  <committed-date>2008-10-28T01:08:07-07:00</committed-date>
  <authored-date>2008-10-28T01:08:07-07:00</authored-date>
  <message>CPColorWell coding and nib2cib support.</message>
  <tree>6ca818cb132124ae48081e828a658aad251d5383</tree>
  <committer>
    <name>Tom Robinson</name>
    <email>tom@280north.com</email>
  </committer>
</commit>
