|
|
@ -32,6 +32,7 @@ import javax.swing.event.ListSelectionEvent; |
|
|
|
import javax.swing.event.ListSelectionListener; |
|
|
|
import javax.swing.event.ListSelectionListener; |
|
|
|
import java.awt.BorderLayout; |
|
|
|
import java.awt.BorderLayout; |
|
|
|
import java.awt.Color; |
|
|
|
import java.awt.Color; |
|
|
|
|
|
|
|
import java.awt.Component; |
|
|
|
import java.awt.Dimension; |
|
|
|
import java.awt.Dimension; |
|
|
|
import java.awt.GridLayout; |
|
|
|
import java.awt.GridLayout; |
|
|
|
import java.awt.event.MouseAdapter; |
|
|
|
import java.awt.event.MouseAdapter; |
|
|
@ -84,6 +85,7 @@ public class NewFormPane extends BasicPane { |
|
|
|
}); |
|
|
|
}); |
|
|
|
dialog.setSize(new Dimension(900, 600)); |
|
|
|
dialog.setSize(new Dimension(900, 600)); |
|
|
|
GUICoreUtils.centerWindow(dialog); |
|
|
|
GUICoreUtils.centerWindow(dialog); |
|
|
|
|
|
|
|
dialog.setTitle(this.title4PopupWindow()); |
|
|
|
dialog.setResizable(false); |
|
|
|
dialog.setResizable(false); |
|
|
|
dialog.setVisible(true); |
|
|
|
dialog.setVisible(true); |
|
|
|
} |
|
|
|
} |
|
|
@ -93,7 +95,14 @@ public class NewFormPane extends BasicPane { |
|
|
|
list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); |
|
|
|
list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); |
|
|
|
list.setModel(initListModel()); |
|
|
|
list.setModel(initListModel()); |
|
|
|
list.setSelectedIndex(0); |
|
|
|
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() { |
|
|
|
list.addListSelectionListener(new ListSelectionListener() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void valueChanged(ListSelectionEvent e) { |
|
|
|
public void valueChanged(ListSelectionEvent e) { |
|
|
@ -142,9 +151,9 @@ public class NewFormPane extends BasicPane { |
|
|
|
|
|
|
|
|
|
|
|
private JPanel createNewTemplatePane() { |
|
|
|
private JPanel createNewTemplatePane() { |
|
|
|
EmptyLayoutPane jPanel = new EmptyLayoutPane(); |
|
|
|
EmptyLayoutPane jPanel = new EmptyLayoutPane(); |
|
|
|
jPanel.addClickListener(new MouseAdapter() { |
|
|
|
jPanel.addMouseListener(new MouseAdapter() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void mouseClicked(MouseEvent e) { |
|
|
|
public void mousePressed(MouseEvent e) { |
|
|
|
setSelectedLayoutPane(jPanel); |
|
|
|
setSelectedLayoutPane(jPanel); |
|
|
|
dialog.setButtonEnabled(true); |
|
|
|
dialog.setButtonEnabled(true); |
|
|
|
} |
|
|
|
} |
|
|
@ -229,9 +238,9 @@ public class NewFormPane extends BasicPane { |
|
|
|
layoutPaneMap.put(moduleName, module); |
|
|
|
layoutPaneMap.put(moduleName, module); |
|
|
|
for (PredefinedLayout layout : layouts) { |
|
|
|
for (PredefinedLayout layout : layouts) { |
|
|
|
PredefinedLayoutPane predefinedLayoutPane = new PredefinedLayoutPane(layout); |
|
|
|
PredefinedLayoutPane predefinedLayoutPane = new PredefinedLayoutPane(layout); |
|
|
|
predefinedLayoutPane.addClickListener(new MouseAdapter() { |
|
|
|
predefinedLayoutPane.addMouseListener(new MouseAdapter() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void mouseClicked(MouseEvent e) { |
|
|
|
public void mousePressed(MouseEvent e) { |
|
|
|
setSelectedLayoutPane(predefinedLayoutPane); |
|
|
|
setSelectedLayoutPane(predefinedLayoutPane); |
|
|
|
dialog.setButtonEnabled(true); |
|
|
|
dialog.setButtonEnabled(true); |
|
|
|
} |
|
|
|
} |
|
|
|