| Home >> All >> com >> flexstor >> common >> gui >> [ imprt Javadoc ] |
Source code: com/flexstor/common/gui/imprt/ImportPanel.java
1 /* 2 * ImportPanel.java 3 * 4 * Copyright $Date: 2003/08/11 02:22:30 $ FLEXSTOR.net Inc. 5 * 6 * This work is licensed for use and distribution under license terms found at 7 * http://www.flexstor.org/license.html 8 * 9 */ 10 11 package com.flexstor.common.gui.imprt; 12 13 import java.awt.BorderLayout; 14 import java.awt.Insets; 15 import java.awt.Panel; 16 import java.awt.event.ActionEvent; 17 import java.awt.event.ActionListener; 18 import java.util.ArrayList; 19 20 import com.flexstor.common.awt.ActionComponentI; 21 import com.flexstor.common.awt.field.ActionButton; 22 23 public class ImportPanel extends Panel implements ActionListener 24 { 25 protected ImportModelI model = null; 26 protected SelectFilePanel choose = null; 27 protected ImportToPanel imprt = null; 28 protected CurrentSettingPanel thumb = null; 29 30 public ImportPanel( ImportModelI mdl ) 31 { 32 setLayout( new BorderLayout( 0, 4 ) ); 33 model = mdl; 34 35 choose = new SelectFilePanel ( model ); 36 thumb = new CurrentSettingPanel( model ); 37 38 add( "Center", choose ); 39 add( "South", thumb ); 40 41 if ( model != null ) 42 { 43 model.addObserver ( choose ); 44 model.addObserver ( thumb ); 45 } 46 } 47 public void loadData () 48 { 49 if ( choose != null ) 50 choose.loadData(); 51 52 if ( thumb != null ) 53 thumb.loadData(); 54 } 55 public void actionPerformed(ActionEvent e) 56 { 57 if (e.getSource() instanceof ActionButton) 58 { 59 ActionButton roButton = (ActionButton)e.getSource(); 60 int nActionID = roButton.getActionId(); 61 62 switch(nActionID) 63 { 64 case ActionComponentI.ACTION_ADD: 65 { 66 break; 67 } 68 case ActionComponentI.ACTION_DELETE: 69 { 70 break; 71 } 72 case ActionComponentI.ACTION_ADD_ALL: 73 { 74 break; 75 } 76 case ActionComponentI.ACTION_DELETE_ALL: 77 { 78 break; 79 } 80 81 82 }// end switch 83 84 } // end if 85 } 86 87 public void setLocationText(String s) 88 { 89 // thumb.setLocationText(s); 90 } 91 92 public void setConversionText(String s) 93 { 94 // thumb.setConversionText(s); 95 } 96 97 public Insets getInsets() 98 { 99 return new Insets(10,10,10,10); 100 } 101 102 public void closeTrees() 103 { 104 // choose.killTreeThreads(); 105 } 106 public ArrayList getFilesToBeImported() 107 { 108 return choose.getFilesToBeImported(); 109 } 110 111 112 }