CanvasFormattingController { public static void notifyYPropertyChange(int newYValue, Panel selectedPanel) { Point existingLocation = selectedPanel.getLocation(); Dimension existingSize = selectedPanel.getBounds().getSize(); selectedPanel.setBounds(existingLocation.x, newYValue, existingSize.width, existingSize.height); } private  CanvasFormattingController(); static void notifyXPropertyChange(int newXValue, Panel selectedPanel); static void notifyYPropertyChange(int newYValue, Panel selectedPanel); static void notifyWidthPropertyChange(int newWdith, List<Panel> selectedPanels); static void notifyHeightPropertyChange(int newHeight, List<Panel> selectedPanels); static void notifyAlignLeftSelected(List<Panel> selectedPanels); static void notifyAlignCenterHSelected(List<Panel> selectedPanels); static void notifyAlignRightSelected(List<Panel> selectedPanels); static void notifyAlignTopSelected(List<Panel> selectedPanels); static void notifyAlignBottomSelected(List<Panel> selectedPanels); static void notifyAlignVCenterSelected(List<Panel> selectedPanels); static void notifyWestBorderStatus(boolean status, List<Panel> selectedPanels); static void notifyEastBorderStatus(boolean status, List<Panel> selectedPanels); static void notifyNorthBorderStatus(boolean status, List<Panel> selectedPanels); static void notifySouthBorderStatus(boolean status, List<Panel> selectedPanels); static void notifyAllBorderStatus(boolean status, List<Panel> selectedPanels); static void notifyBorderColorSelected(Color selectedColor, List<Panel> selectedPanels); static void notifyBorderFormattingStyle(int style, List<Panel> selectedPanels); static void notifyTitleBarStatus(boolean status, List<Panel> selectedPanels); static void notifyTitleBarFontSelected(String fontFamilyName, List<Panel> selectedPanels); static void notifyTitleBarFontSizeSelected(Integer fontSize, List<Panel> selectedPanels); static void notifyTitleBarFontStyleSelected(Integer fontStyle, List<Panel> selectedPanels); static void notifyTitleBarFontUnderlineSelected(Integer fontStyle, List<Panel> selectedPanels); static void notifyTitleBarFontForegroundColorSelected(Integer fontForegroundColor, List<Panel> selectedPanels); static void notifyTitleBarFontBackgroundColorSelected(Integer fontBackgroundColor, List<Panel> selectedPanels);  }
@SuppressWarnings("serial") @Test public void notifyYPropertyChangeTest() { final ExtendedProperties viewProps = new ExtendedProperties(); CanvasManifestation canvas1 = new CanvasManifestation(mockComponent,canvasViewInfo) { public ExtendedProperties getViewProperties() { return viewProps; }; }; Panel panel = new Panel(addManifestInfo(canvas1), panelFocusSelectionProvider); int origY = panel.getBounds().y; CanvasFormattingController.notifyYPropertyChange(origY + 1000, panel); int newY = panel.getBounds().y; Assert.assertFalse(origY == newY); Assert.assertEquals(newY, origY + 1000); MCTViewManifestationInfo info = CanvasManifestation.getManifestationInfo(panel.getWrappedManifestation()); Assert.assertEquals(info.getStartPoint().y, newY); }