1 package com.eviware.soapui.support.components; 2 3 import javax.swing.*; 4 5 public class JInspectorPanelFactory { 6 7 public static Class<? extends JInspectorPanel> inspectorPanelClass = JInspectorPanelImpl.class; 8 9 public static JInspectorPanel build( JComponent contentComponent ) 10 { 11 try { 12 return inspectorPanelClass.getConstructor( JComponent.class ).newInstance( contentComponent ); 13 } catch (Exception e) { 14 e.printStackTrace(); 15 return null; 16 } 17 } 18 19 public static JInspectorPanel build( JComponent contentComponent, int orientation ) 20 { 21 try { 22 return inspectorPanelClass.getConstructor( JComponent.class, int.class ).newInstance( contentComponent, orientation ); 23 } catch (Exception e) { 24 e.printStackTrace(); 25 return null; 26 } 27 } 28 }