ui.accessibility
Class Context

java.lang.Object
  extended by ui.accessibility.Context

public class Context
extends java.lang.Object

Builds an adapted context in the general case, depending on the screen reader and the language

Author:
Grégoire

Field Summary
private  java.lang.String accDescription
          Accessible description
private  java.lang.String accName
          Accessible name
private  java.lang.String bundle
          Bundle
private  ContextualHelp ch
          ContextualHelp
private  java.lang.String key
          Key
private  java.lang.String mnemonic
          Mnemonic
 int[][] shortcut
          Shortcut key : (key,modifier)
use : KeyStroke.getKeyStroke(context.shortcut[i][0],context.shortcut[i][1])
private  Language texts
          Textual contents
private  java.lang.String ttt
          Tool tip text
private  char type
          Type
 
Constructor Summary
Context(java.lang.String k, Language l)
          Constructor :
Context(java.lang.String m, java.lang.String k, Language l)
          Constructor :
Context(java.lang.String m, java.lang.String ctype, java.lang.String k, Language l)
          Constructor :
 
Method Summary
 void addLabel(java.lang.String label, java.lang.String newkey)
           
 void addLabels(java.lang.String[] labels, java.lang.String[] keys)
           
 java.lang.String getBundle()
           
 java.lang.String getDesc()
           
 java.lang.String getKey()
           
 Language getLanguage()
           
 java.lang.String getName()
           
 java.lang.String getTTT()
           
 void reload()
          reloads texts
 void replace(java.lang.String s, java.lang.String r)
           
 void setContextualHelp(javax.swing.JComponent jc, java.lang.String helpid)
          sets contextualhelp
 void treat()
          Treats the context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

texts

private Language texts
Textual contents


type

private char type
Type


mnemonic

private java.lang.String mnemonic
Mnemonic


key

private java.lang.String key
Key


bundle

private java.lang.String bundle
Bundle


accName

private java.lang.String accName
Accessible name


accDescription

private java.lang.String accDescription
Accessible description


ttt

private java.lang.String ttt
Tool tip text


shortcut

public int[][] shortcut
Shortcut key : (key,modifier)
use : KeyStroke.getKeyStroke(context.shortcut[i][0],context.shortcut[i][1])


ch

private ContextualHelp ch
ContextualHelp

Constructor Detail

Context

public Context(java.lang.String m,
               java.lang.String ctype,
               java.lang.String k,
               Language l)
Constructor :

Parameters:
m - the shortcut,
ctype - the content type (ComboBox, Button, TextField, RadioBox, CheckBox, Spinner ...) (optional),
k - the key to access the name, the description, and the tool tip text
l - language The file must content 3 keys : [key]name, [key]desc, [key]ttt.

Context

public Context(java.lang.String m,
               java.lang.String k,
               Language l)
Constructor :

Parameters:
m - the shortcut,
k - the key to access the name, the description, and the tool tip text
l - language The file must content 3 keys : [key]name, [key]desc, [key]ttt

Context

public Context(java.lang.String k,
               Language l)
Constructor :

Parameters:
k - the key to access the name, the description, and the tool tip text
l - language The file must content 3 keys : [key]name, [key]desc, [key]ttt
Method Detail

getName

public java.lang.String getName()
Returns:
the accessible name

getDesc

public java.lang.String getDesc()
Returns:
the accessible description

getTTT

public java.lang.String getTTT()
Returns:
the tool tip text

setContextualHelp

public void setContextualHelp(javax.swing.JComponent jc,
                              java.lang.String helpid)
sets contextualhelp

Parameters:
jc - component
helpid - id

treat

public void treat()
Treats the context


reload

public void reload()
reloads texts


getLanguage

public Language getLanguage()
Returns:
language

getKey

public java.lang.String getKey()
Returns:
key

addLabels

public void addLabels(java.lang.String[] labels,
                      java.lang.String[] keys)
Parameters:
labels - labels
keys - keys

addLabel

public void addLabel(java.lang.String label,
                     java.lang.String newkey)
Parameters:
label - label
newkey - key

getBundle

public java.lang.String getBundle()
Returns:
bundle

replace

public void replace(java.lang.String s,
                    java.lang.String r)
Parameters:
s - string to replace
r - replacement string