CmdTotalOntVlanVlanView.java :  » App » learnandroid » com » lgnortel » r4 » r4equipment » management » ont » l2switching » Android Open Source

Android Open Source » App » learnandroid 
learnandroid » com » lgnortel » r4 » r4equipment » management » ont » l2switching » CmdTotalOntVlanVlanView.java
/**
 * 
 */
package com.lgnortel.r4.r4equipment.management.ont.l2switching;

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>
 * 
 * Title: CmdTotalVlanView<br>
 * Description: <br>
 * Copyright: Copyright(c) 2009 LG-NORTEL ALL Rights Reserved<br>
 * Company: LG-Nortel<br>
 * 
 * @author Jonghwa, Lee
 * @version 0.1
 * @created 2009. 5. 13.
 * @modified 2009. 5. 13.
 * @product EFA R4.0 EMS
 * @sw_block
 */
public class CmdTotalOntVlanVlanView extends JPanel implements TotalViewInterface {
  /**
   * 
   */
  private static final long serialVersionUID = 2553057363197668390L;

  int viewId;
  int neId;
  
  private OntVlanVlanComplexView pnlVlanVlan;

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

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

  /**
   * the constructor
   * 
   * @param neId
   *            :node id
   * @param shelfId
   *            :shelf id
   * @param slotId
   *            :slot id
   * @param portId
   *            :port
   */

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

  /**
   * Request Initial data
   */

  public void requestInitialCmd() {
    pnlVlanVlan.requestInitializeCmd();
  }

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

  public void setViewId(int lViewId) {
    this.viewId = lViewId;
    pnlVlanVlan.setViewId(lViewId);
  }

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

  public int getViewId() {
    return viewId;
  }

  private void jbInit() throws Exception {
    pnlVlanVlan = new OntVlanVlanComplexView(neId, "VLAN VLAN");
    
    this.setLayout(new GridBagLayout());
    this.add(pnlVlanVlan, new GridBagConstraints(1, 1, 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.
   */

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

    } else {
      pnlVlanVlan.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.