예제 #1
0
void
CLDisplayClassTable::FinishCreateSelf()
{

	// Validate pointers.
	
	ValidateThis_();
	
	// Do inherited configuration.

	OVTable::FinishCreateSelf();

	// Set up default columns. Number of columns depends on whether
	// class IDs are significant.
	
	VETypeList* typeList = VETypeList::GetTypeList();
	ValidateObject_(typeList);
	
	if (typeList->GetClassIDsSignificant()) {
		InsertCols(2, 0, nil, 0, false);
		SetColWidth(mFrameSize.width - 40, 1, 1);
		SetColWidth(40, 2, 2);
	}
	else {
		InsertCols(1, 0, nil, 0, false);
		SetColWidth(mFrameSize.width, 1, 1);
	}
}
예제 #2
0
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
//		¥ FinishCreateSelf										/*e*/
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// Used to initialize the helper classes.
void CHierarchicalTable::FinishCreateSelf()
{
	SDimension16	frame;

	GetFrameSize(frame);

	SetTableGeometry(new CHierarchicalGeometry(this,frame.width,mRowHeight));
	SetTableSelector(new LTableMultiSelector(this));	

	InsertCols(1,0);
}
void
GLFitParameterTable::SetFitDescription
	(
	const GLFitDescription& fit
	)
{
	RemoveAllRows();
	itsNameList->DeleteAll();
	itsStartValues->RemoveAll();
	itsFitValues->RemoveAll();
	itsErrorValues->RemoveAll();

	GLFitDescription::FitType type = fit.GetType();
	if (fit.RequiresStartValues())
		{
		if (!itsHasStartValues)
			{
			InsertCols(kStartColIndex, 1, kDefColWidth);
			itsColHeaderWidget->SetColTitle(2, kParmStartTitle);
			itsHasStartValues	= kJTrue;
			AdjustColWidth();
			}
		}
	else
		{
		if (itsHasStartValues)
			{
			RemoveCol(kStartColIndex);
			itsHasStartValues	= kJFalse;
			AdjustColWidth();
			}
		}

	const JSize count	= fit.GetParameterCount();
	AppendRows(count);
	for (JIndex i = 1; i <= count; i++)
		{
		JString* str = new JString("");
		fit.GetParameterName(i, str);
		itsNameList->Append(str);
		itsStartValues->AppendElement(0);
		itsFitValues->AppendElement(0);
		itsErrorValues->AppendElement(0);
		}			
}
예제 #4
0
void
PIInspectorTable::FinishCreateSelf()
{

	// Validate pointers.

	ValidateThis_();

	// Do inherited initialization.

	OVTable::FinishCreateSelf();
	
	// Set up default column widths.
	
	InsertCols(2, 0, nil, 0, false);
	SetColWidth(130, 1, 1);
	SetColWidth(150, 2, 2);
	
	// Find inspected object caption.
	
	LWindow* window = LWindow::FetchWindowObject(GetWindowFromPort(GetMacPort()));
	ValidateObject_(window);
	
	mInspectedObjectCaption = dynamic_cast<LStaticText*>(window->FindPaneByID(Pane_InspectedObject));
	if (mInspectedObjectCaption != nil)
		ValidateObject_(mInspectedObjectCaption);
	
	// Find detach selection button.
	
	mDetachPIButton = (dynamic_cast<LBevelButton*>(window->FindPaneByID('DTCH')));
	if (mDetachPIButton != nil) {
		ValidateObject_(mDetachPIButton);
		mDetachPIButton->AddListener(this);
	}

	// Listen to the grow zone.
	
	LGrowZone* growZone = LGrowZone::GetGrowZone();
	ThrowIfNil_(growZone);
	
	growZone->AddListener(this);

}
예제 #5
0
void
CTOutlineTable::FinishCreateSelf()
{
	
	// Validate pointers.
	
	ValidateThis_();
	
	// Let OVTable do its initialization.

	OVTable::FinishCreateSelf();
	
	// Set up default columns.
	
	InsertCols(4, 0, nil, 0, false);
	SetColWidth(120, 1, 1);
	SetColWidth( 48, 2, 2);
	SetColWidth(144, 3, 3);
	SetColWidth(144, 4, 4);

}
void
GLFitParameterTable::ShowStartCol
	(
	const JBoolean show
	)
{
	if (itsHasStartValues == show)
		{
		return;
		}
	if (itsHasStartValues)
		{
		RemoveCol(kStartColIndex);
		itsHasStartValues	= kJFalse;
		AdjustColWidth();
		}
	else
		{
		InsertCols(kStartColIndex, 1, kDefColWidth);
		itsColHeaderWidget->SetColTitle(2, kParmStartTitle);
		itsHasStartValues	= kJTrue;
		AdjustColWidth();
		}
}
예제 #7
0
void CGridRFULimits::_Build()
{
  wxFont fontChannel = GetDefaultCellFont();
  wxFont fontDefault = fontChannel;
  fontChannel.SetWeight(wxFONTWEIGHT_BOLD);
  const CChannelColors *pChannelColors = NULL;
  int nCurrentColCount = GetNumberCols();
  int i;
  int j;
  if(nCurrentColCount < m_nCOL_COUNT)
  {
    InsertCols(m_nCOL_CHANNEL_START, m_nCOL_COUNT - nCurrentColCount);
    _UpdateReadOnly();
  }
  else if(nCurrentColCount > m_nCOL_COUNT)
  {
    DeleteCols(m_nCOL_CHANNEL_START,nCurrentColCount - m_nCOL_COUNT);
  }
  InitValidators();
  SetDefaultCellValidator(
    new nwxGridCellUIntRangeValidator(
      mainApp::RFU_MIN_ENTER,mainApp::RFU_MAX_ENTER,true));
  nwxGridCellUIntRangeValidator *pVreqd =
    new nwxGridCellUIntRangeValidator(
      mainApp::RFU_MIN_ENTER,mainApp::RFU_MAX_ENTER,false); // does not allow empty
  SetCellValidator(pVreqd,ROW_RFU_MIN,m_nCOL_SAMPLE);
  SetCellValidator(pVreqd,ROW_RFU_MIN,m_nCOL_ILS);
  SetCellValidator(pVreqd,ROW_RFU_MIN,m_nCOL_LADDER);

  EnableDragColSize(false);
  EnableDragRowSize(false);
  SetDefaultCellAlignment(wxALIGN_RIGHT,wxALIGN_CENTRE);
  for(i = 0; i < ROW_COUNT; i++)
  {
    for(j = 0; j < m_nCOL_COUNT; j++)
    {
      SetCellValue(i,j,"00000000"); // used for size
      if(_DisabledCell(i,j))
      {
        SetCellBackgroundColour(i,j,GetGridLineColour());
      }
    }
  }
  SetDefaultEditor(new wxGridCellFloatEditor(1,0));
  SetColLabelValue(m_nCOL_SAMPLE,"Sample");
  SetColLabelValue(m_nCOL_LADDER,"Ladder");
  SetColLabelValue(m_nCOL_ILS,"   ILS   ");
  SetRowLabelValue(ROW_RFU_MIN,"Analysis Threshold (RFU)");
  SetRowLabelValue(ROW_RFU_INTERLOCUS,"Min. Interlocus RFU");
  SetRowLabelValue(ROW_RFU_MAX,"Max. RFU");
  SetRowLabelValue(ROW_DETECTION,"Detection Threshold (RFU)");
  SetRowLabelAlignment(wxALIGN_LEFT, wxALIGN_CENTRE);
  SetMargins(0,0);
  ChannelNumberIterator itrChannelCol;
  int nCol;
  const wxChar *psDye = NULL;
  wxString sLabel;
  for(itrChannelCol = m_vnChannelNumbers.begin(), 
          nCol = m_nCOL_CHANNEL_START;
    itrChannelCol != m_vnChannelNumbers.end();
    ++itrChannelCol, ++nCol)
  {
    if(m_pKitColors != NULL)
    {
      pChannelColors = m_pKitColors->GetColorChannel(*itrChannelCol);
      psDye = (pChannelColors == NULL) ? NULL : (const wxChar *) pChannelColors->GetDyeName();
    }
    CGridLocusColumns::FORMAT_CHANNEL_DYE(&sLabel,*itrChannelCol,psDye);
    SetColLabelValue(nCol,sLabel);
    if(pChannelColors != NULL)
    {
      _SetupChannelColumn(nCol,pChannelColors->GetColorAnalyzed(),fontChannel);
    }
    else
    {
      _SetupDefaultChannelColumn(nCol);
    }
  }
  nwxGrid::UpdateLabelSizes(this);
  AutoSize();
  _DisableUnused();
}