|
|
|
@ -32,6 +32,7 @@ import javax.swing.event.ListSelectionEvent;
|
|
|
|
|
import javax.swing.event.ListSelectionListener; |
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
import java.awt.Color; |
|
|
|
|
import java.awt.Component; |
|
|
|
|
import java.awt.Dimension; |
|
|
|
|
import java.awt.GridLayout; |
|
|
|
|
import java.awt.event.MouseAdapter; |
|
|
|
@ -84,6 +85,7 @@ public class NewFormPane extends BasicPane {
|
|
|
|
|
}); |
|
|
|
|
dialog.setSize(new Dimension(900, 600)); |
|
|
|
|
GUICoreUtils.centerWindow(dialog); |
|
|
|
|
dialog.setTitle(this.title4PopupWindow()); |
|
|
|
|
dialog.setResizable(false); |
|
|
|
|
dialog.setVisible(true); |
|
|
|
|
} |
|
|
|
@ -93,7 +95,14 @@ public class NewFormPane extends BasicPane {
|
|
|
|
|
list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); |
|
|
|
|
list.setModel(initListModel()); |
|
|
|
|
list.setSelectedIndex(0); |
|
|
|
|
list.setCellRenderer(new DefaultListCellRenderer()); |
|
|
|
|
list.setCellRenderer(new DefaultListCellRenderer() { |
|
|
|
|
@Override |
|
|
|
|
public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus) { |
|
|
|
|
super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); |
|
|
|
|
this.setBorder(BorderFactory.createEmptyBorder(0, 8, 0, 0)); |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
list.addListSelectionListener(new ListSelectionListener() { |
|
|
|
|
@Override |
|
|
|
|
public void valueChanged(ListSelectionEvent e) { |
|
|
|
@ -257,7 +266,7 @@ public class NewFormPane extends BasicPane {
|
|
|
|
|
try { |
|
|
|
|
if (StringUtils.isNotEmpty(path)) { |
|
|
|
|
Form form = new Form(); |
|
|
|
|
form.readStream(NewFormPane.class.getResourceAsStream(path)); |
|
|
|
|
form.readStream(NewFormPane.class.getResourceAsStream(path), true); |
|
|
|
|
jForm = StableFactory.getMarkedInstanceObjectFromClass(BaseJForm.XML_TAG, new Object[]{form}, BaseJForm.class); |
|
|
|
|
} else { |
|
|
|
|
jForm = StableFactory.getMarkedInstanceObjectFromClass(BaseJForm.XML_TAG, BaseJForm.class); |
|
|
|
|