/** * Creates the Factor definition subform * * @return - JPanel containing the Factor definition subform. */ private Container createTransposedView() { Box subformContainer = Box.createVerticalBox(); transposedSpreadsheetSubform = new TransposedSubForm( "spreadsheet data", FieldTypes.ROW, transposedSpreadsheetModel.getFields(), transposedSpreadsheetModel.getNumberOfRecords(), width, height, transposedSpreadsheetModel.getData(), transposedSpreadsheetModel.getSpreadsheet().getDataEntryEnv()); transposedSpreadsheetSubform.createGUI(); transposedSpreadsheetSubform.addPropertyChangeListener( "rowAdded", new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent propertyChangeEvent) { updateInformation(); } }); subformContainer.add(Box.createVerticalStrut(15)); subformContainer.add(transposedSpreadsheetSubform); subformContainer.add(Box.createVerticalStrut(15)); return subformContainer; }
private void updateInformation() { information.setText( "<html><font color=\"#8DC63F\"><b>" + transposedSpreadsheetSubform.getScrollTable().getColumnCount() + "</b></font> records annotated with <font color=\"#8DC63F\"><b>" + transposedSpreadsheetModel.getFields().size() + "</b></font> metadata fields</html>"); }