In comp.soft-sys.ptolemy, [EMAIL PROTECTED] (Marcus Pang) writes: -------- Hi! Does anyone know how to programmatically rearrange the port order in an actor in Ptolemy II? In an actor, the ports appear in creation order. Is there a way to rearrange them and still keep any existing connections intact? Please provide sample code. Thanks. Marcus Pang --------
We have experimented with techniques for rearranging ports, but haven't yet found a satisfactory mechanism, except for a mechanism that permits changing whether they are placed on the top, bottom, right, or left. The problems we ran into with rearranging ports were mostly UI issues: * It was hard to know when to propagate the changes to the model * It was hard to control the exact site on the actors where the ports were to be connected. The next release of Ptolemy II will include the top, bottom, right or left mechanism. (Our tentative plans include a runtime only release of the CT domain and vergil at the end of the month and a full source release of Ptolemy II in May.) The changes were somewhat complex and not that amenable to a patch. The affected files were: * actor/gui/PortLocationConfigurer.java * actor/gui/PortLocationDialog.java * vergil/kernel/SetIconAction.java * vergil/kernel/PortLocationDialogFactory.java New Files that implement the icon editor (set icon and place ports) * ptolemy/vergil/actor/ActorController.java * ptolemy/vergil/ptolemy/kernel/EntityPortController.java * ptolemy/vergil/toolbox/PortSite Changes for set icon and place ports There might have been other changes as well. Generating a patch for these would take quite a bit of effort, so at this point I'm going to decline that task. -Christopher ---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]