Package tcg.scada.sim.iecsim.datastore

Examples of tcg.scada.sim.iecsim.datastore.DataStoreFrame


    dsChooser_ = new DSChooser(this);
  }

  public void internalFrameActivated(InternalFrameEvent e)
  {
    DataStoreFrame frame = (DataStoreFrame) e.getInternalFrame();
      if (frame.getDataStore().hasRunningScript())
      {
        menu_.enableMenuItem("startscript", false);
        menu_.enableMenuItem("stopscript", true);
      }
      else
View Full Code Here


      menu_.enableMenuItem("stopscript", false);
    }
    else
    {
      //get the first available internal frame and activate it
      DataStoreFrame frame = null;
      for (int i=0; i<desktop_.getComponentCount(); i++) {
        try {
          frame = (DataStoreFrame) desktop_.getComponent(i);
          desktop_.setSelectedFrame(frame);
          desktop_.getDesktopManager().activateFrame(desktop_.getSelectedFrame());
View Full Code Here

    updateStatusPanel();
  }

  public void internalFrameClosing(InternalFrameEvent e)
  {
    DataStoreFrame frame = (DataStoreFrame) e.getInternalFrame();
    frame.setStatusString("Closing OCC Sub-system. Please wait...");
    frame.repaint();
    frame.close();
  }
View Full Code Here

  /**
   * Get the active datastore/
   **/
    public DataStore getActiveDataStore()
    {
      DataStoreFrame frame = (DataStoreFrame)desktop_.getSelectedFrame();
      if (frame == null)
      {
        return null;
      }
      return frame.getDataStore();
    }
View Full Code Here

   * Close current active frame
   */
  public void closeActiveFrame()
  {
    //TODO
    DataStoreFrame frame = getActiveFrame();
    if(frame == null)
    {
      return;
    }
 
    //close the active frame
    frame.close();
    frame.dispose();

    //update the menu
    //TODO: shouldn't it depends on the next activated frame
    if (desktop_.getAllFrames().length == 0)
    {
View Full Code Here

  {
    JInternalFrame [] frames = desktop_.getAllFrames();
    int numFrames = frames.length;
    for (int i = 0; i < numFrames; i++)
    {
      DataStoreFrame frame = (DataStoreFrame) frames[i];
      frame.close();
      frame.dispose();
    }
  }
View Full Code Here

    }
   
    /** Snapshot action **/
    else if (message.equals("loadsnapshot"))
    {
      DataStoreFrame frame = this.getActiveFrame();
      if (frame == null)
      {
        return;
      }
     
      frame.setCursor(WAIT_CURSOR);
      status = SnapshotManager.loadSnapshot(frame.getDataStore());
      frame.setCursor(DEFAULT_CURSOR);
     
      //if not OK, give some sort of warning / feedback to user
      if (!status)
      {
        //MessageBox.Ok("Unable to load Snapshot file.");
        JOptionPane.showMessageDialog(MainWindow.getInstance(),
            "Unable to load Snapshot file.", Main.APPLICATION_NAME,
            JOptionPane.ERROR_MESSAGE);
      }   
    }
    else if (message.equals("savesnapshot")) {
      DataStoreFrame frame = this.getActiveFrame();
      if (frame == null)
      {
        return;
      }
     
      frame.setCursor(WAIT_CURSOR);
      status = SnapshotManager.saveSnapshot(frame.getDataStore());
      frame.setCursor(DEFAULT_CURSOR);
     
      //if not OK, give some sort of warning / feedback to user
      if (!status)
      {
        JOptionPane.showMessageDialog(MainWindow.getInstance(),
View Full Code Here

TOP

Related Classes of tcg.scada.sim.iecsim.datastore.DataStoreFrame

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.