コード例 #1
0
ファイル: IJGP.java プロジェクト: acares/ProbCog
 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);
   }
 }
コード例 #2
0
  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
ファイル: IJGP.java プロジェクト: acares/ProbCog
 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);
     }
   }
 }
コード例 #4
0
  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));
  }
コード例 #5
0
 public void valueChanged(ListSelectionEvent e) {
   message = currentModel.getMessageAt(currentTable.getSelectedRow());
   messageTable.setModel(new MessageTableModel(message, dataDictionary));
   messageTree.setModel(new MessageTreeModel(message, dataDictionary));
 }
コード例 #6
0
ファイル: JMSView.java プロジェクト: Desy-extern/cs-studio
 public void propertyChange(PropertyChangeEvent event) {
   messageTable.init();
 }