Skip to main content



      Home
Home » Archived » Visual Editor (VE) » Disable add components
Disable add components [message #607951] Tue, 14 June 2005 00:37
Eclipse UserFriend
Helo guys,

I have extend Visual Editor to support my custom component, there are
few components that i created allows other component to be add into it
(drop another component inside the display), because of my component
extends java.awt.Panel.

I also have some other component that extends java.awt.Container, but i
managed to disable adding stuff into it by using the .override file.
When i tried to do the same thing for a Panel, it wont work.

How to prevent users from dropping a component into my custom component?

Regards,

Memet.

Attached below is the .override file for my component that extends
Container (MyCalendar)

-- begin --

<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:org.eclipse.ve.internal.cde.decorators="http:///org/eclipse/ve/internal/cde/decorators.ecore"

xmlns:org.eclipse.ve.internal.cde.utility="http:///org/eclipse/ve/internal/cde/utility.ecore"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:event="event.xmi">
<event:Add featureName="eAnnotations">
<addedEObjects
xsi:type=" org.eclipse.ve.internal.cde.decorators:ClassDescriptorDecora tor "
treeViewClassname=" org.eclipse.ve.jfc/org.eclipse.ve.internal.jfc.core.Componen tTreeEditPart "

graphViewClassname=" org.eclipse.ve.jfc/org.eclipse.ve.internal.jfc.core.Componen tGraphicalEditPart ">
<graphic
xsi:type="org.eclipse.ve.internal.cde.utility:GIFFileGraphic "
resourceName="platform:/plugin/com.myplugin.ve/icons/MyCalendar.gif "/>
</addedEObjects>
</event:Add>
</xmi:XMI>

-- end --

And this is my component that extends Panel (MyPanel)

-- begin --

<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:org.eclipse.ve.internal.cde.decorators="http:///org/eclipse/ve/internal/cde/decorators.ecore"

xmlns:org.eclipse.ve.internal.cde.utility="http:///org/eclipse/ve/internal/cde/utility.ecore"

xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:org.eclipse.ve.internal.jcm="http:///org/eclipse/ve/internal/jcm.ecore"
xmlns:event="event.xmi">
<event:Add featureName="eAnnotations">
<addedEObjects
xsi:type=" org.eclipse.ve.internal.cde.decorators:ClassDescriptorDecora tor "
treeViewClassname=" org.eclipse.ve.jfc/org.eclipse.ve.internal.jfc.core.Componen tTreeEditPart "

graphViewClassname=" org.eclipse.ve.jfc/org.eclipse.ve.internal.jfc.core.Componen tGraphicalEditPart ">
<graphic
xsi:type="org.eclipse.ve.internal.cde.utility:GIFFileGraphic "
resourceName="platform:/plugin/com.myplugin.ve/icons/MyPanel.gif "/>
</addedEObjects>
<addedEObjects xsi:type="org.eclipse.ve.internal.jcm:BeanDecorator"
beanProxyClassName=" com.myplugin.ve/com.myplugin.ide.util.eclipse.ImagePathProxy Adapter "/>

</event:Add>

</xmi:XMI>

-- end --
Previous Topic:Swing: using factory methods to build GUI
Next Topic:The TabbedPane test does not work and hangs Eclipse
Goto Forum:
  


Current Time: Mon Jun 23 03:30:20 EDT 2025

Powered by FUDForum. Page generated in 0.07703 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top