KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > shark > swingclient > workflowadmin > repository > UploadedPackageRelativePath


1 package org.enhydra.shark.swingclient.workflowadmin.repository;
2
3 import java.awt.*;
4 import java.awt.event.*;
5
6 import javax.swing.*;
7
8 import org.enhydra.shark.swingclient.*;
9
10 /**
11  * Used to set the relative path of the package that user want to upload
12  * to engine.
13  *
14  * @author Sasa Bojanic
15  * @version 1.0
16  */

17 public class UploadedPackageRelativePath extends ActionPanel {
18
19    private static Dimension textFieldDimension=new Dimension(300,20);
20
21    private JTextField relativePathField;
22    private String JavaDoc rPath;
23
24    public UploadedPackageRelativePath (Window parent,String JavaDoc rPath){
25       super();
26       this.rPath=rPath;
27       super.init();
28       super.initDialog(parent,
29          ResourceManager.getLanguageDependentString("DialogSetUploadedPackageRelativeFilePath"),
30          true,true);
31    }
32
33    protected void createActions () {}
34
35    protected Component createCenterComponent (){
36       JPanel panel = new JPanel();
37
38       panel.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
39       panel.setLayout(new BoxLayout(panel,BoxLayout.X_AXIS));
40
41       JLabel rrl=new JLabel(ResourceManager.
42             getLanguageDependentString("FilePathRelativeToEngineRepositoryKey")+":");
43       panel.add(rrl);
44
45       relativePathField=new JTextField(rPath);
46       relativePathField.setMinimumSize(new Dimension(textFieldDimension));
47       relativePathField.setMaximumSize(new Dimension(textFieldDimension));
48       relativePathField.setPreferredSize(new Dimension(textFieldDimension));
49       panel.add(relativePathField);
50
51       return panel;
52    }
53
54    protected void applyChanges () {
55       rPath=relativePathField.getText();
56       myDialog.dispose();
57    }
58
59    protected void cancelChanges () {
60       rPath=null;
61       myDialog.dispose();
62    }
63
64    public String JavaDoc getRelativeFilePath () {
65       return rPath;
66    }
67
68 }
69
70
Popular Tags