Class DefaultTagDropHandler

    • Constructor Detail

      • DefaultTagDropHandler

        public DefaultTagDropHandler​(java.beans.BeanInfo beanInfo)
    • Method Detail

      • addBinding

        public void addBinding​(Property<?> prop,
                               java.lang.String propName)
        Adds a binding configuration to bind the given component property to the given tag property. Binding will be bidirectional if the property
      • addOneWayBinding

        public void addOneWayBinding​(Property<?> prop,
                                     java.lang.String propName)
      • addBinding

        public void addBinding​(Property<?> prop,
                               java.lang.String propName,
                               boolean forceNonBinding)
      • removeBinding

        public void removeBinding​(Property<?> prop)
      • handleDrop

        public boolean handleDrop​(DesignerContext context,
                                  java.util.List<NodeBrowseInfo> nodes,
                                  javax.swing.JComponent bean,
                                  java.awt.dnd.DropTargetDropEvent dropEvent)
        Adds property bindings according to this handler's binding map. If the dropped tag is for a TagProp other than Value, then that property is used as the value and no other bindings are processed
        Returns:
        a boolean indicating whether or not the drop was successfully handled.
      • handleValueDrop

        protected boolean handleValueDrop​(DesignerContext context,
                                          NodeBrowseInfo node,
                                          javax.swing.JComponent bean)
        This is used to handle most drops. If this is called, you are guaranteed that path is a non-null, non-folder, value property tag path. The default implementation adds simple tag bindings that were defined through calls to addBinding()
      • handlePropertyPathDrop

        protected boolean handlePropertyPathDrop​(DesignerContext context,
                                                 NodeBrowseInfo node,
                                                 javax.swing.JComponent bean)
        This is called when the drop is an attribute path that isn't the Value property
      • processValueBinding

        protected boolean processValueBinding​(DesignerContext context,
                                              NodeBrowseInfo tag,
                                              javax.swing.JComponent bean,
                                              DefaultTagDropHandler.BindConfiguration desc)
        This is called for the value property path for a standard tag drop. The default simply calls processPropertyBinding. (treats value like any other binding)
      • processBinding

        protected boolean processBinding​(DesignerContext context,
                                         TagPath path,
                                         Property<?> property,
                                         javax.swing.JComponent bean,
                                         java.lang.String propName,
                                         boolean nonBidirectional)
        Convenience function for drop handlers that subvert the normal way of doing things to do a quick binding