private void populateTable()
{
//Create Labels
_tableName = new PlainSimpleTextFigure (_tableModel.Name);
_tableName.SetAttribute (FigureAttribute.FontSize, 7);
_tableName.SetAttribute (FigureAttribute.FontColor, new Cairo.Color (0, 0, 0.501961));
//TODO: don't change name at each letter changed
_tableName.TextChanged += delegate { Model.Name = _tableName.Text; };
_indexLabel = new PlainSimpleTextFigure ("Indexes");
_indexLabel.SetAttribute (FigureAttribute.FontColor, new Cairo.Color (0, 0, 0.501961));
_indexLabel.SetAttribute (FigureAttribute.FontSize, 6);
_triggerLabel = new PlainSimpleTextFigure ("Triggers");
_triggerLabel.SetAttribute (FigureAttribute.FontColor, new Cairo.Color (0, 0, 0.501961));
_triggerLabel.SetAttribute (FigureAttribute.FontSize, 6);
//Add Table Columns & Name
this.Add (_tableName);
_tableName.MoveTo (DisplayBox.X + 2, DisplayBox.Y + 2);
foreach (AbstractColumnFigure col in _tableModel.columns) {
this.Add (col);
}
//TODO: Add/Detect Foreign Keys that table model have
//Add Table Indexes Label (items added at ButtonHandle)
this.Add (_indexLabel);
//Add Table Triggers Label (items added at ButtonHandle)
this.Add (_triggerLabel);
OnFigureChanged (new FigureEventArgs (this, DisplayBox));
}