Remove useless method in interfaces.

This commit is contained in:
Holt59 2018-03-10 22:18:59 +01:00
parent 23341f1499
commit 9e8457337e
4 changed files with 2 additions and 25 deletions

View File

@ -338,11 +338,13 @@ public class MainWindow extends JFrame {
setJMenuBar(createMenuBar(openMapActionListener));
// Initial panel to show "Open Map... "
JPanel openPanel = new JPanel();
openPanel.setLayout(new BoxLayout(openPanel, BoxLayout.PAGE_AXIS));
JButton openButton = new JButton("Open Map... ");
openButton.setAlignmentX(Component.CENTER_ALIGNMENT);
openButton.addActionListener(openMapActionListener);
openButton.setFocusPainted(false);
openPanel.add(Box.createVerticalGlue());
openPanel.add(openButton);
openPanel.add(Box.createVerticalGlue());

View File

@ -13,16 +13,6 @@ public class BasicGraphPalette implements GraphPalette {
private static final Color SMALL_ROAD_COLOR = new Color(255, 234, 0);
private static final Color COASTLINE_COLOR = Color.BLUE;
@Override
public int getDefaultPointWidth() {
return 2;
}
@Override
public Color getDefaultPointColor() {
return Color.GREEN;
}
@Override
public Color getColorForArc(Arc arc) {
RoadType type = arc.getRoadInformation().getType();

View File

@ -10,11 +10,6 @@ public class BlackAndWhiteGraphPalette extends BasicGraphPalette {
private final static Color[] ROAD_COLOR_FROM_WIDTH = { null, new Color(140, 140, 140),
new Color(80, 80, 80), new Color(40, 40, 40), new Color(30, 30, 30) };
@Override
public Color getDefaultPointColor() {
return Color.BLACK;
}
@Override
public Color getColorForArc(Arc arc) {
int width = getWidthForArc(arc);

View File

@ -6,16 +6,6 @@ import org.insa.graph.Arc;
public interface GraphPalette {
/**
* @return The default point width for this palette.
*/
public int getDefaultPointWidth();
/**
* @return The default point color for this palette.
*/
public Color getDefaultPointColor();
/**
* @param arc Arc for which color should be retrieved.
*