Add new ArcInspector and correct naming in GUI.
This commit is contained in:
		@@ -79,6 +79,34 @@ public class ArcInspectorFactory {
 | 
				
			|||||||
        });
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // Only road allowed for cars and time:
 | 
					        // Only road allowed for cars and time:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        filters.add(new ArcInspector() {
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public boolean isAllowed(Arc arc) {
 | 
				
			||||||
 | 
					                return true;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public double getCost(Arc arc) {
 | 
				
			||||||
 | 
					                return arc.getMinimumTravelTime();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public int getMaximumSpeed() {
 | 
				
			||||||
 | 
					                return GraphStatistics.NO_MAXIMUM_SPEED;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public Mode getMode() {
 | 
				
			||||||
 | 
					                return Mode.TIME;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            @Override
 | 
				
			||||||
 | 
					            public String toString() {
 | 
				
			||||||
 | 
					                return "Fastest path, all roads allowed";
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        filters.add(new ArcInspector() {
 | 
					        filters.add(new ArcInspector() {
 | 
				
			||||||
            @Override
 | 
					            @Override
 | 
				
			||||||
            public boolean isAllowed(Arc arc) {
 | 
					            public boolean isAllowed(Arc arc) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -194,7 +194,7 @@ public class AlgorithmPanel extends JPanel implements DrawingChangeListener {
 | 
				
			|||||||
            c.gridy = 1;
 | 
					            c.gridy = 1;
 | 
				
			||||||
            c.gridx = 0;
 | 
					            c.gridx = 0;
 | 
				
			||||||
            c.weightx = 0;
 | 
					            c.weightx = 0;
 | 
				
			||||||
            modeAndObserverPanel.add(new JLabel("Restrictions: "), c);
 | 
					            modeAndObserverPanel.add(new JLabel("Mode: "), c);
 | 
				
			||||||
            c.gridx = 1;
 | 
					            c.gridx = 1;
 | 
				
			||||||
            c.gridwidth = 2;
 | 
					            c.gridwidth = 2;
 | 
				
			||||||
            c.weightx = 1;
 | 
					            c.weightx = 1;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user