00001 package gui.Factories; 00002 00003 import gui.Main.StartUp; 00004 import gui.Toolbars.MenuExample; 00005 import gui.Toolbars.MyFileChooser; 00006 import gui.Toolbars.MyFileSaver; 00007 import gui.Widgets.MyDecoderSettingsPanel; 00008 import gui.Widgets.MyEncodeSettingsPanel; 00009 import gui.Widgets.MyTabbedPane; 00010 00011 import java.awt.Dimension; 00012 import java.awt.GridLayout; 00013 import java.io.IOException; 00014 00015 import commandline.NormalMeshAlgorithm.Configuration; 00016 00017 00018 public class PanelFactory { 00019 00020 00021 00022 public static MyTabbedPane createImagePreviewsPanel(){ 00023 MyTabbedPane myTabbedPane=new MyTabbedPane(); 00024 myTabbedPane.setSize(400,800); 00025 myTabbedPane.setName("MyTabbedPane"); 00026 myTabbedPane.setPreferredSize(new Dimension(400,600)); 00027 return myTabbedPane; 00028 } 00029 00030 00031 00032 00033 public static MyEncodeSettingsPanel createEncodingSettingsPanel(Configuration configuration){ 00034 MyEncodeSettingsPanel mySettingsPanel=new MyEncodeSettingsPanel(configuration); 00035 //mySettingsPanel.setSize(800,400); 00036 00037 // mySettingsPanel.setLayout(new GridLayout(6,1)); // gridlayout:(rows,cols) 00038 // mySettingsPanel.setBackground(Color.blue); 00039 return mySettingsPanel; 00040 } 00041 00042 public static MyDecoderSettingsPanel createDecodingSettingsPanel( ){ 00043 MyDecoderSettingsPanel mySettingsPanel=new MyDecoderSettingsPanel(); 00044 //mySettingsPanel.setSize(800,400); 00045 00046 mySettingsPanel.setLayout(new GridLayout(5,1)); // gridlayout:(rows,cols) 00047 // mySettingsPanel.setBackground(Color.red); 00048 return mySettingsPanel; 00049 } 00050 00051 00052 public static MenuExample getToolbar(StartUp startUp,MyFileChooser fileChooser,MyFileSaver fileSaver) throws IOException{ 00053 MenuExample menuExample =new MenuExample(fileChooser,fileSaver,startUp); 00054 return menuExample; 00055 } 00056 00057 }
1.5.5