2006-09-04 18:06:23 +00:00
|
|
|
//
|
|
|
|
// PreferencePane.m
|
|
|
|
// Preferences
|
|
|
|
//
|
2006-09-04 18:46:18 +00:00
|
|
|
// Created by Vincent Spader on 9/4/06.
|
|
|
|
// Copyright 2006 Vincent Spader. All rights reserved.
|
2006-09-04 18:06:23 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
#import "PreferencePane.h"
|
|
|
|
|
|
|
|
|
|
|
|
@implementation PreferencePane
|
|
|
|
|
2007-02-28 00:35:27 +00:00
|
|
|
+ (PreferencePane *)preferencePaneWithView:(NSView *)v name:(NSString *)n icon:(NSString *)i
|
|
|
|
{
|
|
|
|
PreferencePane *pane = [[[PreferencePane alloc] init] autorelease];
|
|
|
|
if (pane)
|
|
|
|
{
|
|
|
|
[pane setView:v];
|
|
|
|
[pane setName:n];
|
|
|
|
[pane setIcon:i];
|
|
|
|
}
|
|
|
|
|
|
|
|
return pane;
|
|
|
|
}
|
|
|
|
|
2006-09-04 18:06:23 +00:00
|
|
|
- (NSView *)paneView
|
|
|
|
{
|
|
|
|
return view;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (NSString *)paneName
|
|
|
|
{
|
|
|
|
return name;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (NSImage *)paneIcon
|
|
|
|
{
|
|
|
|
return icon;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (NSString *)paneToolTip
|
|
|
|
{
|
|
|
|
return nil;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (BOOL)allowsHorizontalResizing
|
|
|
|
{
|
|
|
|
return NO;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (BOOL)allowsVerticalResizing
|
|
|
|
{
|
|
|
|
return NO;
|
|
|
|
}
|
|
|
|
|
2007-02-28 00:35:27 +00:00
|
|
|
- (void)setView:(NSView *)v
|
|
|
|
{
|
|
|
|
[v retain];
|
|
|
|
[view release];
|
|
|
|
view = v;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void)setName:(NSString *)n
|
2006-09-04 18:06:23 +00:00
|
|
|
{
|
2007-02-28 00:35:27 +00:00
|
|
|
[n retain];
|
2006-09-04 18:06:23 +00:00
|
|
|
[name release];
|
2007-02-28 00:35:27 +00:00
|
|
|
name = n;
|
2006-09-04 18:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
- (void)setIcon:(NSString *)i
|
|
|
|
{
|
|
|
|
[icon release];
|
|
|
|
icon = [[NSImage alloc] initWithContentsOfFile:[[NSBundle bundleForClass:[self class]] pathForImageResource:i]];
|
|
|
|
}
|
|
|
|
|
|
|
|
@end
|