-
Notifications
You must be signed in to change notification settings - Fork 115
/
Copy pathBoardMenuRules.java
96 lines (83 loc) · 3.4 KB
/
BoardMenuRules.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/*
* Copyright (C) 2014 Alfons Wirtz
* website www.freerouting.net
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License at <http://www.gnu.org/licenses/>
* for more details.
*
* BoardRulesMenu.java
*
* Created on 20. Februar 2005, 06:00
*/
package gui;
/**
* Creates the rules menu of a board frame.
*
* @author Alfons Wirtz
*/
public class BoardMenuRules extends javax.swing.JMenu
{
/** Returns a new windows menu for the board frame. */
public static BoardMenuRules get_instance(BoardFrame p_board_frame)
{
final BoardMenuRules rules_menu = new BoardMenuRules(p_board_frame);
rules_menu.setText(rules_menu.resources.getString("rules"));
javax.swing.JMenuItem clearance_window = new javax.swing.JMenuItem();
clearance_window.setText(rules_menu.resources.getString("clearance_matrix"));
clearance_window.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(java.awt.event.ActionEvent evt)
{
rules_menu.board_frame.clearance_matrix_window.setVisible(true);
}
});
rules_menu.add(clearance_window);
javax.swing.JMenuItem via_window = new javax.swing.JMenuItem();
via_window.setText(rules_menu.resources.getString("vias"));
via_window.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(java.awt.event.ActionEvent evt)
{
rules_menu.board_frame.via_window.setVisible(true);
}
});
rules_menu.add(via_window);
javax.swing.JMenuItem nets_window = new javax.swing.JMenuItem();
nets_window.setText(rules_menu.resources.getString("nets"));
nets_window.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(java.awt.event.ActionEvent evt)
{
rules_menu.board_frame.net_info_window.setVisible(true);
}
});
rules_menu.add(nets_window);
javax.swing.JMenuItem net_class_window = new javax.swing.JMenuItem();
net_class_window.setText(rules_menu.resources.getString("net_classes"));
net_class_window.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(java.awt.event.ActionEvent evt)
{
rules_menu.board_frame.edit_net_rules_window.setVisible(true);
}
});
rules_menu.add(net_class_window);
return rules_menu;
}
/** Creates a new instance of BoardRulesMenu */
private BoardMenuRules(BoardFrame p_board_frame)
{
board_frame = p_board_frame;
resources = java.util.ResourceBundle.getBundle("gui.resources.BoardMenuRules", p_board_frame.get_locale());
}
private final BoardFrame board_frame;
private final java.util.ResourceBundle resources;
}