//gh pattern begin
PatternBase pb = de.FeatureModellingTool.PatternBase.Manager.createPatternBase();
pb = pb.load();
PatternGraphicalEditor pge = new PatternGraphicalEditor(this , pb);
graphicalEditor.getContext().putValue(de.FeatureModellingTool.Pattern.ConstantDefinition.PATTERN_BASE , pb);
graphicalEditor.getContext().putValue("CONTAINER" , this);
layout.addWindow(pge.getEditorArea() , "ģ��༭��" , icon , ConstantDefinition.Position.CEN, false);
// ((GraphicalEditorImplementation)graphicalEditor).pge = pge;
// popupMenu.add(((GraphicalEditorImplementation)graphicalEditor).getPasteFeatureTreeAction());
popupMenu.add(((GraphicalEditorImplementation)graphicalEditor).getUsePatternAction_Base());
// popupMenu = pge.getGraphicalEditorUI().getEditorAreaPopupMenu();
// featureInfoEditor = de.FeatureModellingTool.ElementInfoEditor.Manager.createFeatureInfoEditor();
// featureInfoEditor.getContext().putValue(de.FeatureModellingTool.ElementInfoEditor.ConstantDefinition.FEATURE_MODEL, featureModelNGObject.getInterface(de.FeatureModellingTool.FeatureModel.Manager.FEATURE_MODEL_INTERFACE));
// featureInfoEditor.getContext().putValue(de.FeatureModellingTool.ElementInfoEditor.ConstantDefinition.FEATURE_EDITOR, featureEditor);
// featureInfoEditor.getContext().putValue(de.FeatureModellingTool.ElementInfoEditor.ConstantDefinition.FEATURE_MODEL_EDITOR, featureModelEditor);
// featureInfoEditor.getContext().putValue(de.FeatureModellingTool.ElementInfoEditor.ConstantDefinition.GRAPHICAL_EDITOR, pge);
// featureInfoEditor.getContext().putValue(de.FeatureModellingTool.ElementInfoEditor.ConstantDefinition.FEATURE_RELATION_MANAGER, featureRelationManager);
// featureInfoEditor.getContext().putValue(de.FeatureModellingTool.ElementInfoEditor.ConstantDefinition.CONTAINER, this);
// deleteAction = (Action) pge.getActionMap().get(de.FeatureModellingTool.GraphicalEditor.ConstantDefinition.FIGURE_DELETE_ACTION);
// deleteAction.putValue(de.FeatureModellingTool.GraphicalEditor.ConstantDefinition.FEATURE_MODEL, featureModel);
// deleteAction.putValue(de.FeatureModellingTool.GraphicalEditor.ConstantDefinition.FEATURE_MODEL_EDITOR, featureModelEditor);
// deleteAction.putValue(de.FeatureModellingTool.GraphicalEditor.ConstantDefinition.CONSTRAINT_MODEL, constraintModel);
// deleteAction.putValue(de.FeatureModellingTool.GraphicalEditor.ConstantDefinition.CONSTRAINT_MODEL_EDITOR, constraintModelEditor);
// deleteAction.putValue(de.FeatureModellingTool.GraphicalEditor.ConstantDefinition.INTERACTION_MODEL, interactionModel);
// deleteAction.putValue(de.FeatureModellingTool.GraphicalEditor.ConstantDefinition.INTERACTION_MODEL_EDITOR, interactionModelEditor);
//
// popupMenu.add(featureInfoEditor.getEntryAction());
// popupMenu.add(deleteAction);
// popupMenu.add(pge.getCloneFeatureTreeAction());
//
PatternExplorerImplementation pei = new PatternExplorerImplementation();
//--�������װ����װ��������Ľӿ�
pei.getContext().putValue(de.FeatureModellingTool.Pattern.ConstantDefinition.PATTERN_BASE , pb);
//--UI����װ��������UI���ɵ����������
JScrollPane peiUI = new JScrollPane(pei.getExplorerComponent());
peiUI.setBorder(BorderFactory.createEmptyBorder());
peiUI.getViewport().setBackground(Color.white);
layout.addWindow(peiUI, "Pattern", icon, ConstantDefinition.Position.LEF, false);
pei.addPropertyChangeListener(de.FeatureModellingTool.Pattern.ConstantDefinition.CURRENT_TEMPLATE , pge.getCurrentTemplateChangeListener());
//gh pattern end
}