28 |
import javax.swing.Box; |
import javax.swing.Box; |
29 |
import javax.swing.BoxLayout; |
import javax.swing.BoxLayout; |
30 |
import javax.swing.JPanel; |
import javax.swing.JPanel; |
31 |
import javax.swing.JTextField; |
import javax.swing.JScrollPane; |
32 |
|
import javax.swing.JTextArea; |
33 |
|
|
34 |
import net.sf.juife.OkCancelDialog; |
import net.sf.juife.OkCancelDialog; |
35 |
|
|
41 |
* @author Grigor Iliev |
* @author Grigor Iliev |
42 |
*/ |
*/ |
43 |
public class JSDbDescriptionDlg extends OkCancelDialog { |
public class JSDbDescriptionDlg extends OkCancelDialog { |
44 |
private final JTextField tfDesc = new JTextField(); |
private final JTextArea taDesc = new JTextArea(); |
45 |
|
|
46 |
/** |
/** |
47 |
* Creates a new instance of <code>JSDbDescriptionDlg</code> |
* Creates a new instance of <code>JSDbDescriptionDlg</code> |
63 |
|
|
64 |
private void |
private void |
65 |
initDbDescriptionDlg() { |
initDbDescriptionDlg() { |
66 |
setMainPane(tfDesc); |
taDesc.setLineWrap(true); |
67 |
|
taDesc.setWrapStyleWord(true); |
68 |
|
JScrollPane sp = new JScrollPane(taDesc); |
69 |
|
sp.setPreferredSize(new java.awt.Dimension(300, 60)); |
70 |
|
setMainPane(sp); |
71 |
setMinimumSize(getPreferredSize()); |
setMinimumSize(getPreferredSize()); |
72 |
setResizable(true); |
setResizable(true); |
73 |
} |
} |
83 |
onCancel() { setVisible(false); } |
onCancel() { setVisible(false); } |
84 |
|
|
85 |
public String |
public String |
86 |
getDescription() { return tfDesc.getText(); } |
getDescription() { return taDesc.getText(); } |
87 |
|
|
88 |
public void |
public void |
89 |
setDescription(String s) { tfDesc.setText(s); } |
setDescription(String s) { taDesc.setText(s); } |
90 |
} |
} |