Hitachi Vantara Pentaho Community Wiki
Child pages
  • 5. ReportDesigner Utilities
Skip to end of metadata
Go to start of metadata


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

The common case to load mnemonics and mnemonic indices is simplified by extending the syntax to use underscores:


The mnemonic will be set to 'S' and index to 0.

The values can be accessed using the TranslationManager:

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


The CenterPanelDialog class is an extension to the regular JDialog. The method 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:

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:

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

Extended modality (only effective when running on Java 6)


All unexpected exceptions resulting in a possibly corrupted state of the ReportDesigner should be added to the UncaughtExcfeptionsModel. This usually leads in a red blinking warning message on the ReportDialog.


FontUtils can be used to derive fonts. StyleContext is internally used to prevent a bug where Japanese characters of a derived font didn't render anymore. Additionally StyleContext uses a simple cache that might speed up the derive operation a little bit.


IOUtil is used to close streams (always close streams accessing native resources).

  • No labels