コード例 #1
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();
              }
            });
  }
コード例 #2
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));
  }
コード例 #3
0
 public void valueChanged(ListSelectionEvent e) {
   message = currentModel.getMessageAt(currentTable.getSelectedRow());
   messageTable.setModel(new MessageTableModel(message, dataDictionary));
   messageTree.setModel(new MessageTreeModel(message, dataDictionary));
 }