Ejemplo n.º 1
0
  @Override
  public void gMouseMoved(MouseEvent e) {
    final GraphicComponent textBoxMouseHover =
        GraphicView.searchComponentWithPosition(getAllTextBox(), e.getPoint());
    GraphicView.computeComponentEventEnter(textBoxMouseHover, saveTextBoxMouseHover, e);

    saveTextBoxMouseHover = textBoxMouseHover;
  }
Ejemplo n.º 2
0
  @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();
    }
  }
Ejemplo n.º 3
0
 /**
  * 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);
 }