inspector = new DOMInspector( root.panel.view.doc, root.panel.view.c, (XRStyleReference)root.panel.view.c.css );
inspector = new DOMInspector( root.panel.view.getDocument(), root.panel.view.getContext(), (XRStyleReference)root.panel.view.getContext().css );
        public void actionPerformed( ActionEvent evt ) {            if ( inspectorFrame == null ) {                inspectorFrame = new JFrame( "DOM Tree Inspector" );            }            if ( inspector == null ) {                // inspectorFrame = new JFrame("DOM Tree Inspector");                // CLEAN: this is more complicated than it needs to be                // DOM Tree Inspector needs to work with either CSSBank                // or XRStyleReference--implementations are not perfectly                // so we have different constructors                if ( root.panel.view.c.css instanceof CSSBank ) {                    inspector = new DOMInspector( root.panel.view.doc );                } else {                    inspector = new DOMInspector( root.panel.view.doc, root.panel.view.c, (XRStyleReference)root.panel.view.c.css );                }                inspectorFrame.getContentPane().add( inspector );                inspectorFrame.pack();                inspectorFrame.setSize( 500, 600 );                inspectorFrame.show();            } else {                if ( root.panel.view.c.css instanceof CSSBank ) {                    inspector.setForDocument( root.panel.view.doc );                } else {                    inspector.setForDocument( root.panel.view.doc, root.panel.view.c, (XRStyleReference)root.panel.view.c.css );                }            }            inspectorFrame.show();        }