com.ptc.windchill.upgrade.modeldiff
Class GuiManager

java.lang.Object
  extended bycom.ptc.windchill.upgrade.modeldiff.GuiManager

class GuiManager
extends Object

This package private class encapsulates the interaction with the GUI.


Field Summary
private static CancellationMonitor cancellationMonitor_
           
private static CheckPoints checkPoints_
           
private static CompareSchemaListener compareSchemaListener_
           
private static Date date0_
           
private static Date date1_
           
private static boolean debugByAddingCheckPoints_
           
private static boolean isACancel_
           
private static boolean isACancelRequested_
           
private static boolean isAnError_
           
private static boolean testRequired_
           
private static long time0_
           
private static long time1_
           
private static long timeLast_
           
 
Constructor Summary
(package private) GuiManager()
           
 
Method Summary
(package private)  boolean getIsACancel()
          After a cancel was requested by selecting "Cancel", ask: Was the cancel verified?
(package private)  boolean getIsACancelRequested()
          A cancel was requested if the user selected the "Cancel".
(package private)  boolean getIsAnError()
          Did execution stop because of an error or a cancel.
(package private) static void noCheckPointVerification()
           
(package private)  void setCancellationMonitor(CancellationMonitor x)
          Used to allow the user to cancel only once.
(package private)  void setIsACancel()
          After a cancel was requested by selecting "Cancel", use this to set that cancel was verified.
private  void setIsAnError()
           
(package private)  void setListener(CompareSchemaListener listener)
          Allows execution to know minimal details about the user.
(package private)  void testGuiForACancel()
          This method is placed liberally in the code to test for the user canceling.
(package private)  void updateGuiActivitySubject(String activity_name, String activity_subject_type, String activity_subject)
          Used when an activity is a collection of activity_subjects, but the total number of activity_subjects IS NOT known.
(package private)  void updateGuiActivitySubject(String activity_name, String activity_subject_type, String activity_subject, int activity_subject_progress_min, int activity_subject_progress_current, int activity_subject_progress_max)
          Used when an activity is a collection of activity_subjects, and the total number of activity_subjects IS known.
private  void updateGuiAsCanceling()
           
(package private) static void updateGuiAsCompleted()
           
(package private)  void updateGuiAtACheckPoint(int check_point_number, String previous_name, String next_name)
          This method is ignored by non-GUI execution.
(package private) static void updateGuiWithSchemaResults(SchemaResults x)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cancellationMonitor_

private static CancellationMonitor cancellationMonitor_

compareSchemaListener_

private static CompareSchemaListener compareSchemaListener_

checkPoints_

private static CheckPoints checkPoints_

isACancelRequested_

private static boolean isACancelRequested_

isACancel_

private static boolean isACancel_

isAnError_

private static boolean isAnError_

testRequired_

private static boolean testRequired_

debugByAddingCheckPoints_

private static boolean debugByAddingCheckPoints_

date0_

private static Date date0_

time0_

private static long time0_

date1_

private static Date date1_

time1_

private static long time1_

timeLast_

private static long timeLast_
Constructor Detail

GuiManager

GuiManager()
Method Detail

setCancellationMonitor

void setCancellationMonitor(CancellationMonitor x)
Used to allow the user to cancel only once.

Parameters:
x - Used to detect the GUI user canceling all execution.

setListener

void setListener(CompareSchemaListener listener)
Allows execution to know minimal details about the user. Allows this code to compile first, without depending on the user's code.

Parameters:
listener - A contract for the user and this code to interact.

noCheckPointVerification

static void noCheckPointVerification()

updateGuiAtACheckPoint

void updateGuiAtACheckPoint(int check_point_number,
                            String previous_name,
                            String next_name)
                      throws CompareSchemaException,
                             CancelException
This method is ignored by non-GUI execution. The checkpoints become updates to the GUI's fields.

Parameters:
check_point_number - One of many defined in the class Checkpoints.
previous_name - Used to verify a check point was not skipped and display this activity as completed.
next_name - Used to display the next activity as begun.
Throws:
CompareSchemaException - If there is an error during execution.
CancelException - If the user canceled during execution.

updateGuiActivitySubject

void updateGuiActivitySubject(String activity_name,
                              String activity_subject_type,
                              String activity_subject,
                              int activity_subject_progress_min,
                              int activity_subject_progress_current,
                              int activity_subject_progress_max)
Used when an activity is a collection of activity_subjects, and the total number of activity_subjects IS known. Produces a second-level progress bar.

Parameters:
activity_name - An activity that is a collection of activity_subjects that have already been counted.
activity_subject_type - A less active filed, used to group identical activity_subjects types.
activity_subject - A more active field used to identify the specific activity_subject.
activity_subject_progress_min - Typically equals zero.
activity_subject_progress_current - Highlight the space between the min and this current value.
activity_subject_progress_max - Keep un-highlighted the space between the current and max value.

updateGuiActivitySubject

void updateGuiActivitySubject(String activity_name,
                              String activity_subject_type,
                              String activity_subject)
Used when an activity is a collection of activity_subjects, but the total number of activity_subjects IS NOT known. Does not produce a second-level progress bar. It can only display the activity_subjects as it encounters them.

Parameters:
activity_name - An activity that is a collection of activity_subjects, but they have not been counted.
activity_subject_type - A less active filed, used to group identical activity_subjects types.
activity_subject - A more active field used to identify the specific activity_subject.

updateGuiAsCompleted

static void updateGuiAsCompleted()
                          throws CompareSchemaException
Throws:
CompareSchemaException

updateGuiWithSchemaResults

static void updateGuiWithSchemaResults(SchemaResults x)
                                throws CompareSchemaException
Throws:
CompareSchemaException

testGuiForACancel

void testGuiForACancel()
                 throws CompareSchemaException,
                        CancelException
This method is placed liberally in the code to test for the user canceling.

Throws:
CompareSchemaException - There was an error during execution.
CancelException - The user canceled during execution.

updateGuiAsCanceling

private void updateGuiAsCanceling()
                           throws CancelException
Throws:
CancelException

getIsACancelRequested

boolean getIsACancelRequested()
A cancel was requested if the user selected the "Cancel". A cancel does not exist until the user verifies (y/n) that they did select the "Cancel".

Returns:
The cancel prompt is showing, but verification has not occurred.

getIsACancel

boolean getIsACancel()
After a cancel was requested by selecting "Cancel", ask: Was the cancel verified?

Returns:
Was the cancel verified.

setIsACancel

void setIsACancel()
After a cancel was requested by selecting "Cancel", use this to set that cancel was verified.


getIsAnError

boolean getIsAnError()
Did execution stop because of an error or a cancel.

Returns:
The code experienced an error.

setIsAnError

private void setIsAnError()