/**
*
*/
package com.lgnortel.r4.r4equipment.management.olt.alarm;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import javax.swing.JPanel;
import com.lgnortel.r4.r4equipment.common.TotalViewInterface;
public class CmdTotalEnvironmentalAlarmView extends JPanel implements TotalViewInterface {
/**
*
*/
private static final long serialVersionUID = -341640790541517102L;
private EnvironmentalAlarmComplexView pnlEnvAlarm;
int viewId;
int neId;
/**
* the constructor.
*
* @param _neId
* the node id.
* @param _shelfId
* the shelf id.
*/
public CmdTotalEnvironmentalAlarmView(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 CmdTotalEnvironmentalAlarmView(int neId, int shelfId, int slotId, int portId) {
this(neId);
}
/**
* Request Initial Data
*/
public void requestInitialCmd() {
pnlEnvAlarm.get();
}
/**
* set the view id.
*
* @param lViewId
* the view id.
*/
public void setViewId(int _viewId) {
this.viewId = _viewId;
pnlEnvAlarm.setViewId(_viewId);
}
/**
* get the view id.
*
* @return a int value for view id.
*/
public int getViewId() {
return viewId;
}
private void jbInit() {
pnlEnvAlarm = new EnvironmentalAlarmComplexView(neId, "Environmental Alarm");
this.setLayout(new GridBagLayout());
this.add(pnlEnvAlarm, 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 {
pnlEnvAlarm.cmdResponse(viewId, userId, nodeId, cmdCode, data, result, errMessage);
}
return true;
}
}
|