7025699: Policy Tool is not accessible by keyboard

Reviewed-by: alexp, weijun
This commit is contained in:
Leif Samuelsson 2013-10-18 08:57:52 +08:00 committed by Weijun Wang
parent b57d193ddd
commit a25177c60e
5 changed files with 806 additions and 445 deletions

View File

@ -44,16 +44,19 @@ public class Resources extends java.util.ListResourceBundle {
{"Usage.policytool.options.", "Usage: policytool [options]"},
{".file.file.policy.file.location",
" [-file <file>] policy file location"},
{"New", "New"},
{"Open", "Open"},
{"Save", "Save"},
{"Save.As", "Save As"},
{"View.Warning.Log", "View Warning Log"},
{"Exit", "Exit"},
{"Add.Policy.Entry", "Add Policy Entry"},
{"Edit.Policy.Entry", "Edit Policy Entry"},
{"Remove.Policy.Entry", "Remove Policy Entry"},
{"Edit", "Edit"},
{"New", "&New"},
{"New.accelerator", "control N"},
{"Open", "&Open..."},
{"Open.accelerator", "control O"},
{"Save", "&Save"},
{"Save.accelerator", "control S"},
{"Save.As", "Save &As..."},
{"View.Warning.Log", "View &Warning Log"},
{"Exit", "E&xit"},
{"Add.Policy.Entry", "&Add Policy Entry"},
{"Edit.Policy.Entry", "&Edit Policy Entry"},
{"Remove.Policy.Entry", "&Remove Policy Entry"},
{"Edit", "&Edit"},
{"Retain", "Retain"},
{"Warning.File.name.may.include.escaped.backslash.characters.It.is.not.necessary.to.escape.backslash.characters.the.tool.escapes",
@ -66,8 +69,8 @@ public class Resources extends java.util.ListResourceBundle {
{"Add.Public.Key.Alias", "Add Public Key Alias"},
{"Remove.Public.Key.Alias", "Remove Public Key Alias"},
{"File", "File"},
{"KeyStore", "KeyStore"},
{"File", "&File"},
{"KeyStore", "&KeyStore"},
{"Policy.File.", "Policy File:"},
{"Could.not.open.policy.file.policyFile.e.toString.",
"Could not open policy file: {0}: {1}"},
@ -89,20 +92,25 @@ public class Resources extends java.util.ListResourceBundle {
{"OK.to.overwrite.existing.file.filename.",
"OK to overwrite existing file {0}?"},
{"Cancel", "Cancel"},
{"CodeBase.", "CodeBase:"},
{"SignedBy.", "SignedBy:"},
{"Add.Principal", "Add Principal"},
{"Edit.Principal", "Edit Principal"},
{"Remove.Principal", "Remove Principal"},
{"Principals.", "Principals:"},
{".Add.Permission", " Add Permission"},
{".Edit.Permission", " Edit Permission"},
{"Remove.Permission", "Remove Permission"},
// Policy Entry Dialog
{"CodeBase.", "&CodeBase:"},
{"SignedBy.", "&SignedBy:"},
{"Add.Principal", "&Add Principal"},
{"Edit.Principal", "&Edit Principal"},
{"Remove.Principal", "&Remove Principal"},
{"Principals.", "&Principals:"},
{".Add.Permission", " A&dd Permission"},
{".Edit.Permission", " Ed&it Permission"},
{"Remove.Permission", "Re&move Permission"},
{"Done", "Done"},
{"KeyStore.URL.", "KeyStore URL:"},
{"KeyStore.Type.", "KeyStore Type:"},
{"KeyStore.Provider.", "KeyStore Provider:"},
{"KeyStore.Password.URL.", "KeyStore Password URL:"},
// KeyStore Edit Dialog
{"KeyStore.URL.", "KeyStore &URL:"},
{"KeyStore.Type.", "KeyStore &Type:"},
{"KeyStore.Provider.", "KeyStore &Provider:"},
{"KeyStore.Password.URL.", "KeyStore Pass&word URL:"},
{"Principals", "Principals"},
{".Edit.Principal.", " Edit Principal:"},
{".Add.New.Principal.", " Add New Principal:"},
@ -122,8 +130,8 @@ public class Resources extends java.util.ListResourceBundle {
"Policy successfully written to {0}"},
{"null.filename", "null filename"},
{"Save.changes.", "Save changes?"},
{"Yes", "Yes"},
{"No", "No"},
{"Yes", "&Yes"},
{"No", "&No"},
{"Policy.Entry", "Policy Entry"},
{"Save.Changes", "Save Changes"},
{"No.Policy.Entry.selected", "No Policy Entry selected"},

View File

@ -23,12 +23,10 @@ reading these instructions.<br><br>
Warning: Principal name 'myalias' specified without a Principal class.
<li> Click on "OK"
<li> Open the "File" menu, and "Save As"
<li> Enter "p1" as the file name
<li> Click on "OK"
<li> Click on "OK" in the message window
<li> Save using the file name "p1"
<li> Click on "OK" in the status message window
<li> Open the "File" menu and "Open Policy"
<li> Enter "p1" as the file name
<li> Click on "OK"
<li> Open the file named "p1"
<li> If the file opens successfully, the test passed.
Otherwise, the test failed.
</ol>

View File

@ -9,8 +9,9 @@ reading these instructions.<br><br>
First, policytool will be invoked.<br><br>
On Windows, if PolicyTool tries to open the default Policy File<br>
and it has the File separator character pointing the wrong way, like:<br><br>
Pull down 'File' menu and select 'View Warning Log', which shows that
the default Policy File is not found. On Windows, if the file name
has the File separator character pointing the wrong way, like:<br><br>
C:\windows/java.policy<br><br>

View File

@ -12,6 +12,7 @@ First, policytool will be invoked.<br><br>
Then, follow these steps:<br>
0) Find (or create) a temporary directory that you have write access to.
(Example: 'C:\foo\tmp' on Windows or '/tmp' on other systems)<br><br>
1) Click on the "Add Policy Entry" button in the
main policytool window.<br><br>
@ -31,7 +32,7 @@ select "listenToAllAWTEvents".<br><br>
select "Save As".<br><br>
8) In the SaveAs window, enter "/tmp/ptool.test" as the file name
and click "OK".<br>
and save it. If the file already exists, just replace it.<br>
(Or use the temporary directory mentioned in Step 0 if it's not '/tmp'.
For example, "C:\foo\tmp\ptool.test" on Windows)<br><br>