Example #1
0
    def activate_template(self):
        """ Converts all contained 'TDerived' objects to real objects using the
            template traits of the object. This method must be overridden in
            subclasses.
            
            Returns
            -------
            None
        """
        plots = []
        i = 0
        for r in range(self.rows):
            row = []
            for c in range(self.columns):
                plot = self.scatter_plots[i].plot
                if plot is None:
                    plot = PlotComponent()
                row.append(plot)
                i += 1
            plots.append(row)

        self.plot = GridPlotContainer(shape=(self.rows, self.columns))
        self.plot.component_grid = plots
 def __init__(self, preferred_size=None, *args, **kw):
     if preferred_size is not None:
         self.fixed_preferred_size = preferred_size
     PlotComponent.__init__(self, *args, **kw)
 def get_preferred_size(self):
     if self.fixed_preferred_size is not None:
         return self.fixed_preferred_size
     else:
         return PlotComponent.get_preferred_size(self)
 def __init__(self, bounds, *args, **kw):
     kw["bounds"] = bounds
     if not kw.has_key("resizable"):
         kw["resizable"] = ""
     PlotComponent.__init__(self, *args, **kw)
     return