package com.vci.client.uif.engine.client;
|
|
import java.awt.Component;
|
import java.util.HashMap;
|
import java.util.Map;
|
|
import com.vci.client.portal.utility.PLDefination;
|
import com.vci.client.ui.swing.components.VCIJPanel;
|
import com.vci.client.uif.engine.client.event.UIBaseEventContainer;
|
import com.vci.client.uif.engine.common.CBOHelper;
|
import com.vci.client.uif.engine.common.IDataNode;
|
import com.vci.corba.portal.data.PLPageDefination;
|
import com.vci.corba.portal.data.PLTabPage;
|
|
public abstract class AbstractRegionPanel extends VCIJPanel implements IRegionPanel {
|
|
/**
|
*
|
*/
|
private static final long serialVersionUID = -4386384547114079714L;
|
|
private String type = "";
|
private String context = "";
|
public IDataModel dataModel = null;
|
private PLDefination defination = null;
|
private PLPageDefination pageDefinition = null;
|
private boolean built = false;
|
private String tabId = "";
|
private PLTabPage tabPage = null;
|
private Map<String, String> fromDataMap = new HashMap<String, String>();
|
private UIBaseLayoutPanel baseLayoutPanel = null;
|
private UIBaseEventContainer eventContainer;
|
private boolean isCancel = false;
|
private boolean isFinish = false;
|
/*private IDataNode sourceData = null;*/
|
|
private Component componentPanel = null;//new VCIJPanel(); by zhonggy 2015-07
|
|
@Override
|
public void preInit(String type, String context) {
|
setType(type);
|
setContext(context);
|
}
|
|
@Override
|
public void setType(String type) {
|
this.type = type;
|
}
|
|
@Override
|
public String getType() {
|
return this.type;
|
}
|
|
@Override
|
public void setContext(String context) {
|
this.context = context;
|
}
|
|
@Override
|
public String getContext() {
|
return this.context;
|
}
|
|
@Override
|
public void setDataModel(IDataModel dataModel){
|
this.dataModel = dataModel;
|
}
|
|
@Override
|
public IDataModel getDataModel(){
|
return this.dataModel;
|
}
|
|
@Override
|
public void setDefination(PLDefination defination){
|
this.defination = defination;
|
}
|
|
@Override
|
public PLDefination getDefination(){
|
return this.defination;
|
}
|
@Override
|
public void setPageDefinition(PLPageDefination pageDefinition){
|
this.pageDefinition = pageDefinition;
|
}
|
@Override
|
public PLPageDefination getPageDefinition(){
|
return this.pageDefinition;
|
}
|
@Override
|
public boolean isBuilt(){
|
return this.built;
|
}
|
|
protected void setBuilt(boolean built){
|
this.built = built;
|
}
|
|
@Override
|
public Component getComponentPanel() {
|
if (componentPanel != null) {
|
return this.componentPanel;
|
}else {
|
return this; //by zhonggy 2015-07
|
}
|
}
|
|
protected void setComponentPanel(Component componentPanel){
|
this.componentPanel = componentPanel;
|
}
|
|
@Override
|
public void setTabId(String tabId){
|
this.tabId = tabId;
|
}
|
|
@Override
|
public String getTabId(){
|
return this.tabId;
|
}
|
|
@Override
|
public void setTab(PLTabPage tabPage) {
|
this.tabPage = tabPage;
|
}
|
|
@Override
|
public PLTabPage getTabPage() {
|
return this.tabPage;
|
}
|
public void setFromDataMap(Map<String, String> fromDataMap){
|
this.fromDataMap = fromDataMap;
|
}
|
public Map<String, String> getFromDataMap(){
|
return this.fromDataMap;
|
}
|
|
/**
|
* 返回此IRegion所在的UILayout对象
|
* @return 此IRegion所在的UILayout对象
|
*/
|
public UIBaseLayoutPanel getBaseLayoutPanel() {
|
return baseLayoutPanel;
|
}
|
/**
|
* 返回此IRegionPanel所在的UIBaseLayoutPanel对象
|
* @return baseLayoutPanel 此IRegion所在的UIBaseLayoutPanel对象
|
*/
|
public void setBaseLayoutPanel(UIBaseLayoutPanel baseLayoutPanel) {
|
this.baseLayoutPanel = baseLayoutPanel;
|
}
|
|
public UIBaseEventContainer getEventContainer() {
|
return eventContainer;
|
}
|
|
public boolean isCancel() {
|
return isCancel;
|
}
|
|
public void setCancel(boolean isCancel) {
|
this.isCancel = isCancel;
|
}
|
|
public boolean isFinish() {
|
return isFinish;
|
}
|
|
public void setFinish(boolean isFinish) {
|
this.isFinish = isFinish;
|
}
|
|
public void loadEvent() {
|
//TODO 增加事件加载的代码
|
}
|
|
/**
|
* 返回 此IRegionPanel初始时、唯一恒定不变的SourceData对象
|
* @return 此IRegionPanel初始时、唯一恒定不变的SourceData对象
|
*/
|
public IDataNode getSourceData() {
|
//return sourceData;
|
return getDataModel().getSourceData();
|
}
|
|
/**
|
* 设置此IRegionPanel初始时、唯一恒定不变的SourceData对象
|
* @param sourceData 此IRegionPanel初始时、唯一恒定不变的SourceData对象
|
*//*
|
public void setSourceData(IDataNode sourceData) {
|
this.sourceData = sourceData;
|
}*/
|
|
/**
|
* 根据传入的DataNode获取其上bo对象的OID
|
* @return
|
*/
|
@Override
|
public String getBusinessObjectOid(IDataNode dataNode) {
|
if (dataNode == null)
|
return "";
|
|
return CBOHelper.getBusinessObjectOid(dataNode);
|
}
|
|
/**
|
* 根据传入的DataNode获取其上bo对象的type
|
* @return
|
*/
|
@Override
|
public String getBusinessObjectType(IDataNode dataNode) {
|
return CBOHelper.getBusinessObjectType(dataNode);
|
}
|
|
@Override
|
public String getLinkObjectOid(IDataNode dataNode) {
|
return CBOHelper.getLinkObjectOid(dataNode);
|
}
|
// /**
|
// * @Title :默认的界面刷新 by zhonggy 2015-07
|
// * @Description :
|
// */
|
// public void refreshUI(){
|
// //TODO:为了防止继承该抽象类的IRegionPanel对象不出现编译问题在此增加实现;具体应该具体的UI控件去实现!!!
|
// }
|
}
|