com.ptc.windchill.upgrade.tool
Class AddConstraintsState.AddConstraintsProgressDisplayAdapter

java.lang.Object
  extended bycom.ptc.windchill.upgrade.tool.AddConstraintsState.AddConstraintsProgressDisplayAdapter
All Implemented Interfaces:
AddConstraintsListener
Enclosing class:
AddConstraintsState

public class AddConstraintsState.AddConstraintsProgressDisplayAdapter
extends Object
implements AddConstraintsListener

Adapter that listens to the worker and updates the GUI appropriately.


Constructor Summary
AddConstraintsState.AddConstraintsProgressDisplayAdapter()
           
 
Method Summary
private  String consistency1(int progress_current)
           
private  void consistency2(int progress_current, int progress_max)
           
private  void consistency3(int progress_current, int progress_max)
           
private  void consistency4(String activity_name)
           
private  void consistency5(String activity_subject_type, String activity_subject)
           
private  int getOverallProgressBarCurrent()
           
private  int getOverallProgressBarMax()
           
private  void safeSetBarCurrent(JProgressBar bar, int i)
           
private  void safeSetBarMax(JProgressBar bar, int i)
           
private  void safeSetBarMin(JProgressBar bar, int i)
           
private  void safeSetBarString(JProgressBar bar, String x)
           
private  void safeSetBarVisibility(JProgressBar bar, boolean x)
           
private  void safeSetText(JLabel label, String text)
           
private  void setActivityName(String x)
           
private  void setActivitySubject(String x)
           
private  void setActivitySubjectIntro(boolean x)
           
private  void setActivitySubjectProgressBarCurrent(int i)
           
private  void setActivitySubjectProgressBarIsVisible(boolean x)
           
private  void setActivitySubjectProgressBarMax(int i)
           
private  void setActivitySubjectProgressBarMin(int i)
           
private  void setActivitySubjectProgressBarString(String x)
           
private  void setActivitySubjectType(String x)
           
 void setCurrentActivity(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.
 void setCurrentActivity(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.
 void setOverallProgress(int overall_progress_min, int overall_progress_current, int overall_progress_max)
          The highest level progress bar, incremented by completed "activity" (not percent of total time).
private  void setOverallProgressBarCurrent(int i)
           
private  void setOverallProgressBarMax(int i)
           
private  void setOverallProgressBarMin(int i)
           
private  void setOverallProgressBarString(String x)
           
 void setSchemaResults(SchemaResults x)
          Holds a variety of schema results from ModelDiff that the GUI should display.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AddConstraintsState.AddConstraintsProgressDisplayAdapter

public AddConstraintsState.AddConstraintsProgressDisplayAdapter()
Method Detail

safeSetText

private void safeSetText(JLabel label,
                         String text)

safeSetBarMin

private void safeSetBarMin(JProgressBar bar,
                           int i)

safeSetBarCurrent

private void safeSetBarCurrent(JProgressBar bar,
                               int i)

safeSetBarMax

private void safeSetBarMax(JProgressBar bar,
                           int i)

safeSetBarString

private void safeSetBarString(JProgressBar bar,
                              String x)

safeSetBarVisibility

private void safeSetBarVisibility(JProgressBar bar,
                                  boolean x)

setOverallProgressBarMin

private void setOverallProgressBarMin(int i)

setOverallProgressBarCurrent

private void setOverallProgressBarCurrent(int i)

getOverallProgressBarCurrent

private int getOverallProgressBarCurrent()

setOverallProgressBarMax

private void setOverallProgressBarMax(int i)

getOverallProgressBarMax

private int getOverallProgressBarMax()

setOverallProgressBarString

private void setOverallProgressBarString(String x)

setActivityName

private void setActivityName(String x)

setActivitySubjectProgressBarMin

private void setActivitySubjectProgressBarMin(int i)

setActivitySubjectProgressBarCurrent

private void setActivitySubjectProgressBarCurrent(int i)

setActivitySubjectProgressBarMax

private void setActivitySubjectProgressBarMax(int i)

setActivitySubjectProgressBarString

private void setActivitySubjectProgressBarString(String x)

setActivitySubjectProgressBarIsVisible

private void setActivitySubjectProgressBarIsVisible(boolean x)

setActivitySubjectIntro

private void setActivitySubjectIntro(boolean x)

setActivitySubjectType

private void setActivitySubjectType(String x)

setActivitySubject

private void setActivitySubject(String x)

consistency1

private String consistency1(int progress_current)

consistency2

private void consistency2(int progress_current,
                          int progress_max)

consistency3

private void consistency3(int progress_current,
                          int progress_max)

consistency4

private void consistency4(String activity_name)

consistency5

private void consistency5(String activity_subject_type,
                          String activity_subject)

setOverallProgress

public void setOverallProgress(int overall_progress_min,
                               int overall_progress_current,
                               int overall_progress_max)
The highest level progress bar, incremented by completed "activity" (not percent of total time). It is undesirable to have the user see a max, and then have that max change. However it is not enforced that max be known before execution begins, or be a constant.

Specified by:
setOverallProgress in interface AddConstraintsListener
Parameters:
overall_progress_min - Typically equals zero.
overall_progress_current - Highlight the space between the min and this current value.
overall_progress_max - Keep un-highlighted the space between the current and max value.

setCurrentActivity

public void setCurrentActivity(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. This method outputs through a "second-level" progress bar.

Specified by:
setCurrentActivity in interface AddConstraintsListener
Parameters:
activity_name - An activity that is a collection of activity_subjects that have already been counted.
activity_subject_type - A less active field, 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.

setCurrentActivity

public void setCurrentActivity(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.

Specified by:
setCurrentActivity in interface AddConstraintsListener
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.

setSchemaResults

public void setSchemaResults(SchemaResults x)
Holds a variety of schema results from ModelDiff that the GUI should display.

Specified by:
setSchemaResults in interface AddConstraintsListener