123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- //
- // TeseCaseCell.swift
- // KdanAuto
- //
- // Created by 朱东勇 on 2022/11/21.
- //
- import Foundation
- import AppKit
- class TestFileCellView : NSTableCellView {
- @IBOutlet var _titleLbl : NSTextField!
- @IBOutlet var _sepLine : NSView!
-
- var _title : String!
- var _isExpad: Bool!
- var _typeInfo : NSDictionary!
-
- class func shared() -> TestFileCellView? {
- var objects : NSArray!
-
- Bundle.main.loadNibNamed("TestFileCellView", owner: nil, topLevelObjects: &objects)
-
- for tView in objects {
- if let tv = tView as? TestFileCellView {
- return tv
- }
- }
-
- return nil
- }
-
- override func awakeFromNib() {
- _sepLine.wantsLayer = true;
- _sepLine.layer?.backgroundColor = NSColor.lightGray.cgColor
- }
-
- // Setter & Getter
- public func setTitle(_ title:String) {
- _title = title;
-
- _titleLbl.stringValue = _title ?? ""
- }
-
- public func title() -> String? {
- return _title
- }
-
- public func fileType() -> String? {
- return _title
- }
-
- public func setTypeInfo(_ typeInfo:NSDictionary) {
- _typeInfo = typeInfo
-
- self.setTitle(_typeInfo["Type"] as! String)
- }
-
- public func typeInfo() -> NSDictionary? {
- return _typeInfo
- }
-
- }
|