// Copyright (C) 19956
// Use is governed by the MiscKit license

#import "MiscTabMatrixPalette.h"
#import "MiscTabActionCell.subproj/MiscTabActionCell.h"

@implementation  MiscTabMatrixPalette

- (void)finishInstantiate
{
    NSRect              frameRect;
    NSMatrix             *newMatrix;

    frameRect = [matrix frame];

    newMatrix =
        [[NSMatrix allocWithZone:[self zone]] initWithFrame:frameRect mode:NSRadioModeMatrix prototype:[[MiscTabActionCell allocWithZone:[self zone]] initTextCell:@"Folder Tab"] numberOfRows:1 numberOfColumns:2];

    [[matrix superview] replaceSubview:matrix with:newMatrix];

    [matrix release];

    matrix = newMatrix;

 // set the background gray of tabMatrix to NX_DKGRAY 
    [matrix setBackgroundColor:[NSColor darkGrayColor]];

 // set the autosizing and autoscrolling attributes of the matrix 
    [matrix setAutoresizingMask:NSViewWidthSizable];
    [matrix setAutoscroll:YES];

 // size tabMatrix to its cells, resize matrix so that nice NX_DKGRAY border
 // frames tabs, and display it 
    [matrix sizeToFit];
    [matrix setAutosizesCells:YES];
   // [matrix sizeBy:0.0 :4.0];
    [matrix display];    

}

@end
