[Title] remove context menu
authorHyunjong,park <phjwithyou.park@samsung.com>
Tue, 21 Jan 2014 06:41:30 +0000 (15:41 +0900)
committerHyunjong,park <phjwithyou.park@samsung.com>
Tue, 21 Jan 2014 06:41:30 +0000 (15:41 +0900)
[Desc.] unused widget
[Issue] -

org.tizen.dynamicanalyzer.widgets/META-INF/MANIFEST.MF
org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/contextMenu/ContextMenu.java [deleted file]
org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/contextMenu/DAContextMenuItem.java [deleted file]
org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/contextMenu/DAContextMenuListener.java [deleted file]
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/common/ContextAnalysisMenuItemClickListener.java [deleted file]
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/common/ContextClearMenuItemClickListener.java [deleted file]
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/common/ContextEndMenuItemClickListener.java [deleted file]
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/common/ContextFromSelectionMenuItemClickListener.java [deleted file]
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/common/ContextStartMenuItemClickListener.java [deleted file]
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/widgets/DAContextMenu.java [deleted file]

index 9456a42..351cc21 100644 (file)
@@ -17,7 +17,6 @@ Export-Package: org.tizen.dynamicanalyzer.widgets,
  org.tizen.dynamicanalyzer.widgets.chart,
  org.tizen.dynamicanalyzer.widgets.chartBoard,
  org.tizen.dynamicanalyzer.widgets.combo,
- org.tizen.dynamicanalyzer.widgets.contextMenu,
  org.tizen.dynamicanalyzer.widgets.graph.bar,
  org.tizen.dynamicanalyzer.widgets.graph.circular,
  org.tizen.dynamicanalyzer.widgets.helper,
diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/contextMenu/ContextMenu.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/contextMenu/ContextMenu.java
deleted file mode 100644 (file)
index 353f3ae..0000000
+++ /dev/null
@@ -1,538 +0,0 @@
-/*
- *  Dynamic Analyzer
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * HyunJong Park <phjwithyou.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- * Contributors:
- * - S-Core Co., Ltd
- * 
- */
-package org.tizen.dynamicanalyzer.widgets.contextMenu;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Timer;
-import java.util.TimerTask;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseListener;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-import org.tizen.dynamicanalyzer.widgets.helper.ColorResources;
-
-/**
- * Newly implemented contextMenuItem class
- * 
- * @author ParkHyunJong
- * 
- */
-public class ContextMenu {
-
-       public static final int STATE_NORMAL = 0;
-       public static final int STATE_PUSH = 1;
-       public static final int STATE_HOVER = 2;
-       public static final int STATE_DISABLE = 3;
-
-       private static final int DEFAULT_HEIGHT = 24;
-       private static final int CHARACTER_WIDTH_PIXEL = 8;
-       private static final int STORKE_PIXEL = 2;
-       private static final int STAUES_ITEMS_CHECK_TIME = 500;
-       private static final int ADJUSTED_CONTEXT_MENU_POINT = 5;
-
-       private int menuShellWidth = 25;
-       private int titleHeight = 0;
-       private String title = null;
-       private Font titleFont = null;
-       private Color titleFontColor = null;
-       private Color titleBacgroundColor = null;
-
-       public static final int MOUSE_LEFT = 1;
-       public static final int MOUSE_RIGHT = 3;
-       private static Shell lastMenuShell = null;
-       private Shell menuShell = null;
-       private Shell parentShell = null;
-       private Composite menuComp = null;
-       private Composite menuTitleComp = null;
-       private Composite parentComp = null;
-       private Rectangle parentArea = null;
-       private Timer checkEableTimer = null;
-       private List<DAContextMenuItem> itemList = null;
-       private Font itemFont = null;
-
-       /**
-        * create contextMenu Shell and Composite, add mouse listeners - mouse down.<br>
-        */
-       private void setDefaultSetting() {
-               if (null != menuShell) {
-                       return;
-               }
-               menuShell = new Shell(parentShell, SWT.NO_TRIM);
-               menuShell.setLayout(new FillLayout());
-               menuComp = new Composite(menuShell, SWT.NONE);
-               menuComp.addPaintListener(new PaintListener() {
-
-                       @Override
-                       public void paintControl(PaintEvent e) {
-                               // TODO Auto-generated method stub
-                               e.gc.setForeground(ColorResources.CONTEXT_MENU_STORKE_IN);
-                               e.gc.drawRectangle(menuComp.getBounds().x + STORKE_PIXEL - 1,
-                                               menuComp.getBounds().y + STORKE_PIXEL - 1,
-                                               menuComp.getBounds().width - 3,
-                                               menuComp.getBounds().height - 3);
-                       }
-               });
-
-               menuComp.setLayout(new FormLayout());
-               menuComp.setBackground(ColorResources.CONTEXT_MENU_STORKE_OUT);
-               parentComp.addMouseListener(new MouseListener() {
-                       @Override
-                       public void mouseUp(MouseEvent e) {
-                               // TODO Auto-generated method stub
-                       }
-
-                       @Override
-                       public void mouseDown(MouseEvent event) {
-                               // TODO Auto-generated method stub
-                               switch (event.button) {
-                               case MOUSE_LEFT: {
-                                       disappearContextMenu();
-                                       break;
-                               }
-                               case MOUSE_RIGHT: {
-                                       if (null != parentArea) {
-                                               if (event.x > parentArea.x && event.y > parentArea.y
-                                                               && event.x < parentArea.x + parentArea.width
-                                                               && event.y < parentArea.y + parentArea.height) {
-                                                       open();
-                                               }
-                                       } else {
-                                               open();
-                                       }
-                                       break;
-                               }
-                               default: {
-                                       break;
-                               }
-                               }
-                       }
-
-                       @Override
-                       public void mouseDoubleClick(MouseEvent e) {
-                               // TODO Auto-generated method stub
-                       }
-               });
-
-       }
-
-       /**
-        * generated Title area of context menu
-        */
-       public void setTitleComposite() {
-               if (getTitle().length() > 0) {
-                       menuTitleComp = new Composite(menuComp, SWT.NONE);
-                       menuTitleComp.addPaintListener(new PaintListener() {
-                               @Override
-                               public void paintControl(PaintEvent e) {
-                                       // TODO Auto-generated method stub
-                                       e.gc.setForeground(getTitleFontColor());
-                                       if (null != getTitleFont()) {
-                                               e.gc.setFont(getTitleFont());
-                                       }
-                                       e.gc.drawString(getTitle(), 5, getTitleHeight() / 6);
-                               }
-                       });
-
-                       menuTitleComp.setLayout(new FormLayout());
-                       menuTitleComp.setBackground(getTitleBacgroundColor());
-                       FormData compData = new FormData();
-                       compData.top = new FormAttachment(STORKE_PIXEL + 1, 0);
-                       compData.left = new FormAttachment(STORKE_PIXEL + 1, 0);
-                       compData.right = new FormAttachment(100, -STORKE_PIXEL - 1);
-                       compData.bottom = new FormAttachment(menuShellWidth - 4, 0);
-                       menuTitleComp.setLayoutData(compData);
-               }
-       }
-
-       /**
-        * Construct a new instance of this class.<br>
-        * 
-        * @param parent
-        *            a composite control which will be the parent of the new
-        *            instance (cannot be bull)
-        */
-       public ContextMenu(Composite parent) {
-               parentComp = parent;
-               parentShell = parent.getShell();
-               setDefaultSetting();
-       }
-
-       /**
-        * Get contextMenu Shell.<br>
-        * 
-        * @return contextMenu Shell
-        */
-       public Shell getShell() {
-               return menuShell;
-       }
-
-       /**
-        * Get contextMenu composite.<br>
-        * 
-        * @return contextMenu composite
-        */
-       public Composite getComposite() {
-               return this.menuComp;
-       }
-
-       /**
-        * implementation item mouse listeners event.<br>
-        */
-       protected Listener itemMouseListener = new Listener() {
-               @Override
-               public void handleEvent(Event event) {
-
-                       DAContextMenuItem itme = (DAContextMenuItem) event.widget;
-                       if (event.type == SWT.MouseUp) {
-                               switch (event.button) {
-                               case MOUSE_LEFT: {
-                                       if (itme.getState() != STATE_DISABLE) {
-                                               disappearContextMenu();
-                                       }
-                                       break;
-                               }
-                               default: {
-                                       break;
-                               }
-                               }
-                       }
-               }
-       };
-
-       /**
-        * disappear contextMenu
-        */
-       public void disappearContextMenu() {
-               if(!menuShell.isDisposed()) {
-                       menuShell.setVisible(false);
-               }
-       }
-
-       /**
-        * Appear contextMenu when click mouse leftButton.<br>
-        * 
-        * @param x
-        *            The value of x of the right mouse button to click
-        * @param y
-        *            The value of y of the right mouse button to click
-        */
-       public void open(int x, int y) {
-               if (null == lastMenuShell) {
-                       lastMenuShell = menuShell;
-               } else {
-                       lastMenuShell.setVisible(false);
-                       lastMenuShell = menuShell;
-               }
-
-               if (null == menuShell) {
-                       setDefaultSetting();
-                       lastMenuShell = menuShell;
-
-               }
-
-               setTitleComposite();
-
-               if (getItems() == null) {
-                       menuShell.setSize(CHARACTER_WIDTH_PIXEL, DEFAULT_HEIGHT
-                                       + (getTitleHeight()));
-               } else {
-                       int shellHeight = (DEFAULT_HEIGHT * getItems().size())
-                                       + (STORKE_PIXEL * 2) + (getTitleHeight());
-                       if (getTitle().length() >= itemLongestTextLenght()) {
-                               menuShellWidth = getTitle().length() * CHARACTER_WIDTH_PIXEL;
-                       } else {
-                               menuShellWidth = itemLongestTextLenght()
-                                               * CHARACTER_WIDTH_PIXEL;
-                       }
-                       menuShell.setSize(menuShellWidth, shellHeight);
-               }
-
-               menuShell.setLocation(x, y);
-               menuShell.setVisible(true);
-
-               if (checkEableTimer != null) {
-                       checkEableTimer.cancel();
-                       checkEableTimer = null;
-               }
-               disposeContextMenu(STAUES_ITEMS_CHECK_TIME);
-       }
-
-       /**
-        * Get the coordinates of the mouse click.<br>
-        * 
-        * @return Point object of coordinates of the mouse click
-        */
-       private Point computeContextMenuLocation() {
-               Display display = Display.getCurrent();
-               if (null == display) {
-                       display = Display.getDefault();
-               }
-               Point pt = display.getCursorLocation();
-               return pt;
-       }
-
-       /**
-        * Show the ContextMenu when click the right button.<br>
-        */
-       public void open() {
-               Point pt = computeContextMenuLocation();
-               pt.x = pt.x - ADJUSTED_CONTEXT_MENU_POINT;
-               pt.y = pt.y - ADJUSTED_CONTEXT_MENU_POINT;
-               open(pt.x, pt.y);
-       }
-
-       /**
-        * Periodically check the focus has been on the context Menu.<br>
-        * 
-        * @param milliseconds
-        *            Set the time to check regularly.
-        */
-       public void disposeContextMenu(int milliseconds) {
-               this.checkEableTimer = new Timer();
-               this.checkEableTimer.schedule(new TimerTask() {
-                       public void run() {
-                               Display.getDefault().syncExec(new Runnable() {
-                                       @Override
-                                       public void run() {
-                                               Rectangle rt = menuShell.getBounds();
-                                               Point pt = Display.getCurrent().getCursorLocation();
-                                               if (false == rt.contains(pt)) {
-                                                       if (checkEableTimer != null) {
-                                                               checkEableTimer.cancel();
-                                                               checkEableTimer = null;
-                                                       }
-                                                       disappearContextMenu();
-                                               }
-                                       }
-                               });
-                       }
-               }, milliseconds, milliseconds);
-       }
-
-       /**
-        * Register the DAContextMenuItem to the contextMenu.<br>
-        * 
-        * @param item
-        *            contextMenu item object
-        */
-       public void addItem(DAContextMenuItem item) {
-               if (itemList == null) {
-                       itemList = new ArrayList<DAContextMenuItem>();
-               }
-
-               FormData compData = new FormData();
-               if (getItems() == null) {
-                       compData.top = new FormAttachment(0, STORKE_PIXEL
-                                       + getTitleHeight());
-               } else {
-                       compData.top = new FormAttachment(0, DEFAULT_HEIGHT
-                                       * getItems().size() + STORKE_PIXEL + getTitleHeight());
-               }
-               compData.left = new FormAttachment(0, STORKE_PIXEL);
-               compData.right = new FormAttachment(100, -STORKE_PIXEL);
-               compData.height = DEFAULT_HEIGHT;
-               item.setLayoutData(compData);
-               if (itemFont != null) {
-                       item.setFont(this.itemFont);
-               }
-               itemList.add(item);
-               item.addListener(SWT.MouseUp, itemMouseListener);
-       }
-
-       /**
-        * Get the DAContextMenuItem.<br>
-        * 
-        * @return contextMenu items list
-        */
-       public List<DAContextMenuItem> getItems() {
-               if (itemList == null) {
-                       itemList = new ArrayList<DAContextMenuItem>();
-               }
-               return itemList;
-       }
-
-       /**
-        * get The text length of the longest item
-        * 
-        * @return text length
-        */
-       public int itemLongestTextLenght() {
-               int lenght = 0;
-               if (getItems() == null) {
-                       return lenght;
-               }
-               for (DAContextMenuItem item : getItems()) {
-                       if (lenght < item.getText().length()) {
-                               lenght = item.getText().length();
-                       }
-               }
-               return lenght;
-       }
-
-       /**
-        * set parent area
-        * 
-        * @param area
-        *            parent area
-        */
-       public void setParentArea(Rectangle area) {
-               parentArea = area;
-       }
-
-       /**
-        * Sets the font of the contxtImtes text.
-        * 
-        * @param font
-        *            The font of the contextItem text.
-        */
-       public void setFont(Font font) {
-               this.itemFont = font;
-               for (DAContextMenuItem item : getItems()) {
-                       item.setFont(font);
-               }
-       }
-
-       /**
-        * get the height of the title area
-        * 
-        * @return height
-        */
-       public int getTitleHeight() {
-               return titleHeight;
-       }
-
-       /**
-        * set the height of the title area
-        * 
-        * @param contextMenuTitleHeight
-        *            height
-        */
-       public void setTitleHeight(int contextMenuTitleHeight) {
-               this.titleHeight = contextMenuTitleHeight;
-       }
-
-       /**
-        * get the title name
-        * 
-        * @return the title name
-        */
-       public String getTitle() {
-               if (title == null) {
-                       return "";//$NON-NLS-1$
-               }
-               return title;
-       }
-
-       /**
-        * set the title name
-        * 
-        * @param title
-        *            the title name
-        */
-       public void setTitle(String title) {
-               this.title = title;
-               setTitleHeight(15);
-       }
-
-       /**
-        * get the title font
-        * 
-        * @return the title font
-        */
-       public Font getTitleFont() {
-               return titleFont;
-       }
-
-       /**
-        * set the title font
-        * 
-        * @param titleFont
-        *            the title font
-        */
-       public void setTitleFont(Font titleFont) {
-               this.titleFont = titleFont;
-       }
-
-       /**
-        * get color of the title font
-        * 
-        * @return color
-        */
-       public Color getTitleFontColor() {
-               if (titleFontColor == null) {
-                       titleFontColor = ColorResources.CONTEXT_MENU_TITLE_FONT_COLOR;
-               }
-               return titleFontColor;
-       }
-
-       /**
-        * set color of the title font
-        * 
-        * @param titleFontColor
-        *            color
-        */
-       public void setTitleFontColor(Color titleFontColor) {
-               this.titleFontColor = titleFontColor;
-       }
-
-       /**
-        * get The background color of the title
-        * 
-        * @return The background color
-        */
-       public Color getTitleBacgroundColor() {
-               if (titleBacgroundColor == null) {
-                       titleBacgroundColor = ColorResources.CONTEXT_MENU_TITLE_BACKGROUND_COLOR;
-               }
-               return titleBacgroundColor;
-       }
-
-       /**
-        * set The background color of the title
-        * 
-        * @param titleBacgroundColor
-        *            The background color
-        */
-       public void setTitleBacgroundColor(Color titleBacgroundColor) {
-               this.titleBacgroundColor = titleBacgroundColor;
-       }
-}
diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/contextMenu/DAContextMenuItem.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/contextMenu/DAContextMenuItem.java
deleted file mode 100644 (file)
index 004f1f0..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- *  Dynamic Analyzer
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * HyunJong Park <phjwithyou.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- * Contributors:
- * - S-Core Co., Ltd
- * 
- */
-package org.tizen.dynamicanalyzer.widgets.contextMenu;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Point;
-import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
-import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonRenderer;
-import org.tizen.dynamicanalyzer.widgets.helper.ColorResources;
-import org.tizen.dynamicanalyzer.widgets.helper.FontResources;
-
-/**
- * Newly implemented contextMenuItem class
- * 
- * @author ParkHyunJong
- * 
- */
-public class DAContextMenuItem extends DACustomButton {
-       private double doubleData;
-
-       /**
-        * Constructs a new instance of this class given its menu and style value
-        * describing its behavior and appearance.
-        * <p>
-        * The style value is either one of the style constants defined in class SWT
-        * which is applicable to instances of this class, or must be built by
-        * bitwise OR'ing together (that is, using the int "|" operator) two or more
-        * of those SWT style constants. The class description lists the style
-        * constants that are applicable to the class. Style bits are also inherited
-        * from superclasses.
-        * </p>
-        * 
-        * @param menu
-        *            a DAContextMenu which will be the parent of the new instance
-        *            (cannot be bull)
-        * @param style
-        *            the style of control to construct
-        */
-       public DAContextMenuItem(ContextMenu menu) {
-               super(menu.getComposite(), SWT.NONE);
-               setDefaultSetting();
-               menu.addItem(this);
-       }
-
-       /**
-        * Sets Menu Item default state
-        */
-       private void setDefaultSetting() {
-               attr.setColor(STATE_NORMAL,
-                               ColorResources.CONTEXT_MENU_STATUS_NORMAL_COLOR);
-               attr.setColor(STATE_HOVER,
-                               ColorResources.CONTEXT_MENU_STATUS_HOVER_COLOR);
-               attr.setColor(STATE_PUSH, ColorResources.CONTEXT_MENU_STATUS_PUSH_COLOR);
-               attr.setColor(STATE_DISABLE,
-                               ColorResources.CONTEXT_MENU_STATUSE_DISABLE_COLOR);
-               setOutlineColors(ColorResources.CONTEXT_MENU_OUTLINE_NORMAL_COLOR,
-                               ColorResources.CONTEXT_MENU_OUTLINE_PUSH_COLOR,
-                               ColorResources.CONTEXT_MENU_OUTLINE_HOVER_COLOR,
-                               ColorResources.CONTEXT_MENU_OUTLINE_DISABLE_COLOR);
-               setFont(FontResources.CONTEXT_MENU_ITEM_FONT);
-               this.setRenderer(new DACustomButtonRenderer());
-       }
-
-       /**
-        * 
-        * adds button click listener
-        * 
-        * @param listener
-        *            user implemented contextMenu item action listener
-        */
-       public void addClickListener(DAContextMenuListener listener) {
-               addListener(SWT.MouseUp, listener);
-       }
-
-       /**
-        * Sets the text of item <br>
-        */
-       public void setText(String newTitle) {
-               attr.setText(newTitle);
-               setFontPoint(new Point(5, 4));
-       }
-
-       /**
-        * gets the text of item <br>
-        * 
-        * @return the text of item
-        */
-       public String getText() {
-               return attr.getText();
-       }
-
-       public double getDoubleData() {
-               return doubleData;
-       }
-
-       public void setDoubleData(double data) {
-               doubleData = data;
-       }
-}
diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/contextMenu/DAContextMenuListener.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/contextMenu/DAContextMenuListener.java
deleted file mode 100644 (file)
index 01b0613..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- *  Dynamic Analyzer
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * HyunJong Park <phjwithyou.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- * Contributors:
- * - S-Core Co., Ltd
- * 
- */
-package org.tizen.dynamicanalyzer.widgets.contextMenu;
-
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-
-/**
- * Newly implemented contextMenuItem class
- * 
- * @author ParkHyunJong
- * 
- */
-public abstract class DAContextMenuListener implements Listener {
-       @Override
-       /**
-        * listener of contextMenu 
-        */
-       public void handleEvent(Event event) {
-               if (event.button == ContextMenu.MOUSE_RIGHT) {
-                       return;
-               }
-               DAContextMenuItem item = (DAContextMenuItem) event.widget;
-               if (null != item && item.getState() != DAContextMenuItem.STATE_DISABLE) {
-                       Rectangle rectangle = item.getBounds();
-                       int x = event.x;
-                       int y = event.y;
-                       if (x < 0 || x > rectangle.width || y < 0 || y > rectangle.height) {
-                               return;
-                       }
-               } else {
-                       return;
-               }
-
-               widgetSelected(item);
-       }
-
-       /**
-        * call when click item of contextMenu
-        * 
-        * @param menuItem
-        */
-       public abstract void widgetSelected(DAContextMenuItem menuItem);
-}
diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/common/ContextAnalysisMenuItemClickListener.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/common/ContextAnalysisMenuItemClickListener.java
deleted file mode 100644 (file)
index a19954f..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-package org.tizen.dynamicanalyzer.ui.common;
-
-import org.tizen.dynamicanalyzer.ui.range.RangeDataManager;
-import org.tizen.dynamicanalyzer.widgets.contextMenu.DAContextMenuItem;
-import org.tizen.dynamicanalyzer.widgets.contextMenu.DAContextMenuListener;
-
-public class ContextAnalysisMenuItemClickListener extends DAContextMenuListener {
-
-       @Override
-       public void widgetSelected(DAContextMenuItem menuItem) {
-               RangeDataManager.getInstance().startRangeAnalysis();
-       }
-}
diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/common/ContextClearMenuItemClickListener.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/common/ContextClearMenuItemClickListener.java
deleted file mode 100644 (file)
index 8777668..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.tizen.dynamicanalyzer.ui.common;
-
-import org.tizen.dynamicanalyzer.ui.range.RangeDataManager;
-import org.tizen.dynamicanalyzer.widgets.chartBoard.DAChartBoard;
-import org.tizen.dynamicanalyzer.widgets.contextMenu.DAContextMenuItem;
-import org.tizen.dynamicanalyzer.widgets.contextMenu.DAContextMenuListener;
-
-public class ContextClearMenuItemClickListener extends DAContextMenuListener {
-//     private DAChartBoard chartBoard;
-
-       public ContextClearMenuItemClickListener(DAChartBoard board) {
-//             chartBoard = board;
-       }
-
-       @Override
-       public void widgetSelected(DAContextMenuItem menuItem) {
-//             chartBoard.setTimelineMarkerStartTime(0);
-//             chartBoard.setTimelineMarkerEndTime(0);
-
-               RangeDataManager.getInstance().initRange();
-       }
-}
diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/common/ContextEndMenuItemClickListener.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/common/ContextEndMenuItemClickListener.java
deleted file mode 100644 (file)
index a9b88d5..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-package org.tizen.dynamicanalyzer.ui.common;
-
-import org.tizen.dynamicanalyzer.ui.range.RangeDataManager;
-import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineConstants;
-import org.tizen.dynamicanalyzer.widgets.chart.DAChartPlotIntervalMarker;
-import org.tizen.dynamicanalyzer.widgets.chartBoard.DAChartBoard;
-import org.tizen.dynamicanalyzer.widgets.contextMenu.DAContextMenuItem;
-import org.tizen.dynamicanalyzer.widgets.contextMenu.DAContextMenuListener;
-
-public class ContextEndMenuItemClickListener extends DAContextMenuListener {
-       private DAContextMenuItem endItem;
-       private DAChartBoard chartBoard;
-       private RangeDataManager rangeDataManager = RangeDataManager.getInstance();
-
-       public ContextEndMenuItemClickListener(DAContextMenuItem item,
-                       DAChartBoard board) {
-               endItem = item;
-               chartBoard = board;
-       }
-
-       @Override
-       public void widgetSelected(DAContextMenuItem menuItem) {
-               double endTime = endItem.getDoubleData();
-               rangeDataManager
-                               .setMarkerEndTime((long) (endTime * TimelineConstants.MEGA_DOUBLE));
-
-               double startTime = rangeDataManager.getMarkerStartTime()
-                               / TimelineConstants.MEGA_DOUBLE;
-
-
-               chartBoard.setTimelineMarkerStartTime(startTime);
-               chartBoard.setTimelineMarkerEndTime(endTime);
-               ((DAChartPlotIntervalMarker) chartBoard.getMarkers().get(
-                               UICommonConstants.RANGE_MARKER_INDEX)).setInterval(startTime,
-                               endTime);
-
-       }
-}
diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/common/ContextFromSelectionMenuItemClickListener.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/common/ContextFromSelectionMenuItemClickListener.java
deleted file mode 100644 (file)
index d458409..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-package org.tizen.dynamicanalyzer.ui.common;
-
-import org.tizen.dynamicanalyzer.ui.range.RangeDataManager;
-import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineConstants;
-import org.tizen.dynamicanalyzer.widgets.chart.DAChartPlotIntervalMarker;
-import org.tizen.dynamicanalyzer.widgets.chartBoard.DAChartBoard;
-import org.tizen.dynamicanalyzer.widgets.contextMenu.DAContextMenuItem;
-import org.tizen.dynamicanalyzer.widgets.contextMenu.DAContextMenuListener;
-
-public class ContextFromSelectionMenuItemClickListener extends
-               DAContextMenuListener {
-       private DAChartBoard chartBoard;
-       private RangeDataManager rangeDataManager = RangeDataManager.getInstance();
-
-       public ContextFromSelectionMenuItemClickListener(DAContextMenuItem item,
-                       DAChartBoard board) {
-               chartBoard = board;
-       }
-
-       @Override
-       public void widgetSelected(DAContextMenuItem menuItem) {
-               // TODO Auto-generated method stub
-               double startTime = ((DAChartPlotIntervalMarker) chartBoard.getMarkers()
-                               .get(UICommonConstants.SELECTION_MARKER_INDEX)).getStartVal();
-               double endTime = ((DAChartPlotIntervalMarker) chartBoard.getMarkers()
-                               .get(UICommonConstants.SELECTION_MARKER_INDEX)).getEndVal();
-               double temp;
-
-               if (startTime > endTime) {
-                       temp = startTime;
-                       startTime = endTime;
-                       endTime = temp;
-               }
-               rangeDataManager
-                               .setMarkerStartTime((long) (startTime * TimelineConstants.MEGA_DOUBLE));
-               rangeDataManager
-                               .setMarkerEndTime((long) (endTime * TimelineConstants.MEGA_DOUBLE));
-               chartBoard.setTimelineMarkerStartTime(startTime);
-               chartBoard.setTimelineMarkerEndTime(endTime);
-               ((DAChartPlotIntervalMarker) chartBoard.getMarkers().get(
-                               UICommonConstants.RANGE_MARKER_INDEX)).setInterval(startTime,
-                               endTime);
-       }
-
-}
diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/common/ContextStartMenuItemClickListener.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/common/ContextStartMenuItemClickListener.java
deleted file mode 100644 (file)
index 6591c81..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-package org.tizen.dynamicanalyzer.ui.common;
-
-import org.tizen.dynamicanalyzer.ui.range.RangeDataManager;
-import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineConstants;
-import org.tizen.dynamicanalyzer.widgets.chart.DAChartPlotIntervalMarker;
-import org.tizen.dynamicanalyzer.widgets.chartBoard.DAChartBoard;
-import org.tizen.dynamicanalyzer.widgets.contextMenu.DAContextMenuItem;
-import org.tizen.dynamicanalyzer.widgets.contextMenu.DAContextMenuListener;
-
-public class ContextStartMenuItemClickListener extends DAContextMenuListener {
-       private DAContextMenuItem startItem;
-       private DAChartBoard chartBoard;
-       private RangeDataManager rangeDataManager = RangeDataManager.getInstance();
-
-       public ContextStartMenuItemClickListener(DAContextMenuItem item,
-                       DAChartBoard board) {
-               startItem = item;
-               chartBoard = board;
-       }
-
-       public void widgetSelected(DAContextMenuItem menuItem) {
-               double startTime = startItem.getDoubleData();
-               rangeDataManager
-                               .setMarkerStartTime((long) (startTime * TimelineConstants.MEGA_DOUBLE));
-
-               double endTime = rangeDataManager.getMarkerEndTime()
-                               / TimelineConstants.MEGA_DOUBLE;
-
-               chartBoard.setTimelineMarkerStartTime(startTime);
-               chartBoard.setTimelineMarkerEndTime(endTime);
-
-               ((DAChartPlotIntervalMarker) chartBoard.getMarkers().get(
-                               UICommonConstants.RANGE_MARKER_INDEX)).setInterval(startTime,
-                               endTime);
-       }
-}
diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/widgets/DAContextMenu.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/widgets/DAContextMenu.java
deleted file mode 100644 (file)
index a9a751f..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- *  Dynamic Analyzer
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: 
- * HyunJong Park <phjwithyou.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- * Contributors:
- * - S-Core Co., Ltd
- * 
- */
-
-package org.tizen.dynamicanalyzer.ui.widgets;
-import org.eclipse.swt.widgets.Composite;
-import org.tizen.dynamicanalyzer.nl.TimelineChartLabels;
-import org.tizen.dynamicanalyzer.resources.ColorResources;
-import org.tizen.dynamicanalyzer.resources.FontResources;
-import org.tizen.dynamicanalyzer.widgets.contextMenu.ContextMenu;
-
-
-public class DAContextMenu extends ContextMenu{
-
-       public DAContextMenu(Composite parent) {
-               super(parent);
-               setFont(FontResources.CONTEXT_MENU_ITEM_FONT);
-       }
-       public void setTitleSetting(){
-               setTitle(TimelineChartLabels.RANGE_CONTEXT_TITLE);
-               setTitleHeight(25);
-               setTitleFont(FontResources.CONTEXT_MENU_TITLE_FONT);
-               setTitleFontColor(ColorResources.CONTEXT_MENU_TITLE_FONT_COLOR);
-               setTitleBacgroundColor(ColorResources.CONTEXT_MENU_TITLE_BACKGROUND_COLOR);
-       }
-}
\ No newline at end of file