Пример #1
0
 public double compute(int[] nodeDomainIndices) {
   if (!table.containsEntry(nodeDomainIndices)) {
     MutableDouble sum = new MutableDouble(0.0);
     compute(varsToSumOver, 0, nodeDomainIndices, sum);
     return sum.value;
   } else {
     return table.getEntry(nodeDomainIndices);
   }
 }
  public SplitPane(
      Frame aFrame,
      ProgressBarPanel aProgressBar,
      MessageTable aMessageTable,
      MessageTree aMessageTree,
      JTabbedPane aUpperTabbedPane,
      JTabbedPane aLowerTabbedPane,
      DefaultDataDictionaryAccess aDataDictionary) {
    super(JSplitPane.VERTICAL_SPLIT, aUpperTabbedPane, aLowerTabbedPane);

    frame = aFrame;
    menuBar = (MenuBar) aFrame.getJMenuBar();
    progressBar = aProgressBar;
    messageTable = aMessageTable;
    messageTree = aMessageTree;
    messageTree.setModel(null);
    upperTabbedPane = aUpperTabbedPane;
    dataDictionary = aDataDictionary;

    aLowerTabbedPane.add("Grid", new JScrollPane(messageTable));
    aLowerTabbedPane.add("Tree", new JScrollPane(messageTree));
    aUpperTabbedPane.addChangeListener(this);
    messageTable.addMouseListener(this);
    messageTree.addMouseListener(this);

    tracer =
        new Timer(
            5000,
            new ActionListener() {
              public void actionPerformed(ActionEvent e) {
                traceFile();
              }
            });
  }
Пример #3
0
 public void calcuSave(int[] scopeToSumOver, int i, int[] nodeDomainIndices) {
   if (i == scope.size()) {
     table.addEntry(nodeDomainIndices, compute(nodeDomainIndices));
     return;
   } else {
     int idxVar = scopeToSumOver[i];
     for (int v = 0; v < nodes[idxVar].getDomain().getOrder(); v++) {
       nodeDomainIndices[idxVar] = v;
       calcuSave(scopeToSumOver, i + 1, nodeDomainIndices);
     }
   }
 }
  public void mouseClicked(MouseEvent e) {
    if (e.getClickCount() < 2) return;
    Integer tag = null;
    String value = null;

    if (e.getSource() == currentTable) {
      tag = currentTable.getTagFromPoint(e.getPoint());
      value = currentTable.getValueFromPoint(e.getPoint());
    }
    if (e.getSource() == messageTable) {
      tag = messageTable.getTagFromPoint(e.getPoint());
      value = messageTable.getValueFromPoint(e.getPoint());
    }
    if (e.getSource() == messageTree) {
      tag = messageTree.getTagFromPoint(e.getPoint());
      value = messageTree.getValueFromPoint(e.getPoint());
    }

    if (tag == null || value == null) return;

    menuBar.customFilter();
    applyFilter(new FieldFilter(new StringField(tag.intValue(), value), FieldFilter.EQUAL));
  }
 public void valueChanged(ListSelectionEvent e) {
   message = currentModel.getMessageAt(currentTable.getSelectedRow());
   messageTable.setModel(new MessageTableModel(message, dataDictionary));
   messageTree.setModel(new MessageTreeModel(message, dataDictionary));
 }
Пример #6
0
 public void propertyChange(PropertyChangeEvent event) {
   messageTable.init();
 }