CanvasFormattingController { public static void notifyBorderFormattingStyle(int style, List<Panel> selectedPanels) { for (Panel panel : selectedPanels) { panel.setBorderStyle(style); } } 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 notifyBorderFormattingStyleTest() { final ExtendedProperties viewProps = new ExtendedProperties(); CanvasManifestation canvas1 = new CanvasManifestation(mockComponent,canvasViewInfo) { public ExtendedProperties getViewProperties() { return viewProps; }; }; TestPanel panel = new TestPanel(addManifestInfo(canvas1), panelFocusSelectionProvider); panel.setBounds(100, 200, 100, 100); selectedPanels.add(panel); CanvasManifestation canvas2 = new CanvasManifestation(mockComponent,canvasViewInfo) { public ExtendedProperties getViewProperties() { return viewProps; }; }; panel = new TestPanel(addManifestInfo(canvas2), panelFocusSelectionProvider); panel.setBounds(100, 100, 50, 100); selectedPanels.add(panel); CanvasFormattingController.notifyBorderFormattingStyle(BorderStyle.MIXED.ordinal(), selectedPanels); for (Panel p : selectedPanels) { panel = (TestPanel) p; int borderStyle = panel.getBorderStyle(); Assert.assertEquals(borderStyle, BorderStyle.MIXED.ordinal()); MCTViewManifestationInfo info = CanvasManifestation.getManifestationInfo(panel.getWrappedManifestation()); Assert.assertEquals(info.getBorderStyle(), BorderStyle.MIXED.ordinal()); } }