Ejemplo n.º 1
0
 private GuiBean saveStateToServer() {
   plotServer.deleteIObserver(this);
   if (imageGrid == null) return null;
   ArrayList<GridImageEntry> entries = imageGrid.getListOfEntries();
   GuiBean bean = new GuiBean();
   bean.put(GuiParameters.PLOTMODE, GuiPlotMode.IMGEXPL);
   bean.put(GuiParameters.IMAGEGRIDSTORE, entries);
   return bean;
 }
Ejemplo n.º 2
0
  /**
   * Push gui information back to plot server
   *
   * @param key
   * @param value
   */
  @Override
  public void putGUIInfo(GuiParameters key, Serializable value) {
    getGUIState();

    guiBean.put(GuiParameters.PLOTID, plotId); // put plotID in bean
    guiBean.put(key, value);

    pushGUIState();
  }
Ejemplo n.º 3
0
  /**
   * Remove gui information from plot server
   *
   * @param key
   */
  @Override
  public void removeGUIInfo(GuiParameters key) {
    getGUIState();

    guiBean.put(GuiParameters.PLOTID, plotId); // put plotID in bean
    guiBean.remove(key);

    pushGUIState();
  }
Ejemplo n.º 4
0
 private void cleanUpOnServer() {
   FileOperationBean fopBean = new FileOperationBean(FileOperationBean.DELETEGRIDIMGTEMPDIR);
   GuiBean bean = new GuiBean();
   bean.put(GuiParameters.FILEOPERATION, fopBean);
   // plotServer.deleteIObserver(this);
   try {
     plotServer.updateGui(plotViewName, bean);
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
Ejemplo n.º 5
0
  /**
   * Push gui information back to plot server
   *
   * @param key
   * @param value
   */
  public void pushGUIUpdate(GuiParameters key, Serializable value) {
    if (guiBean == null) {
      try {
        guiBean = plotServer.getGuiState(plotViewName);
      } catch (Exception e) {
        logger.warn("Problem with getting GUI data from plot server");
      }
      if (guiBean == null) guiBean = new GuiBean();
    }

    guiBean.put(GuiParameters.PLOTID, plotID); // put plotID in bean

    guiBean.put(key, value);

    try {
      logger.info("Pushing bean to server: {}", guiBean);
      plotServer.updateGui(plotViewName, guiBean);
    } catch (Exception e) {
      logger.warn("Problem with updating plot server with GUI data");
      e.printStackTrace();
    }
  }