public final class ConnectAction extends AbstractConfigurationGraphAction
| Modifier and Type | Class and Description |
|---|---|
private class |
ConnectAction.VisitOwnerOfFirstAdapter
Visitor for visiting the secondAdapter.
|
private class |
ConnectAction.VisitOwnerOfSecondAdapterWithListOfTypes
Visits the owner of the second Adapter, that should be connected, if the owner of the first
adapter was a configRouter node.
|
private class |
ConnectAction.VisitOwnerOfSecondAdapterWithOneType
Visits the owner of the second Adapter, that should be connected, if the owner of the first
adapter was a internet node.
|
| Constructor and Description |
|---|
ConnectAction(java.lang.String name,
ConfigurationGraph graph)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
private void |
createNewConnection(Adapter adapter1,
Adapter adapter2)
creates a new connection between adaper1 and adapter2 if there are not already connected.
|
private void |
createNewConnectionBetweeenRouterAndInternet(Adapter adapter1,
Adapter adapter2,
ConnectingType type,
java.util.List<ConnectingType> list)
creates a new connection between adaper1 and adapter2 if there are not already connected and
their owner have the same connectingtype.
|
private void |
showWarningMessage()
Method for showing the Warning Message.
|
private boolean |
typeInList(ConnectingType type,
java.util.List<ConnectingType> list)
true if list contains type.
|
getGraphpublic ConnectAction(java.lang.String name,
ConfigurationGraph graph)
name - the name.graph - the graph.public void actionPerformed(java.awt.event.ActionEvent e)
private void showWarningMessage()
private boolean typeInList(ConnectingType type, java.util.List<ConnectingType> list)
type - the type.list - the list.private void createNewConnectionBetweeenRouterAndInternet(Adapter adapter1, Adapter adapter2, ConnectingType type, java.util.List<ConnectingType> list)
adapter1 - the adapter.adapter2 - the adapter.type - type which has to be in the list.list - the list.