params.put( "row", new ParameterHolder(row+1) );
params.put( "column", new ParameterHolder(column+1) );
}
owningArray = null;
}
pList.add(new EventHandle(mum, pEventName, params));
// TF:18/06/2008:Fixed this so menus work properly
if (mum instanceof JPopupMenu)
mum = (Container)((JPopupMenu)mum).getInvoker();
else
mum = mum.getParent();
}
if (owningArray != null) {
// Now the X and Y coordinates are in the array space, we need to translate them to the child coordinate space and get
// the correct row and column
if (pX != null && pY != null) {
Point p = new Point(UIutils.milsToPixels(pX.getInt()), UIutils.milsToPixels(pY.getInt()));
row = owningArray.rowAtPoint(p);
column = owningArray.columnAtPoint(p);
// Store the real row and column in the array. This isn't actually done in Forte, but makes life
// much easier if we want to determine which cell generated the click.
params.put( "row", new ParameterHolder(row+1) );
params.put( "column", new ParameterHolder(column+1) );
Rectangle r = owningArray.getCellRect(row, column, false);
p.x -= r.x;
p.y -= r.y;
// Now X and Y are in owningArray coordinate space, need to translate them into pChild's
// Point childLoc = SwingUtilities.convertPoint(owningArray, p, pChild);
Point childLoc = p;
pX.setInt(UIutils.pixelsToMils(childLoc.x));
pY.setInt(UIutils.pixelsToMils(childLoc.y));
}
// Go through and post this to the parent of the array also.
mum = owningArray;
while (mum != null){
pList.add(new EventHandle(mum, pEventName, params));
mum = mum.getParent();
}
}
}