|
|
@@ -13,8 +13,13 @@ import lombok.experimental.FieldDefaults;
|
|
|
|
|
|
import org.jdesktop.swingx.VerticalLayout;
|
|
|
|
|
|
-import javax.swing.JButton;
|
|
|
import javax.swing.JSeparator;
|
|
|
+import java.awt.GridBagLayout;
|
|
|
+import javax.swing.JLabel;
|
|
|
+import java.awt.GridBagConstraints;
|
|
|
+import java.awt.Insets;
|
|
|
+import java.awt.Component;
|
|
|
+import javax.swing.Box;
|
|
|
|
|
|
@SuppressWarnings("serial")
|
|
|
@FieldDefaults(level=AccessLevel.PRIVATE, makeFinal=true)
|
|
|
@@ -25,10 +30,34 @@ public class ElementPanel extends JScrollPane {
|
|
|
public ElementPanel(Element element) {
|
|
|
JPanel panelColumnHeader = new JPanel();
|
|
|
setColumnHeaderView(panelColumnHeader);
|
|
|
+ GridBagLayout gbl_panelColumnHeader = new GridBagLayout();
|
|
|
+ gbl_panelColumnHeader.columnWidths = new int[]{0, 0, 0, 0};
|
|
|
+ gbl_panelColumnHeader.rowHeights = new int[]{0, 0};
|
|
|
+ gbl_panelColumnHeader.columnWeights = new double[]{0.0, 1.0, 0.0, Double.MIN_VALUE};
|
|
|
+ gbl_panelColumnHeader.rowWeights = new double[]{0.0, Double.MIN_VALUE};
|
|
|
+ panelColumnHeader.setLayout(gbl_panelColumnHeader);
|
|
|
|
|
|
- JButton btnAddStep = new JButton("Add Phase");
|
|
|
- panelColumnHeader.add(btnAddStep);
|
|
|
+ JLabel lblName = new JLabel(element.getName());
|
|
|
+ GridBagConstraints gbc_lblName = new GridBagConstraints();
|
|
|
+ gbc_lblName.insets = new Insets(0, 0, 0, 5);
|
|
|
+ gbc_lblName.gridx = 0;
|
|
|
+ gbc_lblName.gridy = 0;
|
|
|
+ panelColumnHeader.add(lblName, gbc_lblName);
|
|
|
|
|
|
+ Component horizontalGlue = Box.createHorizontalGlue();
|
|
|
+ GridBagConstraints gbc_horizontalGlue = new GridBagConstraints();
|
|
|
+ gbc_horizontalGlue.insets = new Insets(0, 0, 0, 5);
|
|
|
+ gbc_horizontalGlue.gridx = 1;
|
|
|
+ gbc_horizontalGlue.gridy = 0;
|
|
|
+ panelColumnHeader.add(horizontalGlue, gbc_horizontalGlue);
|
|
|
+
|
|
|
+ CollatedDurationPanel panelDuration =
|
|
|
+ new CollatedDurationPanel(element.getCollatedDuration());
|
|
|
+ GridBagConstraints gbc_panelDuration = new GridBagConstraints();
|
|
|
+ gbc_panelDuration.gridx = 2;
|
|
|
+ gbc_panelDuration.gridy = 0;
|
|
|
+ panelColumnHeader.add(panelDuration, gbc_panelDuration);
|
|
|
+
|
|
|
panelViewPort = new JPanel();
|
|
|
setViewportView(panelViewPort);
|
|
|
panelViewPort.setLayout(new VerticalLayout(5));
|