Class ContainerDropHandler
- java.lang.Object
-
- com.inductiveautomation.factorypmi.designer.beaninfo.tags.ContainerDropHandler
-
- All Implemented Interfaces:
TagDropHandler
public class ContainerDropHandler extends java.lang.Object implements TagDropHandler
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
ContainerDropHandler.ComponentCreator
Holds a name and a class of a component.protected static class
ContainerDropHandler.NamedList
It's a List<Object>, with a name!
-
Field Summary
Fields Modifier and Type Field Description protected javax.swing.JComponent
currentComponent
protected DesignerContext
currentContext
protected java.awt.dnd.DropTargetDropEvent
currentDropEvent
protected java.util.List<NodeBrowseInfo>
currentNodeList
-
Constructor Summary
Constructors Constructor Description ContainerDropHandler()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.swing.JPopupMenu
createMenu(DesignerContext context, DataTypeEx type)
boolean
handleDrop(DesignerContext context, java.util.List<NodeBrowseInfo> nodes, javax.swing.JComponent bean, java.awt.dnd.DropTargetDropEvent dropEvent)
Handles the drop of one or more tags onto a component.protected void
initOptions()
static java.awt.Rectangle
setMultiDropBounds(DesignerContext context, javax.swing.JComponent droppedOn, java.awt.dnd.DropTargetDropEvent dropEvent, java.lang.Class<?> componentClass, javax.swing.JComponent newComp, java.awt.Rectangle lastComponentBounds)
-
-
-
Field Detail
-
currentContext
protected DesignerContext currentContext
-
currentNodeList
protected java.util.List<NodeBrowseInfo> currentNodeList
-
currentComponent
protected javax.swing.JComponent currentComponent
-
currentDropEvent
protected java.awt.dnd.DropTargetDropEvent currentDropEvent
-
-
Method Detail
-
initOptions
protected void initOptions()
-
createMenu
protected javax.swing.JPopupMenu createMenu(DesignerContext context, DataTypeEx type)
-
handleDrop
public boolean handleDrop(DesignerContext context, java.util.List<NodeBrowseInfo> nodes, javax.swing.JComponent bean, java.awt.dnd.DropTargetDropEvent dropEvent)
Description copied from interface:TagDropHandler
Handles the drop of one or more tags onto a component. The tag paths may refer to a tag, tag folder, or tag property.- Specified by:
handleDrop
in interfaceTagDropHandler
- Returns:
- a boolean indicating whether or not the drop was successfully handled.
-
setMultiDropBounds
public static java.awt.Rectangle setMultiDropBounds(DesignerContext context, javax.swing.JComponent droppedOn, java.awt.dnd.DropTargetDropEvent dropEvent, java.lang.Class<?> componentClass, javax.swing.JComponent newComp, java.awt.Rectangle lastComponentBounds) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-