home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2008 March / MAC_easy_03_08.iso / Software / Shareware / Isolator-3.3.dmg / Docs / Source Code / TextColourForBool.m < prev   
Encoding:
Text File  |  2008-06-04  |  475 b   |  32 lines

  1. //
  2. //  TextColourForBool.m
  3. //  Isolator
  4. //
  5. //  Created by Ben Willmore on 13/02/2007.
  6. //  Copyright 2007 __MyCompanyName__. All rights reserved.
  7. //
  8.  
  9. #import "TextColourForBool.h"
  10.  
  11. @implementation TextColourForBool
  12.  
  13. + (Class)transformedValueClass;
  14. {
  15.     return [NSColor class];
  16. }
  17.  
  18. + (BOOL)allowsReverseTransformation;
  19. {
  20.     return NO;   
  21. }
  22.  
  23. - (id)transformedValue:(id)value;
  24. {
  25.     if ([value boolValue])
  26.         return [NSColor blackColor];
  27.     else
  28.         return [NSColor grayColor];
  29. }
  30.  
  31. @end
  32.