home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Languages Suite
/
ProgLangD.iso
/
VCAFE.3.0A
/
Main.bin
/
WizardEvent.java
< prev
next >
Wrap
Text File
|
1998-09-08
|
2KB
|
107 lines
package com.symantec.itools.frameworks.wizard;
import java.util.EventObject;
/**
* @author Symantec Internet Tools Division
* @version 1.0
* @since VCafe 3.0
*/
public class WizardEvent
extends EventObject
{
/**
* @since VCafe 3.0
*/
public static final int WIZARD_FINISH_REQUESTED = 0;
/**
* @since VCafe 3.0
*/
public static final int WIZARD_FINISHED_SUCCESSFULLY = 1;
/**
* @since VCafe 3.0
*/
public static final int WIZARD_CANCEL = 2;
/**
* @since VCafe 3.0
*/
public static final int WIZARD_TITLE_CHANGED = 3;
/**
* @since VCafe 3.0
*/
protected int id;
/**
* @since VCafe 3.0
*/
protected String str;
public WizardEvent(Object source, int i)
{
super(source);
id = i;
}
/**
* @since VCafe 3.0
*/
public int getID()
{
return (id);
}
/**
* @param title TODO
* @since VCafe 3.0
*/
public void setNewTitle(String title)
{
str = title;
}
/**
* @since VCafe 3.0
*/
public String getNewTitle()
{
return (id == WIZARD_TITLE_CHANGED) ? str : null;
}
/**
* @since VCafe 3.0
*/
public String toString()
{
String type = "unknown";
switch(id)
{
case WIZARD_FINISH_REQUESTED:
type = "WIZARD_FINISH_REQUESTED";
break;
case WIZARD_FINISHED_SUCCESSFULLY:
type = "WIZARD_FINISHED_SUCCESSFULLY";
break;
case WIZARD_CANCEL:
type = "WIZARD_CANCEL";
break;
case WIZARD_TITLE_CHANGED:
type = "WIZARD_TITLE_CHANGED to " + getNewTitle();
break;
}
return ("Wizard Event : " + source + " was " + type);
}
}