else expandPath(selPath);
}
}
else
{
JIDStatusGroup group = null;
JIDStatus jidStatus = null;
if (o instanceof PrimaryJIDStatus)
{
group = ((JIDStatusGroup) selPath.getPathComponent(selPath.getPathCount() - 2));
jidStatus = ((PrimaryJIDStatus) o).getJIDPrimaryStatus();
}
else if (o instanceof JIDStatus)
{
group = ((JIDStatusGroup) selPath.getPathComponent(selPath.getPathCount() - 3));
jidStatus = (JIDStatus)o;
}
else return;
maybeShowPopup(e, jidStatus, group);//cde
if (SwingUtilities.isLeftMouseButton(e))
{
lastTreePath = selPath;
//check if double or single mouseclick, needed
// because double click= 2 single clicks
if (timer.isRunning())
{
timer.stop();
sendChat(jidStatus);
}
else
{
timer.restart();
}
}
}
}
}
public void mouseReleased(MouseEvent e)
{
TreePath selPath = getPathForLocation(e.getX(), e.getY());
if (selPath != null)
{
Object o = selPath.getLastPathComponent();
if (o instanceof JIDStatusGroup)
{//group
maybeShowGroupPopup(e, (JIDStatusGroup) o);
}
if (o instanceof PrimaryJIDStatus)
{
JIDStatusGroup group = ((JIDStatusGroup) selPath.getPathComponent(selPath.getPathCount() - 2));
maybeShowPopup(e, ((PrimaryJIDStatus) o).getJIDPrimaryStatus(), group);
}
else if (o instanceof JIDStatus)
{
JIDStatusGroup group = ((JIDStatusGroup) selPath.getPathComponent(selPath.getPathCount() - 3));
maybeShowPopup(e, (JIDStatus) o, group);
}
}
}