Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28523/src/net/sourceforge/bprocessor/gui
Modified Files:
GUI.java
Added Files:
PreviewPanel.java
Log Message:
Created a preview Panel
--- NEW FILE: PreviewPanel.java ---
//---------------------------------------------------------------------------------
// $Id: PreviewPanel.java,v 1.1 2007/11/19 17:50:29 rimestad Exp $
//
// Copyright (c) 2005 The BProcessor Team (http://bprocessor.sourceforge.net)
// Released under the Lesser GNU Public License v2.1
//---------------------------------------------------------------------------------
package net.sourceforge.bprocessor.gui;
import javax.swing.JPanel;
import net.sourceforge.bprocessor.model.Geometric;
/**
* A abstract class for a preview panel to use with the GUI
*/
public abstract class PreviewPanel extends JPanel {
/**
* Constructor
*/
public PreviewPanel() {
super();
}
/** {@inheritDoc} */
public abstract void repaint();
/**
* Change the geometric previewed
* @param geometric the geometric
*/
public abstract void preview(Geometric geometric);
}
Index: GUI.java
===================================================================
RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/GUI.java,v
retrieving revision 1.81
retrieving revision 1.82
diff -C2 -d -r1.81 -r1.82
*** GUI.java 19 Nov 2007 14:26:19 -0000 1.81
--- GUI.java 19 Nov 2007 17:50:29 -0000 1.82
***************
*** 129,132 ****
--- 129,134 ----
private Timer alertTimer;
+ private PreviewPanel previewPanel;
+
/**
* Constructor for GUI
***************
*** 795,797 ****
--- 797,814 ----
}
}
+
+ /**
+ * Set the used preview panel in the GUI
+ * @param panel the preview panel
+ */
+ public void setPreviewPanel(PreviewPanel panel) {
+ this.previewPanel = panel;
+ }
+
+ /**
+ * @return the previewPanel
+ */
+ public PreviewPanel getPreviewPanel() {
+ return previewPanel;
+ }
}
|