PageRenderTime 35ms CodeModel.GetById 27ms app.highlight 3ms RepoModel.GetById 4ms app.codeStats 0ms

/ConnectionsCollectionView/IconCollectionItem.m

http://github.com/bububa/MongoHub-Mac
Objective C | 30 lines | 17 code | 5 blank | 8 comment | 4 complexity | 280c13be25f3fa27dd16526ffc01e227 MD5 | raw file
 1//
 2//  IconCollectionItem.m
 3//  SEOBox
 4//
 5//  Created by Syd on 10-2-28.
 6//  Copyright 2010 MusicPeace.ORG. All rights reserved.
 7//
 8
 9#import "IconCollectionItem.h"
10#import "IconViewBox.h"
11
12@implementation IconCollectionItem
13
14-(void)setSelected:(BOOL)flag {
15    [super setSelected:flag];
16    
17    // tell the view that it has been selected
18    IconViewBox* theView = (IconViewBox* )[self view];
19    if([theView isKindOfClass:[IconViewBox class]]) {
20        [theView setSelected:flag];
21        [theView setNeedsDisplay:YES];
22    }
23}
24
25- (void)doubleClick:(id)sender {
26	if([self collectionView] && [[self collectionView] delegate] && [[[self collectionView] delegate] respondsToSelector:@selector(doubleClick:)]) {
27		[[[self collectionView] delegate] performSelector:@selector(doubleClick:) withObject:self];
28	}
29}
30@end