public class PopupMenu extends java.lang.Object implements ItemVisitor
| Modifier and Type | Class and Description |
|---|---|
private class |
PopupMenu.ConnectChecker
Nodevisitor that checks if there is a item in the selected Nodes list, that can not be
connected by the popup-menu.
|
| Modifier and Type | Field and Description |
|---|---|
private javax.swing.Action |
addAdapter
Action for adding a new NetworkAdapter.
|
private NewSlotAction |
addSlot
Action for adding a new slot.
|
private javax.swing.Action |
changeConnectingType
action for changing the connecting type.
|
private javax.swing.Action |
connect
Action for connecting all selected nodes.
|
private javax.swing.Action |
delete
Action for deleting selected nodes.
|
private ConfigurationGraph |
graph
The Graph.
|
private javax.swing.JPopupMenu |
popup
pop-up menu for the right click events.
|
private javax.swing.Action |
rename
Action for rename all selected nodes.
|
| Constructor and Description |
|---|
PopupMenu(ConfigurationGraph graph)
constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
adapter(NetworkAdapter adapter)
Shows the details of the adapter.
|
private void |
addRenameAndAdapter()
Adds Rename and add-Adapter Option.
|
private void |
addRenameAndDelete()
Adds Rename and Delete Option.
|
private void |
addRenameAndDeleteAndAdapter()
Adds Rename, Delete and add-Adapter Option.
|
void |
configRouter(ConfigRouter router)
It's a router.
|
javax.swing.JPopupMenu |
getPopup(java.util.List<Item> selected)
Method for getting the Popup.
|
void |
hardwareEdge(HardwareEdge edge)
It's a HardwareEdge.
|
void |
host(Host host)
It's a host.
|
void |
internet(Internet internet)
It's a internet.
|
void |
networkCable(NetworkCable edge)
It's a networkEdge.
|
void |
router(Router router)
It's a normal router.
|
void |
slot(Slot slot)
It's a Slot.
|
void |
sWitch(Switch sWitch)
It's a host.
|
private final javax.swing.JPopupMenu popup
private final ConfigurationGraph graph
private final javax.swing.Action rename
private final javax.swing.Action connect
private final javax.swing.Action delete
private final javax.swing.Action addAdapter
private final NewSlotAction addSlot
private final javax.swing.Action changeConnectingType
public PopupMenu(ConfigurationGraph graph)
graph - the graph.public javax.swing.JPopupMenu getPopup(java.util.List<Item> selected)
selected - the selected Nodes.public void host(Host host)
ItemVisitorhost in interface ItemVisitorhost - the hostpublic void router(Router router)
ItemVisitorrouter in interface ItemVisitorrouter - router.public void sWitch(Switch sWitch)
ItemVisitorsWitch in interface ItemVisitorsWitch - the switch.public void adapter(NetworkAdapter adapter)
ItemVisitoradapter in interface ItemVisitoradapter - the adapterpublic void internet(Internet internet)
ItemVisitorinternet in interface ItemVisitorinternet - the internet.public void configRouter(ConfigRouter router)
ItemVisitorconfigRouter in interface ItemVisitorrouter - router.public void hardwareEdge(HardwareEdge edge)
ItemVisitorhardwareEdge in interface ItemVisitoredge - the edge.public void networkCable(NetworkCable edge)
ItemVisitornetworkCable in interface ItemVisitoredge - the edge.public void slot(Slot slot)
ItemVisitorslot in interface ItemVisitorslot - the slot.private void addRenameAndDelete()
private void addRenameAndDeleteAndAdapter()
private void addRenameAndAdapter()