world hopper: bubble up mouse events from activity label
This fixes hopping and mouseover on the activity label not working
This commit is contained in:
@@ -317,6 +317,39 @@ class WorldTableRow extends JPanel
|
|||||||
if (activity != null && activity.length() > 16)
|
if (activity != null && activity.length() > 16)
|
||||||
{
|
{
|
||||||
activityField.setToolTipText(activity);
|
activityField.setToolTipText(activity);
|
||||||
|
// Pass up events - https://stackoverflow.com/a/14932443
|
||||||
|
activityField.addMouseListener(new MouseAdapter()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void mouseClicked(MouseEvent e)
|
||||||
|
{
|
||||||
|
dispatchEvent(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void mousePressed(MouseEvent e)
|
||||||
|
{
|
||||||
|
dispatchEvent(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void mouseReleased(MouseEvent e)
|
||||||
|
{
|
||||||
|
dispatchEvent(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void mouseEntered(MouseEvent e)
|
||||||
|
{
|
||||||
|
dispatchEvent(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void mouseExited(MouseEvent e)
|
||||||
|
{
|
||||||
|
dispatchEvent(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
column.add(activityField, BorderLayout.WEST);
|
column.add(activityField, BorderLayout.WEST);
|
||||||
|
|||||||
Reference in New Issue
Block a user