class_docstr: The JoinerController managers a joiner setting
class_docstr_tok: ["The","JoinerController","managers","a","joiner","setting"]
docstr: Update the control to match the setting
docstr_tok: ["Update","the","control","to","match","the","setting"]
code: def update(self):
      """Update the control to match the setting"""
      column_names = self.column_names
      joins = self.joins
      if len(joins) == 0:
          joins = [dict([(cn, "") for cn in column_names])]
  
      all_subcontrols = {}
      self.panel.Sizer.Clear()
      for ctrl in self.panel.GetChildren():
          assert isinstance(ctrl, wx.Window)
          all_subcontrols[ctrl.GetName()] = False
  
      for i, column_name in enumerate(column_names):
          header_control_name = self.get_header_control_name(i)
          ctrl = self.panel.FindWindowByName(header_control_name)
          if ctrl is None:
              ctrl = wx.StaticText(
                  self.panel, -1, column_name, name=header_control_name
              )
          else:
              ctrl.Label = column_name
          self.panel.Sizer.Add(
              ctrl,
              row=0,
              col=i,
              flag=wx.ALIGN_CENTER_HORIZONTAL | wx.ALIGN_BOTTOM,
          )
          all_subcontrols[header_control_name] = True
  
      for i, join in enumerate(joins):
          for j, column_name in enumerate(column_names):
              choice_ctrl_name = self.get_choice_control_name(i, j)
              ctrl = self.panel.FindWindowByName(choice_ctrl_name)
              selection = join.get(column_name, self.DISPLAY_NONE)
              if selection is None:
                  selection = self.DISPLAY_NONE
              choices = sorted(self.v.entities.get(column_name, []))
              if self.v.allow_none:
                  choices += [self.DISPLAY_NONE]
              if selection not in choices:
                  choices += [selection]
              if ctrl is None:
                  ctrl = wx.Choice(
                      self.panel,
                      -1,
                      choices=choices,
                      name=choice_ctrl_name,
                  )
                  ctrl.Bind(
                      wx.EVT_CHOICE,
                      lambda event, row=i, col=j: self.on_choice_changed(
                          event, row, col
                      ),
                  )
              else:
                  ctrl.SetItems(choices)
              ctrl.SetStringSelection(selection)
              self.panel.Sizer.Add(
                  ctrl, row=i + 1, col=j, flag=wx.ALIGN_BOTTOM
              )
              all_subcontrols[choice_ctrl_name] = True
  
          add_button_name = self.get_add_button_control_name(i)
          ctrl = self.panel.FindWindowByName(add_button_name)
          if ctrl is None:
              ctrl = wx.Button(
                  self.panel,
                  -1,
                  "+",
                  name=add_button_name,
                  style=wx.BU_EXACTFIT,
              )
              ctrl.Bind(
                  wx.EVT_BUTTON,
                  lambda event, position=i + 1: self.on_insert_row(
                      event, position
                  ),
              )
          self.panel.Sizer.Add(
              ctrl,
              row=i + 1,
              col=len(column_names),
              flag=wx.ALIGN_BOTTOM,
          )
          all_subcontrols[add_button_name] = True
  
          if len(joins) > 1:
              delete_button_name = self.get_delete_button_control_name(
                  i
              )
              ctrl = self.panel.FindWindowByName(delete_button_name)
              if ctrl is None:
                  ctrl = wx.Button(
                      self.panel,
                      -1,
                      "-",
                      name=delete_button_name,
                      style=wx.BU_EXACTFIT,
                  )
                  ctrl.Bind(
                      wx.EVT_BUTTON,
                      lambda event, position=i: self.on_delete_row(
                          event, position
                      ),
                  )
              self.panel.Sizer.Add(
                  ctrl,
                  row=i + 1,
                  col=len(column_names) + 1,
                  flag=wx.ALIGN_BOTTOM,
              )
              all_subcontrols[delete_button_name] = True
  
          if i > 0:
              move_up_button_name = self.get_up_button_control_name(i)
              ctrl = self.panel.FindWindowByName(move_up_button_name)
              if ctrl is None:
                  img = wx.ArtProvider.GetBitmap(
                      wx.ART_GO_UP, wx.ART_BUTTON, (16, 16)
                  )
                  ctrl = wx.BitmapButton(
                      self.panel, -1, img, name=move_up_button_name
                  )
                  ctrl.Bind(
                      wx.EVT_BUTTON,
                      lambda event, position=i: self.on_move_row_up(
                          event, position
                      ),
                  )
              self.panel.Sizer.Add(
                  ctrl,
                  row=i + 1,
                  col=len(column_names) + 2,
                  flag=wx.ALIGN_BOTTOM,
              )
              all_subcontrols[move_up_button_name] = True
  
          if i < len(joins) - 1:
              move_down_button_name = self.get_down_button_control_name(
                  i
              )
              ctrl = self.panel.FindWindowByName(move_down_button_name)
              if ctrl is None:
                  img = wx.ArtProvider.GetBitmap(
                      wx.ART_GO_DOWN, wx.ART_BUTTON, (16, 16)
                  )
                  ctrl = wx.BitmapButton(
                      self.panel, -1, img, name=move_down_button_name
                  )
                  ctrl.Bind(
                      wx.EVT_BUTTON,
                      lambda event, position=i: self.on_move_row_down(
                          event, position
                      ),
                  )
              self.panel.Sizer.Add(
                  ctrl,
                  row=i + 1,
                  col=len(column_names) + 3,
                  flag=wx.ALIGN_BOTTOM,
              )
              all_subcontrols[move_down_button_name] = True
  
      for key, value in list(all_subcontrols.items()):
          ctrl = self.panel.FindWindowByName(key)
          ctrl.Show(value)
  
imports: import wx
  import wx.lib.rcsizer
  from ._module_view import ModuleView
  from ..utilities.module_view import edit_control_name
label_desc: Use image node_id 11 for calling the JoinerController obj's underlying member method code with example usage: obj.update() without return types