/**
*
*/
package com.lgnortel.r4.r4equipment.management.ont.accessmanagement;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import javax.swing.JPanel;
import com.lgnortel.platform.model.LabelMenuMgr;
import com.lgnortel.platform.model.NetworkMgr;
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: CmdTotalMacAddressView<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 CmdTotalOntMacAddressView extends JPanel implements TotalViewInterface {
/**
*
*/
private static final long serialVersionUID = -2582116268438356941L;
int viewId;
int neId;
private OntMacAddressComplexView pnlMacAddress;
LabelMenuMgr labelMenuMgr = LabelMenuMgr.getInstance();
NetworkMgr networkMgr = NetworkMgr.getInstance();
/**
* the constructor.
*
* @param _neId
* the node id.
* @param _shelfId
* the shelf id.
*/
public CmdTotalOntMacAddressView(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 CmdTotalOntMacAddressView(int neId, int shelfId, int slotId, int portId) {
this(neId);
}
/**
* Request Initial data
*/
public void requestInitialCmd() {
pnlMacAddress.get();
}
/**
* set the view id.
*
* @param lViewId
* the view id.
*/
public void setViewId(int lViewId) {
this.viewId = lViewId;
pnlMacAddress.setViewId(lViewId);
}
/**
* get the view id.
*
* @return a int value for view id.
*/
public int getViewId() {
return viewId;
}
private void jbInit() throws Exception {
pnlMacAddress = new OntMacAddressComplexView(neId, "MAC Address Table");
this.setLayout(new GridBagLayout());
this.add(pnlMacAddress, 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 {
pnlMacAddress.cmdResponse(viewId, userId, nodeId, cmdCode, data, result, errMessage);
}
return true; }
}
|