Skip to content

Commit

Permalink
feat: MainWindowMenu deprecate old menu creation methods
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Miura <[email protected]>
  • Loading branch information
miurahr committed May 25, 2024
1 parent c5b3b43 commit cb53607
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/org/omegat/gui/main/BaseMainWindowMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public BaseMainWindowMenu(IMainWindow mainWindow) {
*/
void initComponents() {
createComponents();
setActionCommands();
// setActionCommands();
constructMenu();
createMenuBar();
PropertiesShortcuts.getMainMenuShortcuts().bindKeyStrokes(mainMenu);
Expand Down Expand Up @@ -737,6 +737,7 @@ protected JCheckBoxMenuItem createCheckboxMenuItemFromAction(String commandKey)
* title name key in resource bundle
* @return menu item instance
*/
@Deprecated
protected JCheckBoxMenuItem createCheckboxMenuItem(final String titleKey) {
JCheckBoxMenuItem result = new JCheckBoxMenuItem();
Mnemonics.setLocalizedText(result, OStrings.getString(titleKey));
Expand All @@ -763,6 +764,7 @@ protected JRadioButtonMenuItem createRadioButtonMenuItemFromAction(String comman
* title name key in resource bundle
* @return menu item instance
*/
@Deprecated
protected JRadioButtonMenuItem createRadioButtonMenuItem(final String titleKey, ButtonGroup buttonGroup) {
JRadioButtonMenuItem result = new JRadioButtonMenuItem();
Mnemonics.setLocalizedText(result, OStrings.getString(titleKey));
Expand All @@ -775,6 +777,7 @@ protected JRadioButtonMenuItem createRadioButtonMenuItem(final String titleKey,
* Set 'actionCommand' for all menu items. TODO: change to key from resource
* bundle values
*/
@Deprecated
protected void setActionCommands() {
try {
for (Field f : StaticUtils.getAllModelFields(this.getClass())) {
Expand Down

0 comments on commit cb53607

Please sign in to comment.