Hi,
I have an application with Drag & Drop from a Palette to a JGoView area. The drag & drop uses the copyObject to implement the specifics of object creation in the JGoView and I am experiencing two issues … I have 4 object types in the palette stacked vertically
- The object seems to get offset from the mouse position - the further down the palette the drag & drop object is the more offset it gets
- I want to do some post drag & drop processing in the objects which will require that I get the JGoDocument that I have dragged & dropped into how do I do that?
PS: Here’s the drag & Drop code
public JGoObject copyObject(JGoCopyEnvironment env) {
FPMultiLineNode node = new FPMultiLineNode(get_elements(), get_location(), get_title(), get_bgColor(), get_info1(), get_info2(), get_info3(), get_scaleWidth());;
if (this instanceof CausalFactorNode) {
CausalFactorNode n = (CausalFactorNode)this;
node = new CausalFactorNode(n.get_myLocale(), n.get_myElements(), n.get_myInfo1(), n.get_myInfo2(), n.is_doubleClickEnabled());
} else if (this instanceof ConsequenceNode) {
ConsequenceNode n = (ConsequenceNode)this;
node = new ConsequenceNode(n.get_myLocale(), n.get_myElements(), n.get_myInfo1(), n.get_myInfo2(), n.is_doubleClickEnabled());
} else if (this instanceof ControlNode) {
ControlNode n = (ControlNode)this;
node = new ControlNode(n.get_myLocale(), n.get_myElements(), n.get_myInfo1(), n.get_myInfo2(), n.is_doubleClickEnabled());
} else if (this instanceof MitigationNode) {
MitigationNode n = (MitigationNode)this;
node = new MitigationNode(n.get_myLocale(), n.get_myElements(), n.get_myInfo1(), n.get_myInfo2(), n.is_doubleClickEnabled());
}
node.set_InteractiveServletURL(get_InteractiveServletURL());
node.set_riskId(this.get_riskId());
node.set_doubleClickEnabled(true);
return node;
}