void KVDataTransfer::SetDataSet(const Char_t * name) { //Set dataset to be analysed. //If 'name' is not the name of a valid and available dataset //in the 'source' data repository an error message is printed. fDataSet = 0; KVDataSet *ds = fSourceRep->GetDataSetManager()->GetDataSet(name); if (!ds) { Error("SetDataSet", "Unknown dataset %s", name); } else { SetDataSet(ds); } }
void DataSetValues::ApplyInputDataClass(DataClass* dc) { if (dc && dc->IsDataSet()) { Block::ApplyInputDataClass(dc); DataSet* buf = static_cast<DataSet*>(dc); if (SetDataSet(buf) == true) { Refresh(); //try to load data by default if we can //do this after the parameters updated sets up all our rows/counts/etc. if (buf->GetHasData() && buf->CanRefreshData()) { RefreshData(); } } } }
medGUILutHistogramSwatch::medGUILutHistogramSwatch(mafGUI *parent, wxWindowID id, wxString name, vtkDataSet *dataSet, mmaVolumeMaterial *material, wxSize size, bool showText) :wxPanel(parent,id,wxDefaultPosition, size, wxTAB_TRAVERSAL | wxSIMPLE_BORDER ) { m_ShowThreshold = false; m_OverHighlight = false; m_Highlighted = false; m_Editable = false; m_MouseInWindow = false; m_Tip = ""; SetCursor(*wxCROSS_CURSOR); m_Font = wxFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT)); m_Font.SetPointSize(9); SetMaterial(material); SetDataSet(dataSet); SetListener(parent); //add label only if showText is true if (showText) { wxBoxSizer *sizer = new wxBoxSizer(wxHORIZONTAL); wxStaticText *lab = new wxStaticText(parent, id , name ,wxDefaultPosition, wxSize(LW,LH), wxALIGN_RIGHT | wxST_NO_AUTORESIZE ); sizer->Add( lab, 0, wxRIGHT, LM); sizer->Add( this, 0, wxLEFT, HM); parent->Add(sizer,0,wxEXPAND, M); } else { // wxStaticText *foo_l = new wxStaticText(parent,id, "",wxDefaultPosition, wxSize(4,LH), wxALIGN_RIGHT | wxST_NO_AUTORESIZE); // sizer->Add(foo_l, 0, wxLEFT, 0); wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL); sizer->Add( this, 1, wxEXPAND, HM); parent->Add( sizer, 0, wxEXPAND, LM); } }
void DataSetValues::OnBeforeDataSetRemovedSlot(DataClass *dc) { dc; //assume removing data set for model . . . only one we signed up for the event SetDataSet(NULL); }