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

Variable Index

 o MAXGRIDSIZE

Constructor Index

 o BidiTranslator()
Constructs a new bidirectional transtor.
 o BidiTranslator(Dictionary)
Constructs a new bidirectional transtor with the specified dictionary and translates the specified container.

Method Index

 o checkLayout(Container)
 o getMirror()
Gets the mirror flag.
 o hostTranslated()
 o mirrorContainer(Container)
Mirrors the given container.
 o setMirror(boolean)
Sets the mirror flag.

Variables

 o MAXGRIDSIZE
 protected static final int MAXGRIDSIZE

Constructors

 o BidiTranslator
 public BidiTranslator()
Constructs a new bidirectional transtor.

 o 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

Methods

 o checkLayout
 protected void checkLayout(Container container)
Overrides:
checkLayout in class Translator
 o hostTranslated
 protected void hostTranslated()
Overrides:
hostTranslated in class Translator
 o 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.

 o 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.

 o getMirror
 public boolean getMirror()
Gets the mirror flag.


All Packages  Class Hierarchy  This Package  Previous  Next  Index