1 /*******************************************************************************
\r
2 * Copyright (c) 2006 Sybase, Inc. and others.
\r
4 * All rights reserved. This program and the accompanying materials
\r
5 * are made available under the terms of the Eclipse Public License v1.0
\r
6 * which accompanies this distribution, and is available at
\r
7 * http://www.eclipse.org/legal/epl-v10.html
\r
10 * Sybase, Inc. - initial API and implementation
\r
11 *******************************************************************************/
\r
12 package org.eclipse.jst.pagedesigner.tableedit;
\r
14 import org.eclipse.gef.EditPart;
\r
15 import org.eclipse.gef.tools.DragEditPartsTracker;
\r
18 * This is the tracker for the TableSideItem. It will be responsible to track
\r
19 * the right mouse down event and popup a menu.
\r
24 public class TableSideItemDragTracker extends DragEditPartsTracker {
\r
26 // private boolean _isRow;
\r
28 // private int _index;
\r
32 * @param sourceEditPart
\r
36 public TableSideItemDragTracker(EditPart sourceEditPart, boolean isrow,
\r
38 super(sourceEditPart);
\r
40 // this._isRow = isrow;
\r
41 // this._index = index;
\r
47 * @see org.eclipse.gef.tools.DragEditPartsTracker#handleButtonUp(int)
\r
49 protected boolean handleButtonUp(int button) {
\r
50 boolean result = super.handleButtonUp(button);
\r
54 // MenuManager m = new MenuManager();
\r
57 // m.add(new InsertRowColumnAction("Insert row before",
\r
58 // getSourceEditPart(), _index, _isRow, true));
\r
59 // m.add(new InsertRowColumnAction("Insert row after",
\r
60 // getSourceEditPart(), _index, _isRow, false));
\r
61 // m.add(new DeleteRowColumnAction("Delete row", getSourceEditPart(),
\r
62 // _index, _isRow));
\r
66 // m.add(new InsertRowColumnAction("Insert column before",
\r
67 // getSourceEditPart(), _index, _isRow, true));
\r
68 // m.add(new InsertRowColumnAction("Insert column after",
\r
69 // getSourceEditPart(), _index, _isRow, false));
\r
70 // m.add(new DeleteRowColumnAction("Delete column", getSourceEditPart(),
\r
71 // _index, _isRow));
\r
73 // m.createContextMenu(this.getCurrentViewer().getControl()).setVisible(true);
\r