ROOT logo
// @(#)root/table:$Id: TColumnView.cxx 21414 2007-12-17 14:15:59Z brun $
// Author: Valery Fine(fine@bnl.gov)   13/03/2000

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#include "TColumnView.h"
#include "TVirtualPad.h"
//______________________________________________________________________________
//
//  TColumnView
//
//  It is a helper class to present TTable object view TBrowser
//______________________________________________________________________________
ClassImp(TColumnView)

//______________________________________________________________________________
TColumnView::TColumnView(const char *colName,TTable *table):TChair(table)
{
   //constructor
   SetName(colName);
}
//______________________________________________________________________________
TColumnView::~TColumnView()
{ 
   //destructor
}
//______________________________________________________________________________
void TColumnView::Browse(TBrowser *)
{
   // Create a column histogram for the simple column
   if (!IsFolder()) 
   {
      Draw(GetName(),"");
      if (gPad) {
         gPad->Modified();
         gPad->Update();
      }
   }
}
//______________________________________________________________________________
TH1 *TColumnView::Histogram(const char *selection)
{
   // Create a histogram from the context menu
   TH1 *h = Draw(GetName(),selection);
   if (gPad) {
      gPad->Modified();
      gPad->Update();
   }
   return h;
}

//______________________________________________________________________________
Bool_t  TColumnView::IsFolder() const 
{ 
   // Treat the column with the pointer to the "Ptr" as a "folder"
   Bool_t isFolder = kFALSE;
   const TTable *thisTable = Table();
   if (thisTable) {
      Int_t cIndx = thisTable->GetColumnIndex(GetName());
      if ((thisTable->GetColumnType(cIndx)) == TTable::kPtr ) isFolder = kTRUE;
   }
   return isFolder;
}
 TColumnView.cxx:1
 TColumnView.cxx:2
 TColumnView.cxx:3
 TColumnView.cxx:4
 TColumnView.cxx:5
 TColumnView.cxx:6
 TColumnView.cxx:7
 TColumnView.cxx:8
 TColumnView.cxx:9
 TColumnView.cxx:10
 TColumnView.cxx:11
 TColumnView.cxx:12
 TColumnView.cxx:13
 TColumnView.cxx:14
 TColumnView.cxx:15
 TColumnView.cxx:16
 TColumnView.cxx:17
 TColumnView.cxx:18
 TColumnView.cxx:19
 TColumnView.cxx:20
 TColumnView.cxx:21
 TColumnView.cxx:22
 TColumnView.cxx:23
 TColumnView.cxx:24
 TColumnView.cxx:25
 TColumnView.cxx:26
 TColumnView.cxx:27
 TColumnView.cxx:28
 TColumnView.cxx:29
 TColumnView.cxx:30
 TColumnView.cxx:31
 TColumnView.cxx:32
 TColumnView.cxx:33
 TColumnView.cxx:34
 TColumnView.cxx:35
 TColumnView.cxx:36
 TColumnView.cxx:37
 TColumnView.cxx:38
 TColumnView.cxx:39
 TColumnView.cxx:40
 TColumnView.cxx:41
 TColumnView.cxx:42
 TColumnView.cxx:43
 TColumnView.cxx:44
 TColumnView.cxx:45
 TColumnView.cxx:46
 TColumnView.cxx:47
 TColumnView.cxx:48
 TColumnView.cxx:49
 TColumnView.cxx:50
 TColumnView.cxx:51
 TColumnView.cxx:52
 TColumnView.cxx:53
 TColumnView.cxx:54
 TColumnView.cxx:55
 TColumnView.cxx:56
 TColumnView.cxx:57
 TColumnView.cxx:58
 TColumnView.cxx:59
 TColumnView.cxx:60
 TColumnView.cxx:61
 TColumnView.cxx:62
 TColumnView.cxx:63
 TColumnView.cxx:64
 TColumnView.cxx:65
 TColumnView.cxx:66
 TColumnView.cxx:67
 TColumnView.cxx:68
 TColumnView.cxx:69