saveSettings();
} else if (target.equals(MainFrame.getInstance().getToolbar())
|| ((DropTarget) e.getSource()).getComponent().equals(
MainFrame.getInstance().getToolBarPanel())) {
Point location = e.getLocation();
if (mWest) {
location.setLocation(10, location.y);
} else {
location.setLocation(location.x, MainFrame.getInstance().getToolbar()
.getHeight() / 2);
}
JComponent c = (JComponent) MainFrame.getInstance().getToolbar()
.getComponentAt(location);
if ((c == null || c instanceof JToolBar) && MainFrame.getInstance().getToolbar().getComponentCount() > 0) {
c = (JComponent) MainFrame.getInstance().getToolbar().getComponent(
MainFrame.getInstance().getToolbar().getComponentCount() - 1);
if (c != null) {
location.setLocation(c.getLocation().x + c.getWidth() - 1, c
.getLocation().y
+ c.getHeight() - 1);
}
}
int n = 0;
if (c != null) {
Point p = SwingUtilities.convertPoint(MainFrame.getInstance().getToolBarPanel(), location, c);
n = MainFrame.getInstance().getToolbar().getComponentIndex(c);
if (!((mWest && (p.y < c.getHeight() / 2)) || (!mWest && (p.x < c
.getWidth() / 2)))) {