def __init__(self, display_frame, x_lab, y_lab, index, name, default_low, default_upp): #, objective_func, normalization, dec_pt=1):

        self.display_frame = display_frame   # Controller.mw.restriction_sf.interior
        self.x_lab = x_lab     # Controller.mw.x_lab
        self.y_lab = y_lab     # Controller.mw.y_lab
        self.index = index     # We will always have restr_dict[index] = DisplayRestriction(... , index, ...)
        self.name = name
        self.default_low = default_low        # remove??
        self.default_upp = default_upp        # remove??
        #self.dec_pt = dec_pt                  # remove?
        
        self.calc_bounds = {}   

        self.left_label_text = tk.StringVar()
        self.left_label_text.set('  '+prettify(self.name)+' : ')
        self.left_label = tk.Label(self.display_frame, textvariable=self.left_label_text)
        
        self.low = tk.DoubleVar()
        self.lower_bound = tk.Entry(self.display_frame, textvariable=self.low, width=5, fg='blue') #user lower bound

        self.upp = tk.DoubleVar()
        self.upper_bound = tk.Entry(self.display_frame, textvariable=self.upp, width=5, fg='blue') #user upper bound

        for eps in ['lower', 'upper']:
            self.calc_bounds[eps] = tk.Label(self.display_frame, bg='white', fg='red', width=5) #calculated lower and upper bounds
            self.calc_bounds[eps].config(text=' ')

        self.right_label_text = tk.StringVar()
        self.right_label_text.set(' : '+prettify(self.name)+'   ')
        self.right_label = tk.Label(self.display_frame, textvariable=self.right_label_text)
 def deselect(self, t):
     if t == 'x':
         self.left_label_text.set('  '+prettify(self.name)+' : ')
         self.x_lab.config(text='x variable: Click left restriction name to select')
     elif t == 'y':
         self.right_label_text.set(' : '+prettify(self.name)+'  ')
         self.y_lab.config(text='y variable: Click right restriction name to select')
     else:
         print('Something\'s wrong')
 def select(self, t):
     if t == 'x':
         self.left_label_text.set('* '+prettify(self.name)+' : ')
         self.x_lab.config(text='x variable: '+prettify(self.name)+pretty_entry_type(self.index[0:2]))
     elif t == 'y':
         self.right_label_text.set(' : '+prettify(self.name)+' *')
         self.y_lab.config(text='y variable: '+prettify(self.name)+pretty_entry_type(self.index[0:2]))
     else:
         print('Something\'s wrong')