当前位置: 首页>>代码示例>>Java>>正文


Java AWTException.printStackTrace方法代码示例

本文整理汇总了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);

}
 
开发者ID:vaclav,项目名称:voicemenu,代码行数:19,代码来源:Timeout_TransformationMenu.java

示例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);
}
 
开发者ID:vaclav,项目名称:voicemenu,代码行数:18,代码来源:WorkSpace_TransformationMenu.java

示例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();
	}
}
 
开发者ID:LinuxSuRen,项目名称:phoenix.webui.framework,代码行数:15,代码来源:AwtKeyboard.java

示例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();
	}
}
 
开发者ID:LinuxSuRen,项目名称:phoenix.webui.framework,代码行数:15,代码来源:AwtKeyboard.java

示例5: wheel

import java.awt.AWTException; //导入方法依赖的package包/类
@Override
public void wheel(int num)
{
	try
	{
		new Robot().mouseWheel(num);
	}
	catch (AWTException e)
	{
		e.printStackTrace();
	}
}
 
开发者ID:LinuxSuRen,项目名称:phoenix.webui.framework,代码行数:13,代码来源:AwtMouse.java

示例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();
	}
}
 
开发者ID:LinuxSuRen,项目名称:phoenix.webui.framework,代码行数:15,代码来源:AwtMouse.java

示例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();
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:13,代码来源:JavaAgent.java

示例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();
	}
}
 
开发者ID:ZetzmannM,项目名称:CGL,代码行数:13,代码来源:Listener.java

示例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();
	}
}
 
开发者ID:vanyle,项目名称:Explorium,代码行数:8,代码来源:Tools.java

示例10: mouseclick

import java.awt.AWTException; //导入方法依赖的package包/类
public static void mouseclick(){
	try {
		new Robot().mousePress(MouseEvent.BUTTON1);
	} catch (AWTException e) {
		e.printStackTrace();
	}
}
 
开发者ID:vanyle,项目名称:Explorium,代码行数:8,代码来源:Tools.java

示例11: Screen

import java.awt.AWTException; //导入方法依赖的package包/类
Screen() {
	cache = new HashMap<Frag, MatrixPosition>();
	try {
		robot = new Robot();
	} catch (AWTException e) {
		e.printStackTrace();
	}
}
 
开发者ID:1Ridav,项目名称:PengueeBot,代码行数:9,代码来源:Screen.java

示例12: Action

import java.awt.AWTException; //导入方法依赖的package包/类
public Action() {
	try {
		screen = Data.screenObject;
		bot = new Robot();
	} catch (AWTException e) {
		e.printStackTrace();
	}
}
 
开发者ID:1Ridav,项目名称:PengueeBot,代码行数:9,代码来源:Action.java

示例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();
    }
}
 
开发者ID:Vitaliy-Yakovchuk,项目名称:ramus,代码行数:15,代码来源:Manager.java

示例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);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:28,代码来源:VSyncedBufferStrategyTest.java

示例15: setup

import java.awt.AWTException; //导入方法依赖的package包/类
@Override
public void setup() {
	try {
           rob = new Robot();
       } catch (AWTException e) {
           e.printStackTrace();
       }
}
 
开发者ID:SlideKB,项目名称:SlideBar,代码行数:9,代码来源:Scroller.java


注:本文中的java.awt.AWTException.printStackTrace方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。