本文整理汇总了Java中java.awt.GraphicsDevice.getConfigurations方法的典型用法代码示例。如果您正苦于以下问题:Java GraphicsDevice.getConfigurations方法的具体用法?Java GraphicsDevice.getConfigurations怎么用?Java GraphicsDevice.getConfigurations使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.awt.GraphicsDevice
的用法示例。
在下文中一共展示了GraphicsDevice.getConfigurations方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ScreenModel
import java.awt.GraphicsDevice; //导入方法依赖的package包/类
public ScreenModel(GraphicsDevice device, String name, int number) {
this.name = number + " " + name;
this.idString = device.getIDstring();
this.width = device.getDisplayMode().getWidth();
this.height = device.getDisplayMode().getHeight();
GraphicsConfiguration[] gc = device.getConfigurations();
for (GraphicsConfiguration curGc : gc) {
Rectangle bounds = curGc.getBounds();
this.topLeftCorner = new Point((int) bounds.getX(), (int) bounds.getY());
}
}
示例2: main
import java.awt.GraphicsDevice; //导入方法依赖的package包/类
public static void main(String[] args) {
GraphicsEnvironment ge = GraphicsEnvironment.
getLocalGraphicsEnvironment();
if (ge.isHeadlessInstance()) {
return;
}
for (GraphicsDevice gd : ge.getScreenDevices()) {
for (GraphicsConfiguration gc : gd.getConfigurations()) {
testScaleFactor(gc);
}
}
}
示例3: GameWorld
import java.awt.GraphicsDevice; //导入方法依赖的package包/类
public GameWorld()
{
classesWithStaticStuff.add(this.getClass());
Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice[] gs = ge.getScreenDevices();
GraphicsDevice gd = gs[0];
graphicsConfiguration = gd.getConfigurations()[0];
initArts();
//System.out.println("graphicsConfiguration " + graphicsConfiguration);
overlays = new OverlayManager();
adjustFPS();
GlobalOptions.registerGameWorld(this);
}