public static String getString(String key) { return rl.getString(key); } }
private static Locale getUserPreferredLocale() { ResourceLoader rl = new ResourceLoader(); return rl.getLocale(); } }
public static String makeUserDisplayName( String userId ) { String userDisplayName = NULL_STRING; userDisplayName = rb.getFormattedMessage("udp.unregistered", userId); return userDisplayName; }
/** * Gets the users preferred orientation, either from the user's session or Sakai preferences and returns it * This depends on Sakai's ResourceLoader. * * @return */ public static String getUserPreferredOrientation() { ResourceLoader rl = new ResourceLoader(); return rl.getOrientation(rl.getLocale()); }
private String getMessageFromBundle(String key) { if (toolBundle == null) toolBundle = new ResourceLoader("chat"); return toolBundle.getString(key); }
public SakaiViewHandler(ViewHandler wrapped) { m_wrapped = wrapped; rb = new ResourceLoader(); }
/** * Get the image file name based on the content type. * * @param contentType * The content type string. * @return The image file name based on the content type. */ public String getContentTypeImage(String contentType) { String image = DEFAULT_IMAGE; if (contentType != null && m_contentTypeImages.getIsValid(contentType.toLowerCase())) { image = m_contentTypeImages.getString(contentType.toLowerCase()); } return image; } // getContentTypeImage
/** Methods delegated to default ViewHandler */ public Locale calculateLocale(FacesContext arg0) { return rb.getLocale(); }
protected MessageFormat resolveCode(String code, Locale locale) { resourceLoader.setContextLocale(locale); String msg = resourceLoader.getString(code); return createMessageFormat(msg, locale); }
JLabel time = new JLabel("test"); ResourceLoader resLoader = new ResourceLoader(); time.setFont(resLoader.getFont(ResourceLoader.FONT_DIGITAL, 72)); time.setBorder(BorderFactory.createEmptyBorder(0, 20, 20, 20));
@Override public boolean containsKey(Object key) { if (key == null || !(key instanceof String)) { return false; } return getIsValid((String)key); }
/** * Looks up the sql statements defined in chat-sql.properties. * @param key * @return */ private String getMessageFromBundle(String key) { if (toolBundle == null) toolBundle = new ResourceLoader("chat-sql"); return toolBundle.getString(key); }
/** * Gets the users preferred orientation, either from the user's session or Sakai preferences and returns it * This depends on Sakai's ResourceLoader. * * @return */ public static String getUserPreferredOrientation() { ResourceLoader rl = new ResourceLoader(); return rl.getOrientation(rl.getLocale()); }
public SakaiViewHandler(ViewHandler wrapped) { m_wrapped = wrapped; rb = new ResourceLoader(); }
/** * Get the font-awesome image class name based on the content type. * * @param contentType * The content type string. * @return The font-awesome image class name based on the content type. */ public String getContentTypeImageClass(String contentType) { String imageClass = DEFAULT_IMAGE_CLASS; if (contentType != null && m_contentTypeImageClasses.getIsValid(contentType.toLowerCase())) { imageClass = m_contentTypeImageClasses.getString(contentType.toLowerCase()); } return imageClass; } // getContentTypeImage
/** Methods delegated to default ViewHandler */ public Locale calculateLocale(FacesContext arg0) { return rb.getLocale(); }
/** * Gets the users preferred locale, either from the user's session or Sakai preferences and returns it * This depends on Sakai's ResourceLoader. * * @return */ public static Locale getUserPreferredLocale() { ResourceLoader rl = new ResourceLoader(); return rl.getLocale(); }
public static String getRB(ResourceLoader rb, String key, String def) { if (rb == null) { return def; } return rb.getString(key, def); }