コード例 #1
0
  /**
   * 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;
  }
コード例 #2
0
 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>");
 }