Java 类org.springframework.core.style.StylerUtils 实例源码

项目:spring-rich-client    文件:ShuttleSortableTableModel.java   
public int[] sortByColumns(ColumnToSort[] columnsToSort, int[] preSortSelectedRows) {
    int[] modelIndexes = new int[preSortSelectedRows.length];
    if (logger.isDebugEnabled()) {
        logger.debug("Selected row indexes before sort" + StylerUtils.style(preSortSelectedRows));
    }
    for (int i = 0; i < preSortSelectedRows.length; i++) {
        modelIndexes[i] = convertSortedIndexToDataIndex(preSortSelectedRows[i]);
    }
    this.columnsToSort = Arrays.asList(columnsToSort);
    sort();
    int[] postSortSelectedRows = new int[modelIndexes.length];
    for (int i = 0; i < modelIndexes.length; i++) {
        postSortSelectedRows[i] = convertModelToRowIndex(modelIndexes[i]);
    }
    if (logger.isDebugEnabled()) {
        logger.debug("Selected row indexes after sort" + StylerUtils.style(postSortSelectedRows));
    }
    notifyTableChanged();
    return postSortSelectedRows;
}
项目:spring-rich-client    文件:DefaultMessageTranslator.java   
private String buildMessage(String objectName, Object rejectedValue,
        Constraint constraint) {
    StringBuffer buf = new StringBuffer(255);
    MessageSourceResolvable[] args = resolveArguments(constraint);
    if (logger.isDebugEnabled()) {
        logger.debug(StylerUtils.style(args));
    }
    if (objectName != null) {
        buf.append(resolveObjectName(objectName));
        buf.append(' ');
    }
    for (int i = 0; i < args.length - 1; i++) {
        MessageSourceResolvable arg = args[i];
        buf.append(messages.getMessage(arg, locale));
        buf.append(' ');
    }
    buf.append(messages.getMessage(args[args.length - 1], locale));
    buf.append(".");
    return buf.toString();
}
项目:spring-richclient    文件:ShuttleSortableTableModel.java   
public int[] sortByColumns(ColumnToSort[] columnsToSort, int[] preSortSelectedRows) {
    int[] modelIndexes = new int[preSortSelectedRows.length];
    if (logger.isDebugEnabled()) {
        logger.debug("Selected row indexes before sort" + StylerUtils.style(preSortSelectedRows));
    }
    for (int i = 0; i < preSortSelectedRows.length; i++) {
        modelIndexes[i] = convertSortedIndexToDataIndex(preSortSelectedRows[i]);
    }
    this.columnsToSort = Arrays.asList(columnsToSort);
    sort();
    int[] postSortSelectedRows = new int[modelIndexes.length];
    for (int i = 0; i < modelIndexes.length; i++) {
        postSortSelectedRows[i] = convertModelToRowIndex(modelIndexes[i]);
    }
    if (logger.isDebugEnabled()) {
        logger.debug("Selected row indexes after sort" + StylerUtils.style(postSortSelectedRows));
    }
    notifyTableChanged();
    return postSortSelectedRows;
}
项目:spring-richclient    文件:DefaultMessageTranslator.java   
private String buildMessage(String objectName, Object rejectedValue,
        Constraint constraint) {
    StringBuffer buf = new StringBuffer(255);
    MessageSourceResolvable[] args = resolveArguments(constraint);
    if (logger.isDebugEnabled()) {
        logger.debug(StylerUtils.style(args));
    }
    if (objectName != null) {
        buf.append(resolveObjectName(objectName));
        buf.append(' ');
    }
    for (int i = 0; i < args.length - 1; i++) {
        MessageSourceResolvable arg = args[i];
        buf.append(messages.getMessage(arg, locale));
        buf.append(' ');
    }
    buf.append(messages.getMessage(args[args.length - 1], locale));
    buf.append(".");
    return buf.toString();
}
项目:spring4-understanding    文件:DispatcherPortlet.java   
/**
 * No handler found -> throw appropriate exception.
 * @param request current portlet request
 * @param response current portlet response
 * @throws Exception if preparing the response failed
 */
protected void noHandlerFound(PortletRequest request, PortletResponse response) throws Exception {
    if (pageNotFoundLogger.isWarnEnabled()) {
        pageNotFoundLogger.warn("No handler found for current request " +
                "in DispatcherPortlet with name '" + getPortletName() +
                "', mode '" + request.getPortletMode() +
                "', phase '" + request.getAttribute(PortletRequest.LIFECYCLE_PHASE) +
                "', parameters " + StylerUtils.style(request.getParameterMap()));
    }
    throw new NoHandlerFoundException("No handler found for portlet request", request);
}
项目:class-guard    文件:DispatcherPortlet.java   
/**
 * No handler found -> throw appropriate exception.
 * @param request current portlet request
 * @param response current portlet response
 * @throws Exception if preparing the response failed
 */
protected void noHandlerFound(PortletRequest request, PortletResponse response) throws Exception {
    if (pageNotFoundLogger.isWarnEnabled()) {
        pageNotFoundLogger.warn("No handler found for current request " +
                "in DispatcherPortlet with name '" + getPortletName() +
                "', mode '" + request.getPortletMode() +
                "', phase '" + request.getAttribute(PortletRequest.LIFECYCLE_PHASE) +
                "', parameters " + StylerUtils.style(request.getParameterMap()));
    }
    throw new NoHandlerFoundException("No handler found for portlet request", request);
}
项目:spring-rich-client    文件:ClassUtils.java   
public static Method getStaticMethod(String name, Class locatorClass, Class[] args) {
    try {
        logger.debug("Attempting to get method '" + name + "' on class " + locatorClass + " with arguments '"
                + StylerUtils.style(args) + "'");
        Method method = locatorClass.getDeclaredMethod(name, args);
        if ((method.getModifiers() & Modifier.STATIC) != 0)
            return method;

        return null;
    }
    catch (NoSuchMethodException e) {
        return null;
    }
}
项目:spring-rich-client    文件:RefreshableValueHolder.java   
/**
 * Refresh te value by executing the refresh <code>Closure</code>.
 */
public void refresh() {
    if (logger.isDebugEnabled()) {
        logger.debug("Refreshing held value '" + StylerUtils.style(super.getValue()) + "'");
    }
    setValue(refreshFunction.call(null));
}
项目:spring-richclient    文件:ClassUtils.java   
public static Method getStaticMethod(String name, Class locatorClass, Class[] args) {
    try {
        logger.debug("Attempting to get method '" + name + "' on class " + locatorClass + " with arguments '"
                + StylerUtils.style(args) + "'");
        Method method = locatorClass.getDeclaredMethod(name, args);
        if ((method.getModifiers() & Modifier.STATIC) != 0)
            return method;

        return null;
    }
    catch (NoSuchMethodException e) {
        return null;
    }
}
项目:spring-richclient    文件:RefreshableValueHolder.java   
/**
 * Refresh te value by executing the refresh <code>Closure</code>.
 */
public void refresh() {
    if (logger.isDebugEnabled()) {
        logger.debug("Refreshing held value '" + StylerUtils.style(super.getValue()) + "'");
    }
    setValue(refreshFunction.call(null));
}
项目:spring-rich-client    文件:DefaultImageSource.java   
private void debugPrintResources() {
    if (logger.isDebugEnabled()) {
        logger.debug("Initialing image source with resources: " + StylerUtils.style(this.imageResources));
    }
}
项目:spring-richclient    文件:DefaultImageSource.java   
private void debugPrintResources() {
    if (logger.isDebugEnabled()) {
        logger.debug("Initialing image source with resources: " + StylerUtils.style(this.imageResources));
    }
}
项目:spring4-understanding    文件:NoHandlerFoundException.java   
/**
 * Constructor for NoHandlerFoundException.
 * @param msg the detail message
 * @param request the current portlet request,
 * for further context to be included in the exception message
 */
public NoHandlerFoundException(String msg, PortletRequest request) {
    super(msg + ": mode '" + request.getPortletMode() +
            "', phase '" + request.getAttribute(PortletRequest.LIFECYCLE_PHASE) +
            "', parameters " + StylerUtils.style(request.getParameterMap()));
}
项目:spring4-understanding    文件:NoSuchRequestHandlingMethodException.java   
/**
 * Create a new NoSuchRequestHandlingMethodException.
 * @param urlPath the request URI that has been used for handler lookup
 * @param method the HTTP request method of the request
 * @param parameterMap the request's parameters as map
 */
public NoSuchRequestHandlingMethodException(String urlPath, String method, Map<String, String[]> parameterMap) {
    super("No matching handler method found for servlet request: path '" + urlPath +
            "', method '" + method + "', parameters " + StylerUtils.style(parameterMap));
}
项目:class-guard    文件:NoHandlerFoundException.java   
/**
 * Constructor for NoHandlerFoundException.
 * @param msg the detail message
 * @param request the current portlet request,
 * for further context to be included in the exception message
 */
public NoHandlerFoundException(String msg, PortletRequest request) {
    super(msg + ": mode '" + request.getPortletMode() +
            "', phase '" + request.getAttribute(PortletRequest.LIFECYCLE_PHASE) +
            "', parameters " + StylerUtils.style(request.getParameterMap()));
}
项目:class-guard    文件:NoSuchRequestHandlingMethodException.java   
/**
 * Create a new NoSuchRequestHandlingMethodException.
 * @param urlPath the request URI that has been used for handler lookup
 * @param method the HTTP request method of the request
 * @param parameterMap the request's parameters as map
 */
public NoSuchRequestHandlingMethodException(String urlPath, String method, Map parameterMap) {
    super("No matching handler method found for servlet request: path '" + urlPath +
            "', method '" + method + "', parameters " + StylerUtils.style(parameterMap));
}