org.apache.taglibs.standard.tag.common.core.Util.getStyle()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(13.1k)|赞(0)|评价(0)|浏览(198)

本文整理了Java中org.apache.taglibs.standard.tag.common.core.Util.getStyle()方法的一些代码示例,展示了Util.getStyle()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.getStyle()方法的具体详情如下:
包路径:org.apache.taglibs.standard.tag.common.core.Util
类名称:Util
方法名:getStyle

Util.getStyle介绍

暂无

代码示例

代码示例来源:origin: org.jboss.spec.javax.servlet.jstl/jboss-jstl-api_1.2_spec

  1. private DateFormat createFormatter(Locale loc, String pattern) throws JspException {
  2. // Apply pattern, if present
  3. if (pattern != null) {
  4. return new SimpleDateFormat(pattern, loc);
  5. }
  6. if ((type == null) || DATE.equalsIgnoreCase(type)) {
  7. int style = Util.getStyle(dateStyle, "FORMAT_DATE_INVALID_DATE_STYLE");
  8. return DateFormat.getDateInstance(style, loc);
  9. } else if (TIME.equalsIgnoreCase(type)) {
  10. int style = Util.getStyle(timeStyle, "FORMAT_DATE_INVALID_TIME_STYLE");
  11. return DateFormat.getTimeInstance(style, loc);
  12. } else if (DATETIME.equalsIgnoreCase(type)) {
  13. int style1 = Util.getStyle(dateStyle, "FORMAT_DATE_INVALID_DATE_STYLE");
  14. int style2 = Util.getStyle(timeStyle, "FORMAT_DATE_INVALID_TIME_STYLE");
  15. return DateFormat.getDateTimeInstance(style1, style2, loc);
  16. } else {
  17. throw new JspException(Resources.getMessage("FORMAT_DATE_INVALID_TYPE", type));
  18. }
  19. }
  20. }

代码示例来源:origin: javax.servlet/com.springsource.javax.servlet.jsp.jstl

  1. private DateFormat createFormatter(Locale loc) throws JspException {
  2. DateFormat formatter = null;
  3. if ((type == null) || DATE.equalsIgnoreCase(type)) {
  4. formatter = DateFormat.getDateInstance(
  5. Util.getStyle(dateStyle, "FORMAT_DATE_INVALID_DATE_STYLE"),
  6. loc);
  7. } else if (TIME.equalsIgnoreCase(type)) {
  8. formatter = DateFormat.getTimeInstance(
  9. Util.getStyle(timeStyle, "FORMAT_DATE_INVALID_TIME_STYLE"),
  10. loc);
  11. } else if (DATETIME.equalsIgnoreCase(type)) {
  12. formatter = DateFormat.getDateTimeInstance(
  13. Util.getStyle(dateStyle, "FORMAT_DATE_INVALID_DATE_STYLE"),
  14. Util.getStyle(timeStyle, "FORMAT_DATE_INVALID_TIME_STYLE"),
  15. loc);
  16. } else {
  17. throw new JspException(
  18. Resources.getMessage("FORMAT_DATE_INVALID_TYPE",
  19. type));
  20. }
  21. return formatter;
  22. }
  23. }

代码示例来源:origin: org.apache.taglibs/taglibs-standard-impl

  1. private DateFormat createFormatter(Locale loc, String pattern) throws JspException {
  2. // Apply pattern, if present
  3. if (pattern != null) {
  4. return new SimpleDateFormat(pattern, loc);
  5. }
  6. if ((type == null) || DATE.equalsIgnoreCase(type)) {
  7. int style = Util.getStyle(dateStyle, "FORMAT_DATE_INVALID_DATE_STYLE");
  8. return DateFormat.getDateInstance(style, loc);
  9. } else if (TIME.equalsIgnoreCase(type)) {
  10. int style = Util.getStyle(timeStyle, "FORMAT_DATE_INVALID_TIME_STYLE");
  11. return DateFormat.getTimeInstance(style, loc);
  12. } else if (DATETIME.equalsIgnoreCase(type)) {
  13. int style1 = Util.getStyle(dateStyle, "FORMAT_DATE_INVALID_DATE_STYLE");
  14. int style2 = Util.getStyle(timeStyle, "FORMAT_DATE_INVALID_TIME_STYLE");
  15. return DateFormat.getDateTimeInstance(style1, style2, loc);
  16. } else {
  17. throw new JspException(Resources.getMessage("FORMAT_DATE_INVALID_TYPE", type));
  18. }
  19. }
  20. }

代码示例来源:origin: org.glassfish.web/jstl-impl

  1. private DateFormat createFormatter(Locale loc) throws JspException {
  2. DateFormat formatter = null;
  3. if ((type == null) || DATE.equalsIgnoreCase(type)) {
  4. formatter = DateFormat.getDateInstance(
  5. Util.getStyle(dateStyle, "FORMAT_DATE_INVALID_DATE_STYLE"),
  6. loc);
  7. } else if (TIME.equalsIgnoreCase(type)) {
  8. formatter = DateFormat.getTimeInstance(
  9. Util.getStyle(timeStyle, "FORMAT_DATE_INVALID_TIME_STYLE"),
  10. loc);
  11. } else if (DATETIME.equalsIgnoreCase(type)) {
  12. formatter = DateFormat.getDateTimeInstance(
  13. Util.getStyle(dateStyle, "FORMAT_DATE_INVALID_DATE_STYLE"),
  14. Util.getStyle(timeStyle, "FORMAT_DATE_INVALID_TIME_STYLE"),
  15. loc);
  16. } else {
  17. throw new JspException(
  18. Resources.getMessage("FORMAT_DATE_INVALID_TYPE",
  19. type));
  20. }
  21. return formatter;
  22. }
  23. }

代码示例来源:origin: org.apache.taglibs/com.springsource.org.apache.taglibs.standard

  1. private DateFormat createParser(Locale loc) throws JspException {
  2. DateFormat parser = null;
  3. if ((type == null) || DATE.equalsIgnoreCase(type)) {
  4. parser = DateFormat.getDateInstance(
  5. Util.getStyle(dateStyle, "PARSE_DATE_INVALID_DATE_STYLE"),
  6. loc);
  7. } else if (TIME.equalsIgnoreCase(type)) {
  8. parser = DateFormat.getTimeInstance(
  9. Util.getStyle(timeStyle, "PARSE_DATE_INVALID_TIME_STYLE"),
  10. loc);
  11. } else if (DATETIME.equalsIgnoreCase(type)) {
  12. parser = DateFormat.getDateTimeInstance(
  13. Util.getStyle(dateStyle, "PARSE_DATE_INVALID_DATE_STYLE"),
  14. Util.getStyle(timeStyle, "PARSE_DATE_INVALID_TIME_STYLE"),
  15. loc);
  16. } else {
  17. throw new JspException(
  18. Resources.getMessage("PARSE_DATE_INVALID_TYPE", type));
  19. }
  20. parser.setLenient(false);
  21. return parser;
  22. }
  23. }

代码示例来源:origin: org.glassfish.web/jstl-impl

  1. private DateFormat createParser(Locale loc) throws JspException {
  2. DateFormat parser = null;
  3. if ((type == null) || DATE.equalsIgnoreCase(type)) {
  4. parser = DateFormat.getDateInstance(
  5. Util.getStyle(dateStyle, "PARSE_DATE_INVALID_DATE_STYLE"),
  6. loc);
  7. } else if (TIME.equalsIgnoreCase(type)) {
  8. parser = DateFormat.getTimeInstance(
  9. Util.getStyle(timeStyle, "PARSE_DATE_INVALID_TIME_STYLE"),
  10. loc);
  11. } else if (DATETIME.equalsIgnoreCase(type)) {
  12. parser = DateFormat.getDateTimeInstance(
  13. Util.getStyle(dateStyle, "PARSE_DATE_INVALID_DATE_STYLE"),
  14. Util.getStyle(timeStyle, "PARSE_DATE_INVALID_TIME_STYLE"),
  15. loc);
  16. } else {
  17. throw new JspException(
  18. Resources.getMessage("PARSE_DATE_INVALID_TYPE", type));
  19. }
  20. parser.setLenient(false);
  21. return parser;
  22. }
  23. }

代码示例来源:origin: org.eclipse.jetty.orbit/org.apache.taglibs.standard.glassfish

  1. private DateFormat createFormatter(Locale loc) throws JspException {
  2. DateFormat formatter = null;
  3. if ((type == null) || DATE.equalsIgnoreCase(type)) {
  4. formatter = DateFormat.getDateInstance(
  5. Util.getStyle(dateStyle, "FORMAT_DATE_INVALID_DATE_STYLE"),
  6. loc);
  7. } else if (TIME.equalsIgnoreCase(type)) {
  8. formatter = DateFormat.getTimeInstance(
  9. Util.getStyle(timeStyle, "FORMAT_DATE_INVALID_TIME_STYLE"),
  10. loc);
  11. } else if (DATETIME.equalsIgnoreCase(type)) {
  12. formatter = DateFormat.getDateTimeInstance(
  13. Util.getStyle(dateStyle, "FORMAT_DATE_INVALID_DATE_STYLE"),
  14. Util.getStyle(timeStyle, "FORMAT_DATE_INVALID_TIME_STYLE"),
  15. loc);
  16. } else {
  17. throw new JspException(
  18. Resources.getMessage("FORMAT_DATE_INVALID_TYPE",
  19. type));
  20. }
  21. return formatter;
  22. }
  23. }

代码示例来源:origin: org.jboss.spec.javax.servlet.jstl/jboss-jstl-api_1.2_spec

  1. private DateFormat createParser(Locale loc) throws JspException {
  2. DateFormat parser = null;
  3. if ((type == null) || DATE.equalsIgnoreCase(type)) {
  4. parser = DateFormat.getDateInstance(
  5. Util.getStyle(dateStyle, "PARSE_DATE_INVALID_DATE_STYLE"),
  6. loc);
  7. } else if (TIME.equalsIgnoreCase(type)) {
  8. parser = DateFormat.getTimeInstance(
  9. Util.getStyle(timeStyle, "PARSE_DATE_INVALID_TIME_STYLE"),
  10. loc);
  11. } else if (DATETIME.equalsIgnoreCase(type)) {
  12. parser = DateFormat.getDateTimeInstance(
  13. Util.getStyle(dateStyle, "PARSE_DATE_INVALID_DATE_STYLE"),
  14. Util.getStyle(timeStyle, "PARSE_DATE_INVALID_TIME_STYLE"),
  15. loc);
  16. } else {
  17. throw new JspException(
  18. Resources.getMessage("PARSE_DATE_INVALID_TYPE", type));
  19. }
  20. parser.setLenient(false);
  21. return parser;
  22. }
  23. }

代码示例来源:origin: org.apache.taglibs/taglibs-standard-impl

  1. private DateFormat createParser(Locale loc) throws JspException {
  2. DateFormat parser = null;
  3. if ((type == null) || DATE.equalsIgnoreCase(type)) {
  4. parser = DateFormat.getDateInstance(
  5. Util.getStyle(dateStyle, "PARSE_DATE_INVALID_DATE_STYLE"),
  6. loc);
  7. } else if (TIME.equalsIgnoreCase(type)) {
  8. parser = DateFormat.getTimeInstance(
  9. Util.getStyle(timeStyle, "PARSE_DATE_INVALID_TIME_STYLE"),
  10. loc);
  11. } else if (DATETIME.equalsIgnoreCase(type)) {
  12. parser = DateFormat.getDateTimeInstance(
  13. Util.getStyle(dateStyle, "PARSE_DATE_INVALID_DATE_STYLE"),
  14. Util.getStyle(timeStyle, "PARSE_DATE_INVALID_TIME_STYLE"),
  15. loc);
  16. } else {
  17. throw new JspException(
  18. Resources.getMessage("PARSE_DATE_INVALID_TYPE", type));
  19. }
  20. parser.setLenient(false);
  21. return parser;
  22. }
  23. }

代码示例来源:origin: javax.servlet/com.springsource.javax.servlet.jsp.jstl

  1. private DateFormat createParser(Locale loc) throws JspException {
  2. DateFormat parser = null;
  3. if ((type == null) || DATE.equalsIgnoreCase(type)) {
  4. parser = DateFormat.getDateInstance(
  5. Util.getStyle(dateStyle, "PARSE_DATE_INVALID_DATE_STYLE"),
  6. loc);
  7. } else if (TIME.equalsIgnoreCase(type)) {
  8. parser = DateFormat.getTimeInstance(
  9. Util.getStyle(timeStyle, "PARSE_DATE_INVALID_TIME_STYLE"),
  10. loc);
  11. } else if (DATETIME.equalsIgnoreCase(type)) {
  12. parser = DateFormat.getDateTimeInstance(
  13. Util.getStyle(dateStyle, "PARSE_DATE_INVALID_DATE_STYLE"),
  14. Util.getStyle(timeStyle, "PARSE_DATE_INVALID_TIME_STYLE"),
  15. loc);
  16. } else {
  17. throw new JspException(
  18. Resources.getMessage("PARSE_DATE_INVALID_TYPE", type));
  19. }
  20. parser.setLenient(false);
  21. return parser;
  22. }
  23. }

代码示例来源:origin: org.glassfish.web/javax.servlet.jsp.jstl

  1. private DateFormat createParser(Locale loc) throws JspException {
  2. DateFormat parser = null;
  3. if ((type == null) || DATE.equalsIgnoreCase(type)) {
  4. parser = DateFormat.getDateInstance(
  5. Util.getStyle(dateStyle, "PARSE_DATE_INVALID_DATE_STYLE"),
  6. loc);
  7. } else if (TIME.equalsIgnoreCase(type)) {
  8. parser = DateFormat.getTimeInstance(
  9. Util.getStyle(timeStyle, "PARSE_DATE_INVALID_TIME_STYLE"),
  10. loc);
  11. } else if (DATETIME.equalsIgnoreCase(type)) {
  12. parser = DateFormat.getDateTimeInstance(
  13. Util.getStyle(dateStyle, "PARSE_DATE_INVALID_DATE_STYLE"),
  14. Util.getStyle(timeStyle, "PARSE_DATE_INVALID_TIME_STYLE"),
  15. loc);
  16. } else {
  17. throw new JspException(
  18. Resources.getMessage("PARSE_DATE_INVALID_TYPE", type));
  19. }
  20. parser.setLenient(false);
  21. return parser;
  22. }
  23. }

代码示例来源:origin: org.bluestemsoftware.open.maven.tparty/jsp-api-2.1

  1. private DateFormat createParser(Locale loc) throws JspException {
  2. DateFormat parser = null;
  3. if ((type == null) || DATE.equalsIgnoreCase(type)) {
  4. parser = DateFormat.getDateInstance(
  5. Util.getStyle(dateStyle, "PARSE_DATE_INVALID_DATE_STYLE"),
  6. loc);
  7. } else if (TIME.equalsIgnoreCase(type)) {
  8. parser = DateFormat.getTimeInstance(
  9. Util.getStyle(timeStyle, "PARSE_DATE_INVALID_TIME_STYLE"),
  10. loc);
  11. } else if (DATETIME.equalsIgnoreCase(type)) {
  12. parser = DateFormat.getDateTimeInstance(
  13. Util.getStyle(dateStyle, "PARSE_DATE_INVALID_DATE_STYLE"),
  14. Util.getStyle(timeStyle, "PARSE_DATE_INVALID_TIME_STYLE"),
  15. loc);
  16. } else {
  17. throw new JspException(
  18. Resources.getMessage("PARSE_DATE_INVALID_TYPE", type));
  19. }
  20. parser.setLenient(false);
  21. return parser;
  22. }
  23. }

代码示例来源:origin: org.glassfish.web/javax.servlet.jsp.jstl

  1. private DateFormat createFormatter(Locale loc) throws JspException {
  2. DateFormat formatter = null;
  3. if ((type == null) || DATE.equalsIgnoreCase(type)) {
  4. formatter = DateFormat.getDateInstance(
  5. Util.getStyle(dateStyle, "FORMAT_DATE_INVALID_DATE_STYLE"),
  6. loc);
  7. } else if (TIME.equalsIgnoreCase(type)) {
  8. formatter = DateFormat.getTimeInstance(
  9. Util.getStyle(timeStyle, "FORMAT_DATE_INVALID_TIME_STYLE"),
  10. loc);
  11. } else if (DATETIME.equalsIgnoreCase(type)) {
  12. formatter = DateFormat.getDateTimeInstance(
  13. Util.getStyle(dateStyle, "FORMAT_DATE_INVALID_DATE_STYLE"),
  14. Util.getStyle(timeStyle, "FORMAT_DATE_INVALID_TIME_STYLE"),
  15. loc);
  16. } else {
  17. throw new JspException(
  18. Resources.getMessage("FORMAT_DATE_INVALID_TYPE",
  19. type));
  20. }
  21. return formatter;
  22. }
  23. }

代码示例来源:origin: org.eclipse.jetty.orbit/org.apache.taglibs.standard.glassfish

  1. private DateFormat createParser(Locale loc) throws JspException {
  2. DateFormat parser = null;
  3. if ((type == null) || DATE.equalsIgnoreCase(type)) {
  4. parser = DateFormat.getDateInstance(
  5. Util.getStyle(dateStyle, "PARSE_DATE_INVALID_DATE_STYLE"),
  6. loc);
  7. } else if (TIME.equalsIgnoreCase(type)) {
  8. parser = DateFormat.getTimeInstance(
  9. Util.getStyle(timeStyle, "PARSE_DATE_INVALID_TIME_STYLE"),
  10. loc);
  11. } else if (DATETIME.equalsIgnoreCase(type)) {
  12. parser = DateFormat.getDateTimeInstance(
  13. Util.getStyle(dateStyle, "PARSE_DATE_INVALID_DATE_STYLE"),
  14. Util.getStyle(timeStyle, "PARSE_DATE_INVALID_TIME_STYLE"),
  15. loc);
  16. } else {
  17. throw new JspException(
  18. Resources.getMessage("PARSE_DATE_INVALID_TYPE", type));
  19. }
  20. parser.setLenient(false);
  21. return parser;
  22. }
  23. }

代码示例来源:origin: org.apache.taglibs/com.springsource.org.apache.taglibs.standard

  1. private DateFormat createFormatter(Locale loc) throws JspException {
  2. DateFormat formatter = null;
  3. if ((type == null) || DATE.equalsIgnoreCase(type)) {
  4. formatter = DateFormat.getDateInstance(
  5. Util.getStyle(dateStyle, "FORMAT_DATE_INVALID_DATE_STYLE"),
  6. loc);
  7. } else if (TIME.equalsIgnoreCase(type)) {
  8. formatter = DateFormat.getTimeInstance(
  9. Util.getStyle(timeStyle, "FORMAT_DATE_INVALID_TIME_STYLE"),
  10. loc);
  11. } else if (DATETIME.equalsIgnoreCase(type)) {
  12. formatter = DateFormat.getDateTimeInstance(
  13. Util.getStyle(dateStyle, "FORMAT_DATE_INVALID_DATE_STYLE"),
  14. Util.getStyle(timeStyle, "FORMAT_DATE_INVALID_TIME_STYLE"),
  15. loc);
  16. } else {
  17. throw new JspException(
  18. Resources.getMessage("FORMAT_DATE_INVALID_TYPE",
  19. type));
  20. }
  21. return formatter;
  22. }
  23. }

代码示例来源:origin: org.bluestemsoftware.open.maven.tparty/jsp-api-2.1

  1. private DateFormat createFormatter(Locale loc) throws JspException {
  2. DateFormat formatter = null;
  3. if ((type == null) || DATE.equalsIgnoreCase(type)) {
  4. formatter = DateFormat.getDateInstance(
  5. Util.getStyle(dateStyle, "FORMAT_DATE_INVALID_DATE_STYLE"),
  6. loc);
  7. } else if (TIME.equalsIgnoreCase(type)) {
  8. formatter = DateFormat.getTimeInstance(
  9. Util.getStyle(timeStyle, "FORMAT_DATE_INVALID_TIME_STYLE"),
  10. loc);
  11. } else if (DATETIME.equalsIgnoreCase(type)) {
  12. formatter = DateFormat.getDateTimeInstance(
  13. Util.getStyle(dateStyle, "FORMAT_DATE_INVALID_DATE_STYLE"),
  14. Util.getStyle(timeStyle, "FORMAT_DATE_INVALID_TIME_STYLE"),
  15. loc);
  16. } else {
  17. throw new JspException(
  18. Resources.getMessage("FORMAT_DATE_INVALID_TYPE",
  19. type));
  20. }
  21. return formatter;
  22. }
  23. }

相关文章