public void draw(Graphics graphics) {
    Color _oldColor = graphics.getColor();

    graphics.setColor(hasExceptionHandlers(getActivity(), getData()) ? CI.RED : CI.LIGHTGREY);
    super.draw(graphics);
    graphics.setColor(_oldColor);
  }
  public void createPopupMenu() {
    super.createPopupMenu();

    JPopupMenu popupMenu = getPopupMenu();
    if (popupMenu == null) {
      popupMenu = new JPopupMenu();
      setPopupMenu(popupMenu);
    } else {
      popupMenu.addSeparator();
    }

    propertiesItem = new JMenuItem("Properties ...");

    propertiesItem.addActionListener(this);
    propertiesItem.setMnemonic('s');
    popupMenu.add(propertiesItem);

    popupMenu.addSeparator();
    ButtonGroup group = new ButtonGroup();
    inItem = new JRadioButtonMenuItem("IN");
    group.add(inItem);
    inItem.addActionListener(this);
    popupMenu.add(inItem);
    outItem = new JRadioButtonMenuItem("OUT");
    group.add(outItem);
    outItem.addActionListener(this);
    popupMenu.add(outItem);
    inoutItem = new JRadioButtonMenuItem("INOUT");
    group.add(inoutItem);
    inoutItem.addActionListener(this);
    popupMenu.add(inoutItem);
  }
  public void setSecondSymbol(Symbol secondSymbol, boolean link) {
    if (getFirstSymbol() instanceof DataSymbol) {
      setSecondSymbolAsActivitySymbol(secondSymbol, link);
    } else {
      setSecondSymbolAsDataSymbol(secondSymbol, link);
    }

    super.setSecondSymbol(secondSymbol, link);
    updateArrows();
  }
 public void deleteAll() {
   if (confirmDeletionWarning("")) {
     super.deleteAll();
     Iterator itr = getActivity().findDataMappings(getData(), null);
     if (itr.hasNext()) {
       while (itr.hasNext()) {
         IDataMapping mapping = (IDataMapping) itr.next();
         getActivity().removeFromDataMappings(mapping);
       }
     }
   }
 }
  /*
   * Called before a popup menu is activated and is used to enable or
   * disable menu items according to the state of the activity.
   */
  public void preparePopupMenu() {
    super.preparePopupMenu();

    if (
    /*DataTypeUtils.getReferenceClass(getData()) != null
    && */ (((getActivity().getApplication() != null))
        || getActivity().getImplementationType().equals(ImplementationType.Manual))) {
      propertiesItem.setEnabled(true);
    } else {
      propertiesItem.setEnabled(false);
    }
    if (Direction.IN == direction) {
      inItem.setSelected(true);
    } else if (Direction.OUT == direction) {
      outItem.setSelected(true);
    } else if (Direction.IN_OUT == direction) {
      inoutItem.setSelected(true);
    }
  }