hudson.Functions.getScreenResolution()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(129)

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

Functions.getScreenResolution介绍

[英]If we know the user's screen resolution, return it. Otherwise null.
[中]如果我们知道用户的屏幕分辨率,请返回它。否则为空。

代码示例

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

/**
 * Determines the default size of the trend graph.
 *
 * This is default because the query parameter can choose arbitrary size.
 * If the screen resolution is too low, use a smaller size.
 */
private Area calcDefaultSize() {
  Area res = Functions.getScreenResolution();
  if(res!=null && res.width<=800)
    return new Area(250,100);
  else
    return new Area(500,200);
}

代码示例来源:origin: awslabs/aws-device-farm-jenkins-plugin

/**
   * Get the size of the graph on the screen.
   *
   * @return The area of the graph.
   */
  private static Area getGraphSize() {
    Area resolution = Functions.getScreenResolution();
    if (resolution == null || resolution.width <= 800) { //too small or unknown
      return new Area(250, 100);
    }
    return new Area(500, 200);
  }
}

代码示例来源:origin: jenkinsci/log-parser-plugin

private Area calcDefaultSize() {
  Area res = Functions.getScreenResolution();
  if (res != null && res.width <= 800)
    return new Area(250, 100);
  else
    return new Area(500, 200);
}

代码示例来源:origin: hudson/hudson-2.x

/**
 * Determines the default size of the trend graph.
 *
 * This is default because the query parameter can choose arbitrary size.
 * If the screen resolution is too low, use a smaller size.
 */
private Area calcDefaultSize() {
  Area res = Functions.getScreenResolution();
  if(res!=null && res.width<=800)
    return new Area(250,100);
  else
    return new Area(500,200);
}

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

/**
 * Determines the default size of the trend graph.
 *
 * This is default because the query parameter can choose arbitrary size.
 * If the screen resolution is too low, use a smaller size.
 */
private Area calcDefaultSize() {
  Area res = Functions.getScreenResolution();
  if(res!=null && res.width<=800)
    return new Area(250,100);
  else
    return new Area(500,200);
}

代码示例来源:origin: jenkinsci/junit-plugin

/**
 * Determines the default size of the trend graph.
 *
 * This is default because the query parameter can choose arbitrary size.
 * If the screen resolution is too low, use a smaller size.
 */
private Area calcDefaultSize() {
  Area res = Functions.getScreenResolution();
  if(res!=null && res.width<=800)
    return new Area(250,100);
  else
    return new Area(500,200);
}

代码示例来源:origin: org.eclipse.hudson/hudson-core

/**
 * Determines the default size of the trend graph.
 *
 * This is default because the query parameter can choose arbitrary size. If
 * the screen resolution is too low, use a smaller size.
 */
private Area calcDefaultSize() {
  Area res = Functions.getScreenResolution();
  if (res != null && res.width <= 800) {
    return new Area(250, 100);
  } else {
    return new Area(500, 200);
  }
}

相关文章

微信公众号

最新文章

更多