42 | | ^(Describe your design here.)^ |
| 42 | * Model and view: |
| 43 | * add a new package {{{ org.sophie2.main.func.links.actions.external }}} for classes related to external links |
| 44 | * add a new class {{{ OpenUrlAction }}} extending {{{ LinkAction }}} in org.sophie2.main.func.links.actions.external |
| 45 | * it should be immutable (as all LinkActions) |
| 46 | * it should have a private final String field for the url address that should be opened |
| 47 | * add a provider for "Open URL..." actions - {{{ OpenUrlActionProvider }}} |
| 48 | * add a configuration panel for the "Open URL..." action - {{{ OpenUrlConfigurationPanel }}} |
| 49 | * it should extend {{{ BaseSwingVisualElement }}} and implement {{{ ActionConfigurationPanel }}} |
| 50 | * inner static class {{{ UrlField }}} extending BoundTextField |
| 51 | * protected Prop<UrlField> child() - autoproperty that maintains the URL text field |
| 52 | * public Prop<JPanel> swingComponent() - just adds the URL field |
| 53 | * add a persister for "Open URL..." actions - {{{ OpenUrlActionPersister }}} |
| 54 | * register all new classes in {{{ LinksModule }}} |
| 55 | |
| 56 | * Logic: |
| 57 | * add a new class {{{ OpenBrowserUtil }}} in {{{ org.sophie2.base.commons.util }}} package and move the {{{ public static void openURL(String url) }}} method from {{{ OldAboutDialog }}} there |
| 58 | * add a new class {{{ ExternalActionsLogic }}} that processes external link actions |
| 59 | * add a new operation ON_SET_URL in {{{ ConfigurationPanelsLogic }}} that is evoked when the user submits data from the OpenUrlConfigurationPanel. |
| 60 | |