@Override public void gMouseMoved(MouseEvent e) { final GraphicComponent textBoxMouseHover = GraphicView.searchComponentWithPosition(getAllTextBox(), e.getPoint()); GraphicView.computeComponentEventEnter(textBoxMouseHover, saveTextBoxMouseHover, e); saveTextBoxMouseHover = textBoxMouseHover; }
@Override public void gMouseClicked(MouseEvent e) { super.gMouseClicked(e); final TextBox textBox = GraphicView.searchComponentWithPosition(getAllTextBox(), e.getPoint()); if (textBox != null) { final AbstractIDiagramComponent idc = textBox.getAssociedComponent(); if (idc != null) { idc.select(); idc.notifyObservers(UpdateMessage.SELECT); } if (e.getClickCount() == 2) textBox.editing(); } }
/** * Search and return the Textbox (methods and attributes) at the given location. * * @param location the location where find a TextBox * @return the found TextBox */ private TextBox searchTextBoxAtLocation(Point location) { final LinkedList<TextBox> tb = getAllTextBox(); tb.remove(entityName); return GraphicView.searchComponentWithPosition(tb, location); }