home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula
/
nebula.bin
/
SourceCode
/
Palettes
/
Clocks
/
Inspectors.subproj
/
CalendarClockInspector.m
< prev
next >
Wrap
Text File
|
1992-12-05
|
4KB
|
127 lines
//----------------------------------------------------------------------------------------------------
//
// CalendarClockInspector
//
// Inherits From: ClockInspector
//
// Declared In: CalendarClockInspector.h
//
// Disclaimer
//
// You may freely copy, distribute and reuse this software and its
// associated documentation. I disclaim any warranty of any kind,
// expressed or implied, as to its fitness for any particular use.
//
//----------------------------------------------------------------------------------------------------
#import "CalendarClockInspector.h"
#import "CalendarClock.h"
@implementation CalendarClockInspector
//----------------------------------------------------------------------------------------------------
// Private Methods
//----------------------------------------------------------------------------------------------------
+ (const char*) _nib
{
return "CalendarClockInspector";
}
- _validateOptions
{
if ([[options findCellWithTag: 0] state])
{
[[options findCellWithTag:1] setEnabled: YES];
[[options findCellWithTag:2] setEnabled: YES];
[[options findCellWithTag:3] setEnabled: YES];
}
else
{
[[options findCellWithTag:1] setEnabled: NO];
[[options findCellWithTag:2] setEnabled: NO];
[[options findCellWithTag:3] setEnabled: NO];
}
return self;
}
//----------------------------------------------------------------------------------------------------
// Reverting Attributes
//----------------------------------------------------------------------------------------------------
- revertOptions
{
[[options findCellWithTag:0] setState:[object isDisplayEnabled]];
[[options findCellWithTag:1] setState:[object wantsSeconds]];
[[options findCellWithTag: 2] setState:[object wantsYear]];
[[options findCellWithTag: 3] setState:[object wantsMilitaryTime]];
[[options findCellWithTag: 4] setState:[object isDraggable]];
[[options findCellWithTag: 5] setState:[object willAcceptDrop]];
[[options findCellWithTag: 6] setState:[object _timerMode]];
[[options findCellWithTag: 7] setState:[object activateOnAwake]];
[self _validateOptions];
return self;
}
- revertDisplay
{
[colorOrImage selectCellWithTag: [object _backgroundIsColor]];
[backgroundImage image: [object backgroundImage]];
[backgroundColor setColor: [object backgroundColor]];
[timecolor setColor: [object timeColor]];
[datecolor setColor: [object dateColor]];
[weekdaycolor setColor: [object weekdayColor]];
[monthcolor setColor: [object monthColor]];
return self;
}
//----------------------------------------------------------------------------------------------------
// Setting Attributes
//----------------------------------------------------------------------------------------------------
- setClockOptions: sender
{
[object setDisplayEnabled: [[options findCellWithTag:0] state]];
[object wantsSeconds: [[options findCellWithTag:1] state]];
[object wantsYear: [[options findCellWithTag:2] state]];
[object wantsMilitaryTime: [[options findCellWithTag:3] state]];
[object isDraggable: [[options findCellWithTag:4] state]];
[object willAcceptDrop: [[options findCellWithTag:5] state]];
[object _timerMode: [[options findCellWithTag:6] state]];
[object activateOnAwake: [[options findCellWithTag:7] state]];
[self _validateOptions];
return [self ok:nil];
}
- setTimeColor: sender
{
[object timeColor: [sender color]];
return [self ok:nil];
}
- setDateColor: sender
{
[object dateColor: [sender color]];
return [self ok:nil];
}
- setWeekdayColor: sender
{
[object weekdayColor: [sender color]];
return [self ok:nil];
}
- setMonthColor: sender
{
[object monthColor: [sender color]];
return [self ok:nil];
}
@end