|
|||||||||||||||||||
| 30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| WizardStep.java | - | 0% | 0% | 0% |
|
||||||||||||||
| 1 |
package baseCode.gui;
|
|
| 2 |
|
|
| 3 |
import java.awt.BorderLayout;
|
|
| 4 |
import java.awt.Color;
|
|
| 5 |
|
|
| 6 |
import javax.swing.JLabel;
|
|
| 7 |
import javax.swing.JPanel;
|
|
| 8 |
|
|
| 9 |
/**
|
|
| 10 |
* <p>
|
|
| 11 |
* Title:
|
|
| 12 |
* </p>
|
|
| 13 |
* <p>
|
|
| 14 |
* Description:
|
|
| 15 |
* </p>
|
|
| 16 |
* <p>
|
|
| 17 |
* Copyright: Copyright (c) 2003
|
|
| 18 |
* </p>
|
|
| 19 |
* <p>
|
|
| 20 |
* Company:
|
|
| 21 |
* </p>
|
|
| 22 |
*
|
|
| 23 |
* @author not attributable
|
|
| 24 |
* @version $Id: WizardStep.java,v 1.11 2004/07/27 03:18:58 pavlidis Exp $
|
|
| 25 |
*/
|
|
| 26 |
|
|
| 27 |
public abstract class WizardStep extends JPanel { |
|
| 28 |
|
|
| 29 |
Wizard owner; |
|
| 30 |
|
|
| 31 |
/**
|
|
| 32 |
* @param wiz
|
|
| 33 |
*/
|
|
| 34 | 0 |
public WizardStep( Wizard wiz ) {
|
| 35 | 0 |
super();
|
| 36 | 0 |
owner = wiz; |
| 37 | 0 |
try {
|
| 38 | 0 |
BorderLayout layout = new BorderLayout();
|
| 39 | 0 |
this.setLayout( layout );
|
| 40 | 0 |
jbInit(); |
| 41 |
} catch ( Exception e ) {
|
|
| 42 | 0 |
e.printStackTrace(); |
| 43 |
} |
|
| 44 |
} |
|
| 45 |
|
|
| 46 |
//Component initialization
|
|
| 47 |
protected abstract void jbInit() throws Exception; |
|
| 48 |
|
|
| 49 |
abstract public boolean isReady(); |
|
| 50 |
|
|
| 51 | 0 |
protected void addMain( JPanel panel ) { |
| 52 | 0 |
this.add( panel, BorderLayout.CENTER );
|
| 53 |
} |
|
| 54 |
|
|
| 55 |
/**
|
|
| 56 |
* @param text
|
|
| 57 |
* @todo why the spaces for layout?
|
|
| 58 |
*/
|
|
| 59 | 0 |
protected void addHelp( String text ) { |
| 60 | 0 |
JLabel label = new JLabel( text );
|
| 61 | 0 |
JLabel jLabel1 = new JLabel( " " ); |
| 62 | 0 |
JLabel jLabel2 = new JLabel( " " ); |
| 63 | 0 |
JLabel jLabel3 = new JLabel( " " ); |
| 64 | 0 |
JLabel jLabel4 = new JLabel( " " ); |
| 65 | 0 |
BorderLayout borderLayout1 = new BorderLayout();
|
| 66 | 0 |
JPanel labelPanel = new JPanel();
|
| 67 | 0 |
labelPanel.setBackground( Color.WHITE ); |
| 68 | 0 |
labelPanel.setLayout( borderLayout1 ); |
| 69 | 0 |
labelPanel.add( label, BorderLayout.CENTER ); |
| 70 | 0 |
labelPanel.add( jLabel1, BorderLayout.WEST ); |
| 71 | 0 |
labelPanel.add( jLabel2, BorderLayout.NORTH ); |
| 72 | 0 |
labelPanel.add( jLabel3, BorderLayout.SOUTH ); |
| 73 | 0 |
labelPanel.add( jLabel4, BorderLayout.EAST ); |
| 74 | 0 |
this.add( labelPanel, BorderLayout.NORTH );
|
| 75 |
} |
|
| 76 |
|
|
| 77 |
/**
|
|
| 78 |
* Print a message to the status bar.
|
|
| 79 |
*
|
|
| 80 |
* @param a
|
|
| 81 |
*/
|
|
| 82 | 0 |
public void showStatus( String a ) { |
| 83 | 0 |
owner.showStatus( a ); |
| 84 |
} |
|
| 85 |
|
|
| 86 |
/**
|
|
| 87 |
* Print an error message to the status bar.
|
|
| 88 |
*
|
|
| 89 |
* @param a
|
|
| 90 |
*/
|
|
| 91 | 0 |
public void showError( String a ) { |
| 92 | 0 |
owner.showError( a ); |
| 93 |
} |
|
| 94 |
|
|
| 95 |
} |
|
||||||||||