Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

org.pentaho.reportdesigner.lib.client.i18n.TranslationManager

The translation manager can be used to load translations using keys. Regular java property files are used as the underlying storage mechanism (see /res/Translations.properties).
The values in the property file use standard MessageFormat syntax to specify parameters.

...

Code Block
String text = TranslationManager.getInstance().getTranslation("R", "SaveReportCommand.Text");
int mnemonic = TranslationManager.getInstance().getMnemonic("R", "SaveReportCommand.Text");
int displayedMnemonicIndex = TranslationManager.getInstance().getDisplayedMnemonicIndex("R", "SaveReportCommand.Text");

org.pentaho.reportdesigner.lib.client.components.CenterPanelDialog

The CenterPanelDialog class is an extension to the regular JDialog. setCenterPanel is used to set the actual content of the dialog (without buttons).

Dialog buttons (sizing, default command, cancel command)
Buttons can be added using CenterPanelDialog#setButtons.
The first two parameters of setButtons are used to mark the default and cancel button. A dialog containing one close button thus leads in a possibly strange looking call like:

Code Block

dialog.setButtons(closeButton/*to mark as default*/, closeButton/*to mark as cancel*/, closeButton/*to really add the button*/);

passing null as an argument will add a small gap between buttons e.g:

Code Block

dialog.setButtons(okButton, cancelButton, okButton, cancelButton, null, resetButton);

will lead to a dialog with three buttons ("OK", "Cancel", "Reset") with a small gap between the cancel and the reset button. okButton is the default, cancelButton is used when disposing the dialog.

Initially focused component
CenterPanelDialog#setInitialFocusedComponent

Extended modality (only effective when running on Java 6)