public class WriteKeyAcclPrc
extends java.lang.Object
WriteKeyAccl.execute(),
there only #exec(XmlDataLOffcKeyAccl, org.vishia.libOffc.cfgui.WriteKeyAccl.CmdArgs, LogMessage)
is called with the already read XML data.
ReadRegistryMain which reads XML files in the LibreOffice tool files
called in #exec2(XmlDataLOffcKeyAccl).
idxKeyTranslateKeyNames
filled in initKeyTranslate().
idxKeyAccl.
#outKeys().
For that the OutTextPreparer capability ('gTxt') is used.
| Modifier and Type | Class and Description |
|---|---|
static class |
WriteKeyAcclPrc.AcclKey
Data class to store properties of one accelerator key.
|
| Modifier and Type | Field and Description |
|---|---|
(package private) WriteKeyAccl.CmdArgs |
cmdArgs
Command arguments from
WriteKeyAccl main class. |
org.vishia.util.OutTextPreparer |
gTxtKeyOutput
The gTxt script which is used for output.
|
static org.vishia.util.OutTextPreparer |
gTxtKeyOutputDefault
The gTxt script
OutTextPreparer as default for the output file as constant (final static). |
(package private) java.util.Map<java.lang.String,WriteKeyAcclPrc.AcclKey> |
idxKeyAccl
Result accelerator key association to command.
|
(package private) java.util.Map<java.lang.String,WriteKeyAcclPrc.AcclKey> |
idxKeyAcclShift
Result accelerator key association to command in the order shift following no shift key.
|
(package private) java.util.Map<java.lang.String,java.lang.String> |
idxKeyTranslateKeyNames
Internal translation between key names in the XML file and human readable names.
|
java.util.Map<java.lang.String,org.vishia.util.OutTextPreparer> |
idxScript
Index of all read scripts, here only one expected.
|
(package private) ReadRegistryMain |
reg
Instance to translate the uno and other commands to human readable text.
|
| Constructor and Description |
|---|
WriteKeyAcclPrc(WriteKeyAccl.CmdArgs cmdArgs)
Ctor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
exec(XmlDataLOffcKeyAccl data,
java.io.File fIn,
org.vishia.msgDispatch.LogMessage log)
execution operation in the instantiated class, also called pure as is
in
#exec(XmlDataLOffcKeyAccl, org.vishia.libOffc.cfgui.WriteKeyAccl.CmdArgs, LogMessage). |
void |
init(org.vishia.msgDispatch.LogMessage log) |
private void |
initKeyTranslate()
Fills the
idxKeyTranslateKeyNames. |
(package private) void |
outKeys(java.io.File fIn,
org.vishia.msgDispatch.LogMessage log)
Outputs the accelerator key setting in textual human readable form
from the stored
idxKeyAccl or idxKeyAcclShift. |
final WriteKeyAccl.CmdArgs cmdArgs
WriteKeyAccl main class.final java.util.Map<java.lang.String,WriteKeyAcclPrc.AcclKey> idxKeyAccl
final java.util.Map<java.lang.String,WriteKeyAcclPrc.AcclKey> idxKeyAcclShift
final java.util.Map<java.lang.String,java.lang.String> idxKeyTranslateKeyNames
ReadRegistryMain reg
public final org.vishia.util.OutTextPreparer gTxtKeyOutput
cmdArgs WriteKeyAccl.CmdArgs.file_gTxt
If this file is not given or faulty, then gTxtKeyOutputDefault is used.public static final org.vishia.util.OutTextPreparer gTxtKeyOutputDefault
OutTextPreparer as default for the output file as constant (final static).
It is completely parsed in its ctor (on class loading).public final java.util.Map<java.lang.String,org.vishia.util.OutTextPreparer> idxScript
public WriteKeyAcclPrc(WriteKeyAccl.CmdArgs cmdArgs)
initKeyTranslate()
cmdArgs WriteKeyAccl.CmdArgs.file_gTxt
If this file is not given or faulty, then gTxtKeyOutputDefault is used.
log - cmdArgs - java.io.FileNotFoundExceptionprivate void initKeyTranslate()
idxKeyTranslateKeyNames. Key names in XML to human readable key names.
Its content is:
private void initKeyTranslate () {
this.idxKeyTranslate.put("KEY_BACKSPACE", "Bspc");
this.idxKeyTranslate.put("KEY_DOWN", "Down");
this.idxKeyTranslate.put("KEY_ESCAPE", "Esc");
this.idxKeyTranslate.put("KEY_HOME", "Home");
this.idxKeyTranslate.put("KEY_END", "End");
this.idxKeyTranslate.put("KEY_INSERT", "Ins ");
this.idxKeyTranslate.put("KEY_DELETE", "Del ");
this.idxKeyTranslate.put("KEY_LEFT", "Left");
this.idxKeyTranslate.put("KEY_PAGEDOWN", "PgDn");
this.idxKeyTranslate.put("KEY_PAGEUP", "PgUp");
this.idxKeyTranslate.put("KEY_RETURN", "ENTER");
this.idxKeyTranslate.put("KEY_RIGHT", "Right");
this.idxKeyTranslate.put("KEY_BRACKETLEFT", " [");
this.idxKeyTranslate.put("KEY_BRACKETRIGHT", " ]");
this.idxKeyTranslate.put("KEY_DIVIDE", " /");
this.idxKeyTranslate.put("KEY_ADD", " +");
this.idxKeyTranslate.put("KEY_SUBTRACT", " -");
this.idxKeyTranslate.put("KEY_MULTIPLY", " *");
this.idxKeyTranslate.put("KEY_NUMBERSIGN", " #");
this.idxKeyTranslate.put("KEY_SPACE", "Space");
}
public void init(org.vishia.msgDispatch.LogMessage log)
public int exec(XmlDataLOffcKeyAccl data, java.io.File fIn, org.vishia.msgDispatch.LogMessage log)
#exec(XmlDataLOffcKeyAccl, org.vishia.libOffc.cfgui.WriteKeyAccl.CmdArgs, LogMessage).
data - Data from XML read.void outKeys(java.io.File fIn,
org.vishia.msgDispatch.LogMessage log)
throws java.io.IOException
idxKeyAccl or idxKeyAcclShift.
It uses the prepared gTxt script in gTxtKeyOutput which's content depends on the file
given with cmdArgs WriteKeyAccl.CmdArgs.file_gTxt
If this file is not given or faulty, then gTxtKeyOutputDefault is used.fIn - The input file may be used with its path/name without extension.
The name of the output file is determined by WriteKeyAccl.CmdArgs.fpOutTextlog - java.io.IOException