Пример #1
0
  @Override
  protected void okPressed() {
    if (relay != oldRelay) {
      // we know it's an ActorClass (else the flag couldn't have changed)
      ActorClass ac = (ActorClass) acc;

      if (relay) {
        for (ExternalPort xp : ac.getExternalPorts()) {
          if (xp.getInterfacePort() == port) {
            ac.getExternalPorts().remove(xp);
            break;
          }
        }
      } else {
        ExternalPort xp = RoomFactory.eINSTANCE.createExternalPort();
        xp.setInterfacePort(port);
        ac.getExternalPorts().add(xp);
      }
    }

    super.okPressed();
  }
Пример #2
0
 @Override
 protected void initializeBounds() {
   super.initializeBounds();
   Point size = getShell().getSize();
   getShell().setSize((int) (size.x * 1.2), size.y);
 }