From e06ebc79c17801db77a17d49880eeac87eb32a34 Mon Sep 17 00:00:00 2001 From: boccioli_m Date: Mon, 8 Jun 2015 14:23:20 +0200 Subject: [PATCH] Closedown --- plugins/TestingList.form | 50 +++++++++++++++++++++++++++++++++++++--- plugins/TestingList.java | 20 +++++++++------- 2 files changed, 59 insertions(+), 11 deletions(-) diff --git a/plugins/TestingList.form b/plugins/TestingList.form index 83b20b4..0f8e488 100644 --- a/plugins/TestingList.form +++ b/plugins/TestingList.form @@ -46,11 +46,55 @@ - - + + + + + + + + + +
- + + + + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="10" resizable="false"> + <Title/> + <Editor/> + <Renderer/> + </Column> + </TableColumnModel> </Property> <Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor"> <TableHeader reorderingAllowed="true" resizingAllowed="true"/> diff --git a/plugins/TestingList.java b/plugins/TestingList.java index 8e9a1ad..6c7de61 100644 --- a/plugins/TestingList.java +++ b/plugins/TestingList.java @@ -167,12 +167,6 @@ jTable1.setValueAt(icon, rowD, COL_ICON); }; public Class getColumnClass(int columnIndex) { - switch (columnIndex){ - case 0: - return Boolean.class; - case 6: - return ImageIcon.class; - } return types [columnIndex]; } @@ -181,6 +175,12 @@ jTable1.setValueAt(icon, rowD, COL_ICON); } }); jScrollPane2.setViewportView(jTable1); + if (jTable1.getColumnModel().getColumnCount() > 0) { + jTable1.getColumnModel().getColumn(0).setResizable(false); + jTable1.getColumnModel().getColumn(0).setPreferredWidth(5); + jTable1.getColumnModel().getColumn(6).setResizable(false); + jTable1.getColumnModel().getColumn(6).setPreferredWidth(10); + } add(jScrollPane2, java.awt.BorderLayout.PAGE_END); }// </editor-fold>//GEN-END:initComponents @@ -223,8 +223,12 @@ jTable1.setValueAt(icon, rowD, COL_ICON); {false, sDate, "FIXL", "Lamp Test", "Failure", "Pending", icon} }; - DefaultTableModel model = new DefaultTableModel(data, columnNames); - jTable1.setModel(model); + + //DefaultTableModel model = new DefaultTableModel(data, columnNames); + //jTable1.setModel(model); + + DefaultTableModel model = (DefaultTableModel) jTable1.getModel(); + model.addRow(data); } public String getNow(){