本文整理了Java中hudson.Functions.getScreenResolution()
方法的一些代码示例,展示了Functions.getScreenResolution()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Functions.getScreenResolution()
方法的具体详情如下:
包路径:hudson.Functions
类名称: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);
}
}
内容来源于网络,如有侵权,请联系作者删除!