*
* @param selectedItem
*/
private void ShowElementProperties(ProjectElement selectedItem) {
if (selectedItem instanceof Edge) {
PnlEdgeProperties propertyPanel = new PnlEdgeProperties();
propertyPanel.setEdge((Edge) selectedItem);
currentComponent = propertyPanel;
getScrollPane().setViewportView(propertyPanel);
} else if (selectedItem instanceof Junction) {
PnlJunctionProperties propertyPanel = new PnlJunctionProperties();
propertyPanel.setJunction((Junction) selectedItem);
currentComponent = propertyPanel;
getScrollPane().setViewportView(propertyPanel);
} else if (selectedItem instanceof Flow) {
PnlFlowProperties propertyPanel = new PnlFlowProperties();
propertyPanel.setFlow((Flow) selectedItem);
currentComponent = propertyPanel;
getScrollPane().setViewportView(propertyPanel);
} else if (selectedItem instanceof AreaFlow) {
PnlAreaFlowProperties propertyPanel = new PnlAreaFlowProperties();
propertyPanel.setAreaFlow((AreaFlow) selectedItem);
currentComponent = propertyPanel;
getScrollPane().setViewportView(propertyPanel);
} else if (selectedItem instanceof HotSpot) {
PnlHotSpotProperties propertyPanel = new PnlHotSpotProperties();
propertyPanel.setHotSpot((HotSpot) selectedItem);
currentComponent = propertyPanel;
getScrollPane().setViewportView(propertyPanel);
} else if (selectedItem instanceof TrafficArea) {
PnlTrafficAreaProperties propertyPanel = new PnlTrafficAreaProperties();
propertyPanel.setArea((TrafficArea) selectedItem);
currentComponent = propertyPanel;
getScrollPane().setViewportView(propertyPanel);
} else if (selectedItem instanceof School) {
PnlSchoolProperties propertyPanel = new PnlSchoolProperties();
propertyPanel.setSchool((School) selectedItem);
currentComponent = propertyPanel;
getScrollPane().setViewportView(propertyPanel);
} else if (selectedItem instanceof Accident) {
PnlAccidentProperties propertyPanel = new PnlAccidentProperties();
propertyPanel.setAccident((Accident) selectedItem);
currentComponent = propertyPanel;
getScrollPane().setViewportView(propertyPanel);
} else {