View Javadoc
1 /*** 2 * $Header: 3 * 4 * 5 */ 6 package com.sun.xml.registry.client.browser; 7 8 import java.util.*; 9 import javax.swing.*; 10 import java.beans.*; //Property change stuff 11 import java.awt.*; 12 import java.awt.event.*; 13 14 import javax.xml.registry.*; 15 import javax.xml.registry.infomodel.*; 16 17 18 public class AuditableEventsDialog extends JBDialog { 19 20 private AuditableEventsTableModel auditableEventsTableModel = null; 21 private AuditableEventsTable auditableEventsTable = null; 22 23 24 public AuditableEventsDialog(JFrame parent, boolean modal, RegistryObject registryObject) { 25 26 super(parent, modal); 27 try { 28 setTitle("Auditable Events for " + RegistryBrowser.getName(registryObject)); 29 initialize(registryObject.getAuditTrail()); 30 } 31 catch (JAXRException e) { 32 RegistryBrowser.displayError(e); 33 } 34 } 35 36 37 private void initialize(Collection auditableEvents) { 38 39 JPanel mainPanel = getMainPanel(); 40 mainPanel.setLayout(new BorderLayout()); 41 42 JPanel auditableEventsTablePanel = new JPanel(); 43 auditableEventsTablePanel.setBorder(BorderFactory.createTitledBorder("Auditable Events")); 44 auditableEventsTablePanel.setLayout(new BorderLayout()); 45 46 auditableEventsTableModel = new AuditableEventsTableModel(); 47 auditableEventsTable = new AuditableEventsTable(auditableEventsTableModel); 48 JScrollPane auditableEventsTablePane = new JScrollPane(auditableEventsTable); 49 auditableEventsTablePanel.add(auditableEventsTablePane, BorderLayout.CENTER); 50 51 //setBounds(new Rectangle(300, 300, 600, 300)); 52 //setDefaultCloseOperation(DISPOSE_ON_CLOSE); 53 setAuditableEvents(auditableEvents); 54 55 auditableEventsTablePanel.setVisible(true); 56 mainPanel.add(auditableEventsTablePanel); 57 pack(); 58 } 59 60 61 public void setAuditableEvents(Collection auditableEvents) { 62 63 auditableEventsTableModel.update(auditableEvents); 64 } 65 66 }

This page was automatically generated by Maven