CmdTotalOperMdMaStatusView.java :  » App » learnandroid » com » lgnortel » r4 » r4equipment » management » olt » eoam » cfm » oper » Android Open Source

Android Open Source » App » learnandroid 
learnandroid » com » lgnortel » r4 » r4equipment » management » olt » eoam » cfm » oper » CmdTotalOperMdMaStatusView.java
/**
 * 
 */
package com.lgnortel.r4.r4equipment.management.olt.eoam.cfm.oper;

import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;

import javax.swing.JPanel;

import com.lgnortel.r4.r4equipment.common.TotalViewInterface;

/**
 * 
 * Copyright (c) 2009 LG-Nortel, Inc. All Rights Reserved.
 * 
 * CONFIDENTIALITY AND LIMITED USE: This software, including any software of <br>
 * third parties embodied herein, contains code, information, data and concepts <br>
 * which are confidential and/or proprietary to LG-Nortel and such third <br>
 * parties. This software is licensed for use solely in accordance with the <br>
 * terms and conditions of the applicable license agreement with LG-Nortel or <br>
 * its authorized distributor, and not for any other use or purpose. No <br>
 * redistribution of this software by any party is permitted. <br>
 * 
 * Company: LG-Nortel<br>
 * Title: CmdTotalEoamMdStatusView.java<br>
 * Description: <br>
 * Copyright: Copyright(c) 2009 LG-NORTEL ALL Rights Reserved<br>
 * Company: LG-Nortel<br>
 * 
 * @author SangHee, Kim
 * @version 0.1
 * @created 2009. 9. 30.
 * @modified 2009. 9. 30.
 * @product R4 EMS 4.0
 * @sw_block CLIENT BLOCK
 */
public class CmdTotalOperMdMaStatusView extends JPanel implements TotalViewInterface{

  /**
   * 
   */
  private static final long serialVersionUID = -896870019369289463L;


  private OperCfmMdListComplexView pnlOperCfmList;
  
  
  int viewId;
  int neId;

  /**
   * the constructor.
   * 
   * @param _neId
   *            the node id.
   * @param _shelfId
   *            the shelf id.
   */

  public CmdTotalOperMdMaStatusView(int _neId) {
    try {
      this.neId = _neId;
      jbInit();
    } catch (Exception e) {
      e.printStackTrace();
    }
  }

  /**
   * the constructor.
   * 
   * @param neId
   *            the node id.
   * @param shelfIdLocal
   *            the shelf id.
   * @param slotId
   *            the slot id.
   */

  public CmdTotalOperMdMaStatusView(int neId, int shelfId, int slotId, int portId) {
    this(neId);
  }

  /**
   * Request Initial Data
   */

  public void requestInitialCmd() {
    pnlOperCfmList.get();
  }

  /**
   * set the view id.
   * 
   * @param lViewId
   *            the view id.
   */

  public void setViewId(int _viewId) {
    this.viewId = _viewId;
    pnlOperCfmList.setViewId(_viewId);
  }

  /**
   * get the view id.
   * 
   * @return a int value for view id.
   */

  public int getViewId() {
    return viewId;
    
  }

  private void jbInit() {
    
    pnlOperCfmList = new OperCfmMdListComplexView(neId, "Show MD-List");
    
    this.setLayout(new GridBagLayout());
    this.add(pnlOperCfmList, new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(1 ,1, 1, 1), 0, 0));
  }

  /**
   * the response method.
   * 
   * @param viewId
   *            the view id.
   * @param userId
   *            the user id.
   * @param nodeId
   *            the node id.
   * @param cmdCode
   *            the command code.
   * @param data
   *            the Object array for the data.
   * @param result
   *            the int value about the result.
   * @return the true if call the method.
   */

  public boolean cmdResponse(int viewId, int userId, int nodeId, int cmdCode, Object[] data, int result, String errMessage) {
    if (null == data || 0 == data.length) {

    } else {
      pnlOperCfmList.cmdResponse(viewId, userId, nodeId, cmdCode, data, result, errMessage);
    }
    return true;
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.