All Packages Class Hierarchy This Package Previous Next Index
Class multilizer.BidiTranslator
java.lang.Object
|
+----multilizer.Translator
|
+----multilizer.BidiTranslator
- public class BidiTranslator
- extends Translator
A translator that can mirror the host if a bidirectional language (Arabic, Farsi or Hebrew) is active.
Use this class instead of the
Translator
component if you use or plan to use
a bidirectional language.
The following paragraphs contain the layout information you need to create containers
that can be mirrored.
BorderLayout
Use the
BidiBorderLayout
instead.
FlowLayout
No special requirements.
GridBagLayout
The container must use only absolute positions (gridx and gridy).
If you need to use relative positions use the
BidiGridBagLayout
instead.
GridLayout
The container must contain at least as many components as the amount of grid cells.
No layout
No special requirements.
Any other layout
Derive a new translator class from this class and override the
mirrorContainer
method.
- See Also:
- BidiBorderLayout, BidiGridBagLayout
-
MAXGRIDSIZE
-
-
BidiTranslator()
- Constructs a new bidirectional transtor.
-
BidiTranslator(Dictionary)
- Constructs a new bidirectional transtor with the specified dictionary and translates the specified container.
-
checkLayout(Container)
-
-
getMirror()
- Gets the mirror flag.
-
hostTranslated()
-
-
mirrorContainer(Container)
- Mirrors the given container.
-
setMirror(boolean)
- Sets the mirror flag.
MAXGRIDSIZE
protected static final int MAXGRIDSIZE
BidiTranslator
public BidiTranslator()
- Constructs a new bidirectional transtor.
BidiTranslator
public BidiTranslator(Dictionary dictionary)
- Constructs a new bidirectional transtor with the specified dictionary and translates the specified container.
- Parameters:
- dictionary - the dictionary for the translator
checkLayout
protected void checkLayout(Container container)
- Overrides:
- checkLayout in class Translator
hostTranslated
protected void hostTranslated()
- Overrides:
- hostTranslated in class Translator
mirrorContainer
protected void mirrorContainer(Container container)
- Mirrors the given container.
If you use any nonestandard layout derive a new translator from this class
and override this method.
setMirror
public void setMirror(boolean value)
- Sets the mirror flag.
If this is true the translator mirrors the host whenever a bidirectional language is active.
The default value is true.
getMirror
public boolean getMirror()
- Gets the mirror flag.
All Packages Class Hierarchy This Package Previous Next Index