@@ -41,19 +41,19 @@ public class MenuData {
41
41
private String menuSubGroup ;
42
42
43
43
public MenuData (String [] menuPath ) {
44
- this (menuPath , null , null );
44
+ this (menuPath , null , null , NO_MNEMONIC , null );
45
45
}
46
46
47
47
public MenuData (String [] menuPath , String group ) {
48
- this (menuPath , null , group );
48
+ this (menuPath , null , group , NO_MNEMONIC , null );
49
49
}
50
50
51
51
public MenuData (String [] menuPath , Icon icon ) {
52
- this (menuPath , icon , null );
52
+ this (menuPath , icon , null , NO_MNEMONIC , null );
53
53
}
54
54
55
55
public MenuData (String [] menuPath , Icon icon , String menuGroup ) {
56
- this (processMenuPath ( menuPath ) , icon , menuGroup , getMnemonic ( menuPath ) , null );
56
+ this (menuPath , icon , menuGroup , NO_MNEMONIC , null );
57
57
}
58
58
59
59
public MenuData (String [] menuPath , Icon icon , String menuGroup , int mnemonic ,
@@ -62,10 +62,10 @@ public MenuData(String[] menuPath, Icon icon, String menuGroup, int mnemonic,
62
62
if (menuPath == null || menuPath .length == 0 ) {
63
63
throw new IllegalArgumentException ("Menu path cannot be null or empty" );
64
64
}
65
- this .menuPath = menuPath ;
65
+ this .menuPath = processMenuPath ( menuPath ) ;
66
66
this .menuGroup = menuGroup ;
67
67
this .menuSubGroup = menuSubGroup == null ? NO_SUBGROUP : menuSubGroup ;
68
- this .mnemonic = mnemonic ;
68
+ this .mnemonic = mnemonic == NO_MNEMONIC ? getMnemonic ( menuPath ) : mnemonic ;
69
69
this .icon = DockingUtils .scaleIconAsNeeded (icon );
70
70
}
71
71
0 commit comments