test_class.declarator: displayerDragComponent
test_class.modifier: @InjectMocks
test_class.original_string: @InjectMocks
      DisplayerDragComponent displayerDragComponent;
test_class.type: DisplayerDragComponent
test_class.var_name: displayerDragComponent
test_class.file: dashbuilder-client/dashbuilder-displayer-editor/src/test/java/org/dashbuilder/client/editor/DisplayerDragComponentTest.java
test_class.identifier: DisplayerDragComponentTest
test_case.body: @Test
      public void testAdjustSize(){
          final DisplayerSettings settings = mock(DisplayerSettings.class);
          when(settings.getChartWidth()).thenReturn(0);
          when(settings.getTableWidth()).thenReturn(0);
  
          displayerDragComponent.adjustSize(settings, 0);
  
          verify(settings).setTableWidth(0);
  
          displayerDragComponent.adjustSize(settings, 30);
  
          verify(settings).setTableWidth(10);
      }
test_case.class_method_signature: DisplayerDragComponentTest.testAdjustSize()
test_case.full_signature: @Test public void testAdjustSize()
test_case.identifier: testAdjustSize
test_case.invocations: mock thenReturn when getChartWidth thenReturn when getTableWidth adjustSize setTableWidth verify adjustSize setTableWidth verify
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testAdjustSize()
focal_class.declarator: beanManager
focal_class.original_string: SyncBeanManager beanManager;
focal_class.type: SyncBeanManager
focal_class.var_name: beanManager
focal_class.declarator: viewer
focal_class.original_string: DisplayerViewer viewer;
focal_class.type: DisplayerViewer
focal_class.var_name: viewer
focal_class.declarator: placeManager
focal_class.original_string: PlaceManager placeManager;
focal_class.type: PlaceManager
focal_class.var_name: placeManager
focal_class.declarator: perspectiveCoordinator
focal_class.original_string: PerspectiveCoordinator perspectiveCoordinator;
focal_class.type: PerspectiveCoordinator
focal_class.var_name: perspectiveCoordinator
focal_class.declarator: marshaller
focal_class.original_string: DisplayerSettingsJSONMarshaller marshaller;
focal_class.type: DisplayerSettingsJSONMarshaller
focal_class.var_name: marshaller
focal_class.file: dashbuilder-client/dashbuilder-displayer-editor/src/main/java/org/dashbuilder/client/editor/DisplayerDragComponent.java
focal_class.identifier: DisplayerDragComponent
focal_class.interfaces: implements PerspectiveEditorCoreComponent, HasModalConfiguration
focal_class.class_method_signature: DisplayerDragComponent.DisplayerDragComponent( SyncBeanManager beanManager,
                                     DisplayerViewer viewer,
                                     PlaceManager placeManager,
                                     PerspectiveCoordinator perspectiveCoordinator )
focal_class.full_signature: @Inject public  DisplayerDragComponent( SyncBeanManager beanManager,
                                     DisplayerViewer viewer,
                                     PlaceManager placeManager,
                                     PerspectiveCoordinator perspectiveCoordinator )
focal_class.identifier: DisplayerDragComponent
focal_class.modifiers: @Inject public
focal_class.parameters: ( SyncBeanManager beanManager,
                                     DisplayerViewer viewer,
                                     PlaceManager placeManager,
                                     PerspectiveCoordinator perspectiveCoordinator )
focal_class.signature:  DisplayerDragComponent( SyncBeanManager beanManager,
                                     DisplayerViewer viewer,
                                     PlaceManager placeManager,
                                     PerspectiveCoordinator perspectiveCoordinator )
focal_class.class_method_signature: DisplayerDragComponent.getDragComponentTitle()
focal_class.full_signature: @Override public String getDragComponentTitle()
focal_class.identifier: getDragComponentTitle
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getDragComponentTitle()
focal_class.class_method_signature: DisplayerDragComponent.getPreviewWidget( final RenderingContext ctx )
focal_class.full_signature: @Override public IsWidget getPreviewWidget( final RenderingContext ctx )
focal_class.identifier: getPreviewWidget
focal_class.modifiers: @Override public
focal_class.parameters: ( final RenderingContext ctx )
focal_class.return: IsWidget
focal_class.signature: IsWidget getPreviewWidget( final RenderingContext ctx )
focal_class.class_method_signature: DisplayerDragComponent.getShowWidget( final RenderingContext ctx )
focal_class.full_signature: @Override public IsWidget getShowWidget( final RenderingContext ctx )
focal_class.identifier: getShowWidget
focal_class.modifiers: @Override public
focal_class.parameters: ( final RenderingContext ctx )
focal_class.return: IsWidget
focal_class.signature: IsWidget getShowWidget( final RenderingContext ctx )
focal_class.class_method_signature: DisplayerDragComponent.getConfigurationModal( final ModalConfigurationContext ctx )
focal_class.full_signature: @Override public Modal getConfigurationModal( final ModalConfigurationContext ctx )
focal_class.identifier: getConfigurationModal
focal_class.modifiers: @Override public
focal_class.parameters: ( final ModalConfigurationContext ctx )
focal_class.return: Modal
focal_class.signature: Modal getConfigurationModal( final ModalConfigurationContext ctx )
focal_class.class_method_signature: DisplayerDragComponent.getSaveCommand( final DisplayerEditorPopup editor, final ModalConfigurationContext ctx )
focal_class.full_signature: protected Command getSaveCommand( final DisplayerEditorPopup editor, final ModalConfigurationContext ctx )
focal_class.identifier: getSaveCommand
focal_class.modifiers: protected
focal_class.parameters: ( final DisplayerEditorPopup editor, final ModalConfigurationContext ctx )
focal_class.return: Command
focal_class.signature: Command getSaveCommand( final DisplayerEditorPopup editor, final ModalConfigurationContext ctx )
focal_class.class_method_signature: DisplayerDragComponent.getCloseCommand( final DisplayerEditorPopup editor, final ModalConfigurationContext ctx )
focal_class.full_signature: protected Command getCloseCommand( final DisplayerEditorPopup editor, final ModalConfigurationContext ctx )
focal_class.identifier: getCloseCommand
focal_class.modifiers: protected
focal_class.parameters: ( final DisplayerEditorPopup editor, final ModalConfigurationContext ctx )
focal_class.return: Command
focal_class.signature: Command getCloseCommand( final DisplayerEditorPopup editor, final ModalConfigurationContext ctx )
focal_class.class_method_signature: DisplayerDragComponent.adjustSize( DisplayerSettings settings, int containerWidth )
focal_class.full_signature: protected void adjustSize( DisplayerSettings settings, int containerWidth )
focal_class.identifier: adjustSize
focal_class.modifiers: protected
focal_class.parameters: ( DisplayerSettings settings, int containerWidth )
focal_class.return: void
focal_class.signature: void adjustSize( DisplayerSettings settings, int containerWidth )
focal_method.body: protected void adjustSize( DisplayerSettings settings, int containerWidth ) {
          int displayerWidth = settings.getChartWidth();
          int tableWidth = settings.getTableWidth();
          if ( containerWidth > 0 && displayerWidth > containerWidth ) {
              int ratio = containerWidth * 100 / displayerWidth;
              settings.setChartWidth( containerWidth );
              settings.setChartHeight( settings.getChartHeight() * ratio / 100 );
          }
          if ( tableWidth == 0 || tableWidth > containerWidth ) {
              settings.setTableWidth( containerWidth > 20 ? containerWidth - 20 : 0 );
          }
      }
focal_method.class_method_signature: DisplayerDragComponent.adjustSize( DisplayerSettings settings, int containerWidth )
focal_method.full_signature: protected void adjustSize( DisplayerSettings settings, int containerWidth )
focal_method.identifier: adjustSize
focal_method.invocations: getChartWidth getTableWidth setChartWidth setChartHeight getChartHeight setTableWidth
focal_method.modifiers: protected
focal_method.parameters: ( DisplayerSettings settings, int containerWidth )
focal_method.return: void
focal_method.signature: void adjustSize( DisplayerSettings settings, int containerWidth )