/***************************************************
*
* cismet GmbH, Saarbruecken, Germany
*
* ... and it just works.
*
****************************************************/
/*
* DebugPanel.java
*
* Created on 20. Juli 2006, 17:10
*/
package de.cismet.cismap.commons.debug;
import edu.umd.cs.piccolo.PCanvas;
import groovy.ui.ConsoleSupport;
/**
* DOCUMENT ME!
*
* @author thorsten.hell@cismet.de
* @version $Revision$, $Date$
*/
public class DebugPanel extends javax.swing.JPanel {
//~ Instance fields --------------------------------------------------------
private final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(this.getClass());
private PCanvas pCanvas;
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton cmdRefresh;
private javax.swing.JButton cmdRefresh1;
private javax.swing.JPanel jPanel1;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JScrollPane jScrollPane2;
private javax.swing.JScrollPane jScrollPane3;
private javax.swing.JTree treePCanvas;
private javax.swing.JTree treePCanvas1;
private javax.swing.JTextPane txtGroovy;
// End of variables declaration//GEN-END:variables
//~ Constructors -----------------------------------------------------------
/**
* Creates new form DebugPanel.
*/
public DebugPanel() {
initComponents();
// Console console = new Console();
// console.setFrame((JFrame)StaticSwingTools.getParentFrame(this));
//
// console.setVariable("map", mapC);
//
// console.run();
}
//~ Methods ----------------------------------------------------------------
/**
* DOCUMENT ME!
*
* @return DOCUMENT ME!
*/
public PCanvas getPCanvas() {
return pCanvas;
}
/**
* DOCUMENT ME!
*
* @param pCanvas DOCUMENT ME!
*/
public void setPCanvas(final PCanvas pCanvas) {
this.pCanvas = pCanvas;
}
/**
* This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The
* content of this method is always regenerated by the Form Editor.
*/
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
cmdRefresh = new javax.swing.JButton();
jScrollPane1 = new javax.swing.JScrollPane();
treePCanvas = new javax.swing.JTree();
jScrollPane2 = new javax.swing.JScrollPane();
treePCanvas1 = new javax.swing.JTree();
cmdRefresh1 = new javax.swing.JButton();
jScrollPane3 = new javax.swing.JScrollPane();
txtGroovy = new javax.swing.JTextPane();
cmdRefresh.setText(org.openide.util.NbBundle.getMessage(DebugPanel.class, "DebugPanel.cmdRefresh.text")); // NOI18N
cmdRefresh.addActionListener(new java.awt.event.ActionListener() {
@Override
public void actionPerformed(final java.awt.event.ActionEvent evt) {
cmdRefreshActionPerformed(evt);
}
});
jScrollPane1.setViewportView(treePCanvas);
jScrollPane2.setViewportView(treePCanvas1);
cmdRefresh1.setText(org.openide.util.NbBundle.getMessage(DebugPanel.class, "DebugPanel.cmdRefresh1.text")); // NOI18N
cmdRefresh1.addActionListener(new java.awt.event.ActionListener() {
@Override
public void actionPerformed(final java.awt.event.ActionEvent evt) {
cmdRefresh1ActionPerformed(evt);
}
});
final org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(
jPanel1Layout.createSequentialGroup().addContainerGap().add(
jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(
jScrollPane2,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
380,
Short.MAX_VALUE).add(org.jdesktop.layout.GroupLayout.TRAILING, cmdRefresh1)).addContainerGap())
.add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE).add(
cmdRefresh));
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(
jPanel1Layout.createSequentialGroup().addContainerGap().add(
jScrollPane2,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
181,
Short.MAX_VALUE).addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(cmdRefresh1)
.addContainerGap()).add(
jScrollPane1,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
181,
Short.MAX_VALUE).add(cmdRefresh));
jScrollPane3.setViewportView(txtGroovy);
final org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(
layout.createSequentialGroup().addContainerGap().add(
jScrollPane3,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
380,
Short.MAX_VALUE).addContainerGap()));
layout.setVerticalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(
layout.createSequentialGroup().addContainerGap().add(
jScrollPane3,
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
210,
Short.MAX_VALUE).addContainerGap()));
} // </editor-fold>//GEN-END:initComponents
/**
* DOCUMENT ME!
*
* @param evt DOCUMENT ME!
*/
private void cmdRefresh1ActionPerformed(final java.awt.event.ActionEvent evt) { //GEN-FIRST:event_cmdRefresh1ActionPerformed
// TODO add your handling code here:
} //GEN-LAST:event_cmdRefresh1ActionPerformed
/**
* DOCUMENT ME!
*
* @param evt DOCUMENT ME!
*/
private void cmdRefreshActionPerformed(final java.awt.event.ActionEvent evt) { //GEN-FIRST:event_cmdRefreshActionPerformed
treePCanvas.setModel(new PiccoloDebugTreeModel(pCanvas));
} //GEN-LAST:event_cmdRefreshActionPerformed
}