Esempio n. 1
0
  private void commonConstructor() {
    System.err.println("Render Navigator View ...");
    this.startTimeMSecs = System.currentTimeMillis();
    // isDebugPrint = true;
    isDebugPrint = false;
    // timelineColorMap = createTimelineColorMap();
    highlightPathNodesList = null;
    this.setName(navigatorFrame.getTitle());
    viewName = ViewConstants.NAVIGATOR_VIEW;

    navLinkMap = new HashMap();
    entityNavNodeMap = new HashMap();

    setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

    jGoView = new NavigatorJGoView(this);
    jGoView.addViewListener(createViewListener());
    jGoView.setBackground(ViewConstants.VIEW_BACKGROUND_COLOR);
    add(jGoView, BorderLayout.NORTH);
    jGoView.validate();
    jGoView.setVisible(true);
    this.setVisible(true);
    // SwingUtilities.invokeLater( runInit);
    final SwingWorker worker =
        new SwingWorker() {
          public Object construct() {
            init();
            return null;
          }
        };
    worker.start();
  } // end commonConstructor
  /**
   * <code>VariableQueryView</code> - constructor
   *
   * @param variableList - <code>List</code> -
   * @param query - <code>String</code> -
   * @param planSequence - <code>ViewableObject</code> -
   * @param stepString - <code>String</code> -
   * @param viewSet - <code>ViewSet</code> -
   * @param sequenceQueryWindow - <code>JPanel</code> -
   * @param variableQueryFrame - <code>MDIInternalFrame</code> -
   * @param startTimeMSecs - <code>long</code> -
   * @param viewListener - <code>ViewListener</code> -
   */
  public VariableQueryView(
      final List variableList,
      final String query,
      final ViewableObject planSequence,
      final String stepString,
      final ViewSet viewSet,
      final JPanel sequenceQueryWindow,
      final MDIInternalFrame variableQueryFrame,
      final long startTimeMSecs,
      final ViewListener viewListener) {
    super((PwPlanningSequence) planSequence, (SequenceViewSet) viewSet);
    this.variableList = variableList;
    Collections.sort(
        variableList,
        new VariableQueryComparatorAscending(ViewConstants.DB_TRANSACTION_STEP_NUM_HEADER));
    this.query = query;
    this.planSequence = (PwPlanningSequence) planSequence;
    stepNumber = Integer.parseInt(stepString);
    this.viewSet = (SequenceViewSet) viewSet;
    this.sequenceQueryWindow = (SequenceQueryWindow) sequenceQueryWindow;
    viewFrame = variableQueryFrame;
    // for PWTestHelper.findComponentByName
    setName(variableQueryFrame.getTitle());
    this.startTimeMSecs = startTimeMSecs;
    if (viewListener != null) {
      addViewListener(viewListener);
    }

    setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

    SwingUtilities.invokeLater(runInit);
  } // end constructor