mi.getContext().putValue(component.Manager.INTERFACES, interfaces);
mi.getContext().putValue(component.Manager.CLASSES, classes);
mi.getContext().putValue(component.Manager.NAME, GRAPHICAL_EDITOR_UI_NAME);
FComponent ui = (FComponent) mi.getInstance(component.Manager.NGOBJECT, FComponent.class);
//end
//���actionMap��NGObjectʵ��
interfaces = new Hashtable();
classes = new Hashtable();
Object[] keys = actionMap.keys();
for (int i = 0; i < keys.length; i++) {
interfaces.put(keys[i], actionMap.get(keys[i]));
classes.put(keys[i], Action.class);
}
mi = component.Manager.getInstance();
mi.getContext().putValue(component.Manager.INTERFACES, interfaces);
mi.getContext().putValue(component.Manager.CLASSES, classes);
mi.getContext().putValue(component.Manager.NAME, ACTIONS_NAME);
FComponent actions = (FComponent) mi.getInstance(component.Manager.NGOBJECT, FComponent.class);
//
//��װ�������յ�GraphicalEditor��NGObjectʵ��
interfaces = new Hashtable();
classes = new Hashtable();
interfaces.put(GRAPHICAL_EDITOR_INTERFACE, graphicalEditor);
interfaces.put(GRAPHICAL_EDITOR_UI_NAME, ui);
interfaces.put(ACTIONS_NAME, actions);
interfaces.put(DRAWING_VIEW_CONTAINER_INTERFACE, drawingViewContainer);
interfaces.put(DROP_TARGET_LISTENER_INTERFACE, dropTargetListener);
interfaces.put(ELEMENT_LOCATOR_INTERFACE, elementLocator);
classes.put(GRAPHICAL_EDITOR_INTERFACE, GraphicalEditor.class);
classes.put(GRAPHICAL_EDITOR_UI_NAME, FComponent.class);
classes.put(ACTIONS_NAME, FComponent.class);
classes.put(DRAWING_VIEW_CONTAINER_INTERFACE, DrawingViewContainer.class);
classes.put(DROP_TARGET_LISTENER_INTERFACE, DropTargetListener.class);
classes.put(ELEMENT_LOCATOR_INTERFACE, ElementLocator.class);
mi = component.Manager.getInstance();
mi.getContext().putValue(component.Manager.INTERFACES, interfaces);
mi.getContext().putValue(component.Manager.CLASSES, classes);
mi.getContext().putValue(component.Manager.NAME, GRAPHICAL_EDITOR_NAME);
FComponent rst = (FComponent) mi.getInstance(component.Manager.NGOBJECT, FComponent.class);
//
return rst;
}