001/* 002// This software is subject to the terms of the Eclipse Public License v1.0 003// Agreement, available at the following URL: 004// http://www.eclipse.org/legal/epl-v10.html. 005// You must accept the terms of that agreement to use this software. 006// 007// Copyright (C) 2008-2009 Pentaho 008// All Rights Reserved. 009*/ 010package mondrian.gui.validate.impl; 011 012import mondrian.gui.I18n; 013import mondrian.gui.validate.Messages; 014 015/** 016 * Implementation of <code>Messages</code> for Workbench. 017 * 018 * @author mlowery 019 */ 020public class WorkbenchMessages implements Messages { 021 022 private final I18n i18n; 023 024 /** 025 * Creates a WorkbenchMessages. 026 * 027 * @param i18n Resources 028 */ 029 public WorkbenchMessages(I18n i18n) { 030 super(); 031 this.i18n = i18n; 032 } 033 034 public String getFormattedString( 035 String stringId, 036 String defaultValue, 037 Object... args) 038 { 039 return i18n.getFormattedString(stringId, defaultValue, args); 040 } 041 042 public String getString(String stringID, String defaultValue) { 043 return i18n.getString(stringID, defaultValue); 044 } 045} 046 047// End WorkbenchMessages.java