test_class.declarator: subtypeView
test_class.modifier: @Mock
test_class.original_string: @Mock
      DisplayerSubtypeSelector.View subtypeView;
test_class.type: DisplayerSubtypeSelector.View
test_class.var_name: subtypeView
test_class.declarator: rendererManager
test_class.modifier: @Mock
test_class.original_string: @Mock
      RendererManager rendererManager;
test_class.type: RendererManager
test_class.var_name: rendererManager
test_class.declarator: rendererLibrary
test_class.modifier: @Mock
test_class.original_string: @Mock
      RendererLibrary rendererLibrary;
test_class.type: RendererLibrary
test_class.var_name: rendererLibrary
test_class.declarator: subtypeSelectedEvent
test_class.modifier: @Mock
test_class.original_string: @Mock
      EventSourceMock<DisplayerSubtypeSelectedEvent> subtypeSelectedEvent;
test_class.type: EventSourceMock<DisplayerSubtypeSelectedEvent>
test_class.var_name: subtypeSelectedEvent
test_class.declarator: presenter
test_class.original_string: DisplayerSubtypeSelector presenter;
test_class.type: DisplayerSubtypeSelector
test_class.var_name: presenter
test_class.file: dashbuilder-client/dashbuilder-displayer-client/src/test/java/org/dashbuilder/displayer/client/widgets/DisplayerSubtypeSelectorTest.java
test_class.identifier: DisplayerSubtypeSelectorTest
test_case.body: @Test
      public void testInitialization1() {
          presenter.init(BARCHART, BAR);
          verify(subtypeView).show(BARCHART, BAR);
          verify(subtypeView).show(BARCHART, BAR_STACKED);
          verify(subtypeView).select(BAR);
      }
test_case.class_method_signature: DisplayerSubtypeSelectorTest.testInitialization1()
test_case.full_signature: @Test public void testInitialization1()
test_case.identifier: testInitialization1
test_case.invocations: init show verify show verify select verify
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testInitialization1()
focal_class.declarator: view = null
focal_class.original_string: View view = null;
focal_class.type: View
focal_class.var_name: view
focal_class.declarator: rendererManager
focal_class.original_string: RendererManager rendererManager;
focal_class.type: RendererManager
focal_class.var_name: rendererManager
focal_class.declarator: selectedSubtype
focal_class.original_string: DisplayerSubType selectedSubtype;
focal_class.type: DisplayerSubType
focal_class.var_name: selectedSubtype
focal_class.declarator: selectEvent
focal_class.original_string: Event<DisplayerSubtypeSelectedEvent> selectEvent;
focal_class.type: Event<DisplayerSubtypeSelectedEvent>
focal_class.var_name: selectEvent
focal_class.file: dashbuilder-client/dashbuilder-displayer-client/src/main/java/org/dashbuilder/displayer/client/widgets/DisplayerSubtypeSelector.java
focal_class.identifier: DisplayerSubtypeSelector
focal_class.interfaces: implements IsWidget
focal_class.class_method_signature: DisplayerSubtypeSelector.DisplayerSubtypeSelector(View view,
                                      RendererManager rendererManager,
                                      Event<DisplayerSubtypeSelectedEvent> selectEvent)
focal_class.full_signature: @Inject public  DisplayerSubtypeSelector(View view,
                                      RendererManager rendererManager,
                                      Event<DisplayerSubtypeSelectedEvent> selectEvent)
focal_class.identifier: DisplayerSubtypeSelector
focal_class.modifiers: @Inject public
focal_class.parameters: (View view,
                                      RendererManager rendererManager,
                                      Event<DisplayerSubtypeSelectedEvent> selectEvent)
focal_class.signature:  DisplayerSubtypeSelector(View view,
                                      RendererManager rendererManager,
                                      Event<DisplayerSubtypeSelectedEvent> selectEvent)
focal_class.class_method_signature: DisplayerSubtypeSelector.asWidget()
focal_class.full_signature: @Override public Widget asWidget()
focal_class.identifier: asWidget
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Widget
focal_class.signature: Widget asWidget()
focal_class.class_method_signature: DisplayerSubtypeSelector.getSelectedSubtype()
focal_class.full_signature: public DisplayerSubType getSelectedSubtype()
focal_class.identifier: getSelectedSubtype
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: DisplayerSubType
focal_class.signature: DisplayerSubType getSelectedSubtype()
focal_class.class_method_signature: DisplayerSubtypeSelector.init(DisplayerType type, DisplayerSubType selectedSubType)
focal_class.full_signature: public void init(DisplayerType type, DisplayerSubType selectedSubType)
focal_class.identifier: init
focal_class.modifiers: public
focal_class.parameters: (DisplayerType type, DisplayerSubType selectedSubType)
focal_class.return: void
focal_class.signature: void init(DisplayerType type, DisplayerSubType selectedSubType)
focal_class.class_method_signature: DisplayerSubtypeSelector.onSelect(DisplayerSubType subtype)
focal_class.full_signature:  void onSelect(DisplayerSubType subtype)
focal_class.identifier: onSelect
focal_class.parameters: (DisplayerSubType subtype)
focal_class.return: void
focal_class.signature: void onSelect(DisplayerSubType subtype)
focal_method.body: public void init(DisplayerType type, DisplayerSubType selectedSubType) {
          view.clear();
  
          RendererLibrary rendererLibrary = rendererManager.getRendererForType(type);
          if (rendererLibrary != null) {
              List<DisplayerSubType> supportedSubTypes = rendererLibrary.getSupportedSubtypes(type);
              if (supportedSubTypes != null && !supportedSubTypes.isEmpty()) {
                  for (int i = 0; i < supportedSubTypes.size(); i++) {
                      DisplayerSubType subtype = supportedSubTypes.get(i);
  
                      // Double check the renderer library for invalid subtypes for this type
                      if (!type.getSubTypes().contains(subtype)) {
                          throw new RuntimeException("Wrong subtype (" + subtype + ") indicated for type " + type + " by renderer library " + rendererLibrary.getUUID());
                      }
  
                      boolean initiallySelected = selectedSubType != null ? subtype == selectedSubType : i == 0;
                      view.show(type, subtype);
                      if (initiallySelected) {
                          view.select(subtype);
                      }
                  }
              } else {
                  view.showDefault(type);
              }
          }
      }
focal_method.class_method_signature: DisplayerSubtypeSelector.init(DisplayerType type, DisplayerSubType selectedSubType)
focal_method.full_signature: public void init(DisplayerType type, DisplayerSubType selectedSubType)
focal_method.identifier: init
focal_method.invocations: clear getRendererForType getSupportedSubtypes isEmpty size get contains getSubTypes getUUID show select showDefault
focal_method.modifiers: public
focal_method.parameters: (DisplayerType type, DisplayerSubType selectedSubType)
focal_method.return: void
focal_method.signature: void init(DisplayerType type, DisplayerSubType selectedSubType)