本文整理汇总了Java中java.awt.AWTException.printStackTrace方法的典型用法代码示例。如果您正苦于以下问题:Java AWTException.printStackTrace方法的具体用法?Java AWTException.printStackTrace怎么用?Java AWTException.printStackTrace使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.awt.AWTException
的用法示例。
在下文中一共展示了AWTException.printStackTrace方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: execute
import java.awt.AWTException; //导入方法依赖的package包/类
@Override
public void execute(@NotNull String pattern) {
try {
Robot r = new Robot();
r.keyPress(157);
r.keyPress(90);
r.keyRelease(90);
r.keyRelease(157);
} catch (AWTException e) {
e.printStackTrace();
}
SelectionUtil.selectNode(_context.getEditorContext(), _context.getNode());
SelectionUtil.selectCell(_context.getEditorContext(), _context.getNode(), SelectionManager.FIRST_ERROR_CELL + "|" + SelectionManager.FOCUS_POLICY_CELL + "|" + SelectionManager.FIRST_EDITABLE_CELL + "|" + SelectionManager.FIRST_CELL);
}
示例2: execute
import java.awt.AWTException; //导入方法依赖的package包/类
@Override
public void execute(@NotNull String pattern) {
try {
Robot r = new Robot();
r.keyPress(157);
r.keyPress(90);
r.keyRelease(90);
r.keyRelease(157);
} catch (AWTException e) {
e.printStackTrace();
}
SelectionUtil.selectNode(_context.getEditorContext(), _context.getNode());
SelectionUtil.selectCell(_context.getEditorContext(), _context.getNode(), SelectionManager.FIRST_ERROR_CELL + "|" + SelectionManager.FOCUS_POLICY_CELL + "|" + SelectionManager.FIRST_EDITABLE_CELL + "|" + SelectionManager.FIRST_CELL);
}
示例3: enter
import java.awt.AWTException; //导入方法依赖的package包/类
@Override
public void enter()
{
try
{
Robot robot = new Robot();
robot.keyPress(KeyEvent.VK_ENTER);
robot.keyRelease(KeyEvent.VK_ENTER);
}
catch (AWTException e)
{
e.printStackTrace();
}
}
示例4: space
import java.awt.AWTException; //导入方法依赖的package包/类
@Override
public void space()
{
try
{
Robot robot = new Robot();
robot.keyPress(KeyEvent.VK_SPACE);
robot.keyRelease(KeyEvent.VK_SPACE);
}
catch (AWTException e)
{
e.printStackTrace();
}
}
示例5: wheel
import java.awt.AWTException; //导入方法依赖的package包/类
@Override
public void wheel(int num)
{
try
{
new Robot().mouseWheel(num);
}
catch (AWTException e)
{
e.printStackTrace();
}
}
示例6: click
import java.awt.AWTException; //导入方法依赖的package包/类
@Override
public void click()
{
try
{
Robot robot = new Robot();
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
}
catch (AWTException e)
{
e.printStackTrace();
}
}
示例7: getScreenShot
import java.awt.AWTException; //导入方法依赖的package包/类
@Override public byte[] getScreenShot() throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try {
BufferedImage bufferedImage;
Dimension windowSize = Toolkit.getDefaultToolkit().getScreenSize();
bufferedImage = new Robot().createScreenCapture(new Rectangle(0, 0, windowSize.width, windowSize.height));
ImageIO.write(bufferedImage, "png", baos);
} catch (AWTException e) {
e.printStackTrace();
}
return baos.toByteArray();
}
示例8: init
import java.awt.AWTException; //导入方法依赖的package包/类
public static void init(Window frame2, Canvas cnv) {
Listener.canvas = cnv;
Listener.framec = frame2;
setup(cnv);
setup(frame2);
try {
robot = new Robot();
} catch (AWTException e) {
e.printStackTrace();
}
}
示例9: movemouse
import java.awt.AWTException; //导入方法依赖的package包/类
public static void movemouse(int x,int y){
try {
new Robot().mouseMove(x, y);
} catch (AWTException e) {
e.printStackTrace();
}
}
示例10: mouseclick
import java.awt.AWTException; //导入方法依赖的package包/类
public static void mouseclick(){
try {
new Robot().mousePress(MouseEvent.BUTTON1);
} catch (AWTException e) {
e.printStackTrace();
}
}
示例11: Screen
import java.awt.AWTException; //导入方法依赖的package包/类
Screen() {
cache = new HashMap<Frag, MatrixPosition>();
try {
robot = new Robot();
} catch (AWTException e) {
e.printStackTrace();
}
}
示例12: Action
import java.awt.AWTException; //导入方法依赖的package包/类
public Action() {
try {
screen = Data.screenObject;
bot = new Robot();
} catch (AWTException e) {
e.printStackTrace();
}
}
示例13: start
import java.awt.AWTException; //导入方法依赖的package包/类
private void start(String[] args) {
SystemTray tray = SystemTray.getSystemTray();
TrayIcon icon = new TrayIcon(Toolkit.getDefaultToolkit().createImage(
getClass().getResource(
"/com/ramussoft/gui/server/application.png")),
getString("Server") + " " + Metadata.getApplicationName(),
createPopupMenu());
icon.setImageAutoSize(true);
try {
tray.add(icon);
} catch (AWTException e) {
e.printStackTrace();
}
}
示例14: createBS
import java.awt.AWTException; //导入方法依赖的package包/类
private void createBS(boolean requestVSync) {
if (bs != null && requestVSync == currentBSVSynced) {
return;
}
BufferCapabilities bc = defaultBC;
if (requestVSync) {
bc = new sun.java2d.pipe.hw.ExtendedBufferCapabilities(
new ImageCapabilities(true),
new ImageCapabilities(true),
FlipContents.COPIED,
sun.java2d.pipe.hw.ExtendedBufferCapabilities.VSyncType.VSYNC_ON);
}
try {
createBufferStrategy(2, bc);
} catch (AWTException e) {
System.err.println("Warning: cap is not supported: "+bc);
e.printStackTrace();
createBufferStrategy(2);
}
currentBSVSynced = requestVSync;
bs = getBufferStrategy();
String s =
getParent() instanceof Frame ?
((Frame)getParent()).getTitle() : "parent";
System.out.println("Created BS for \"" + s + "\" frame, bs="+bs);
}
示例15: setup
import java.awt.AWTException; //导入方法依赖的package包/类
@Override
public void setup() {
try {
rob = new Robot();
} catch (AWTException e) {
e.printStackTrace();
}
}