Beispiel #1
0
  /**
   * Add the new view manager into the list if we don't have one with the {@link ViewDescriptor} of
   * the new view manager already.
   *
   * @param newViewManager The new view manager
   */
  public void addViewManager(ViewManager newViewManager) {

    ViewManager vm = findViewManagerInList(newViewManager.getViewDescriptor());

    if (vm == null) {
      synchronized (viewManagers) {
        viewManagers.add(newViewManager);
      }
      try {
        Trace.call1("VMManager calling ViewManager.init");
        newViewManager.init();
        Trace.call2("VMManager calling ViewManager.init");
      } catch (Exception exc) {
        logException("Adding view manager", exc);
      }
      setLastActiveViewManager(newViewManager);
    }
    getIdvUIManager().viewManagerAdded(newViewManager);
  }
Beispiel #2
0
  /**
   * Initialize this object.
   *
   * @throws RemoteException
   * @throws VisADException
   */
  protected void init() throws VisADException, RemoteException {
    if (getHaveInitialized()) {
      return;
    }

    super.init();
    initVerticalRange();

    if (isInteractive()) {
      if (readout == null) {
        readout =
            new NavigatedDisplayCursorReadout(getNavigatedDisplay(), null) {
              protected JLabel getValueDisplay() {
                JLabel label = super.getValueDisplay();

                if (label == null) {
                  IdvWindow window = IdvWindow.findWindow(fullContents);

                  if (window != null) {
                    label = ((IdvWindow) window).getMsgLabel();
                    setValueDisplay(label);
                  }
                }

                return label;
              }
            };
      }

      readout.setActive(getShowCursor());

      IdvWindow myWindow = IdvWindow.findWindow(fullContents);

      initReadout(myWindow);
    }
  }