当前位置: 首页 > news >正文

如何用手机网站做淘宝客app开发定制公司有哪些

如何用手机网站做淘宝客,app开发定制公司有哪些,南宁青秀万达网站建设,为一个网站设计一个推广方案nb-首先要注意的是,这是使用Java 7完成的,在Java 6中创建透明窗口的方式不同,在更新10之下是不可能的(我相信)基本上,这会创建一个透明窗口,其大小和位置可以覆盖整个虚拟屏幕(也就是说,如果您有多个屏幕,它将覆盖所有虚拟屏幕).然后我使用JPanel作为主要容器来捕获鼠标事件并执…nb-首先要注意的是,这是使用Java 7完成的,在Java 6中创建透明窗口的方式不同,在更新10之下是不可能的(我相信)基本上,这会创建一个透明窗口,其大小和位置可以覆盖整个虚拟屏幕(也就是说,如果您有多个屏幕,它将覆盖所有虚拟屏幕).然后我使用JPanel作为主要容器来捕获鼠标事件并执行绘制效果.面板是透明的.这允许面板(和框架)下方的任何东西保持可见.然后我用透明的颜色画了这个(我这样做只是为了强调事实).单击并拖动某个区域时,它将被暴露.import java.awt.BorderLayout;import java.awt.Color;import java.awt.EventQueue;import java.awt.Graphics;import java.awt.Graphics2D;import java.awt.GraphicsDevice;import java.awt.GraphicsEnvironment;import java.awt.Point;import java.awt.Rectangle;import java.awt.event.MouseAdapter;import java.awt.event.MouseEvent;import java.awt.geom.Area;import javax.swing.JFrame;import javax.swing.JPanel;import javax.swing.SwingUtilities;import javax.swing.UIManager;import javax.swing.UnsupportedLookAndFeelException;public class MySnipTool {public static void main(String[] args) {new MySnipTool();}public MySnipTool() {EventQueue.invokeLater(new Runnable() {Overridepublic void run() {try {UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {}JFrame frame new JFrame(Testing);frame.setUndecorated(true);frame.setBackground(new Color(0, 0, 0, 0));frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);frame.setLayout(new BorderLayout());frame.add(new CapturePane());Rectangle bounds getVirtualBounds();frame.setLocation(bounds.getLocation());frame.setSize(bounds.getSize());frame.setAlwaysOnTop(true);frame.setVisible(true);}});}public class CapturePane extends JPanel {private Rectangle selectionBounds;private Point clickPoint;public CapturePane() {setOpaque(false);MouseAdapter mouseHandler new MouseAdapter() {Overridepublic void mouseClicked(MouseEvent e) {if (SwingUtilities.isLeftMouseButton(e) e.getClickCount() 2) {System.exit(0);}}Overridepublic void mousePressed(MouseEvent e) {clickPoint e.getPoint();selectionBounds null;}Overridepublic void mouseReleased(MouseEvent e) {clickPoint null;}Overridepublic void mouseDragged(MouseEvent e) {Point dragPoint e.getPoint();int x Math.min(clickPoint.x, dragPoint.x);int y Math.min(clickPoint.y, dragPoint.y);int width Math.max(clickPoint.x - dragPoint.x, dragPoint.x - clickPoint.x);int height Math.max(clickPoint.y - dragPoint.y, dragPoint.y - clickPoint.y);selectionBounds new Rectangle(x, y, width, height);repaint();}};addMouseListener(mouseHandler);addMouseMotionListener(mouseHandler);}Overrideprotected void paintComponent(Graphics g) {super.paintComponent(g);Graphics2D g2d (Graphics2D) g.create();g2d.setColor(new Color(255, 255, 255, 128));Area fill new Area(new Rectangle(new Point(0, 0), getSize()));if (selectionBounds ! null) {fill.subtract(new Area(selectionBounds));}g2d.fill(fill);if (selectionBounds ! null) {g2d.setColor(Color.BLACK);g2d.draw(selectionBounds);}g2d.dispose();}}public static Rectangle getVirtualBounds() {Rectangle bounds new Rectangle(0, 0, 0, 0);GraphicsEnvironment ge GraphicsEnvironment.getLocalGraphicsEnvironment();GraphicsDevice lstGDs[] ge.getScreenDevices();for (GraphicsDevice gd : lstGDs) {bounds.add(gd.getDefaultConfiguration().getBounds());}return bounds;}}同样,您可以创建一个用户可以调整大小的透明框架.您将负责自己实施所有调整大小的代码,但解决方案仍然是可行的.更新您可能还需要检查操作系统/硬件是否可以支持透明度…GraphicsConfiguration config GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration();if (!AWTUtilities.isTranslucencyCapable(config)) {System.out.println(Transluceny is not supported);}if (!AWTUtilities.isTranslucencySupported(AWTUtilities.Translucency.PERPIXEL_TRANSPARENT)) {System.out.println(PerPeixel Transparency is not supported);}更新了替代方法这是解决问题的另一种方法.基本上它需要快速拍摄屏幕并将其渲染到窗口.这样我们就可以根据需要控制突出显示/选择.这样做的缺点是它是一个静态结果,你不会得到任何当前正在运行的动画效果.import java.awt.AWTException;import java.awt.BorderLayout;import java.awt.Color;import java.awt.Dimension;import java.awt.EventQueue;import java.awt.Graphics;import java.awt.Graphics2D;import java.awt.GraphicsDevice;import java.awt.GraphicsEnvironment;import java.awt.HeadlessException;import java.awt.Point;import java.awt.Rectangle;import java.awt.Robot;import java.awt.event.MouseAdapter;import java.awt.event.MouseEvent;import java.awt.image.BufferedImage;import javax.swing.JFrame;import javax.swing.JPanel;import javax.swing.UIManager;import javax.swing.UnsupportedLookAndFeelException;public class SnipWithScreenShoot {public static void main(String[] args) {new SnipWithScreenShoot();}public SnipWithScreenShoot() {EventQueue.invokeLater(new Runnable() {Overridepublic void run() {try {UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());} catch (ClassNotFoundException ex) {} catch (InstantiationException ex) {} catch (IllegalAccessException ex) {} catch (UnsupportedLookAndFeelException ex) {}try {JFrame frame new JFrame(Test);frame.setUndecorated(true);frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);frame.setLayout(new BorderLayout());frame.add(new TestPane());frame.pack();frame.setLocationRelativeTo(null);frame.setVisible(true);} catch (AWTException exp) {exp.printStackTrace();System.out.println(That sucks);}}});}public class TestPane extends JPanel {private BufferedImage image;private Rectangle selection;public TestPane() throws AWTException {Robot bot new Robot();image bot.createScreenCapture(getVirtualBounds());MouseAdapter handler new MouseAdapter() {Overridepublic void mousePressed(MouseEvent e) {selection new Rectangle(e.getPoint());repaint();}Overridepublic void mouseDragged(MouseEvent e) {Point p e.getPoint();int width Math.max(selection.x - e.getX(), e.getX() - selection.x);int height Math.max(selection.y - e.getY(), e.getY() - selection.y);selection.setSize(width, height);repaint();}};addMouseListener(handler);addMouseMotionListener(handler);}Overridepublic Dimension getPreferredSize() {return image null ? super.getPreferredSize() : new Dimension(image.getWidth(), image.getHeight());}Overrideprotected void paintComponent(Graphics g) {super.paintComponent(g);if (image ! null) {Graphics2D g2d (Graphics2D) g.create();g2d.drawImage(image, WIDTH, 0, this);if (selection ! null) {g2d.setColor(new Color(225, 225, 255, 128));g2d.fill(selection);g2d.setColor(Color.GRAY);g2d.draw(selection);}g2d.dispose();}}}public static Rectangle getVirtualBounds() {Rectangle bounds new Rectangle(0, 0, 0, 0);GraphicsEnvironment ge GraphicsEnvironment.getLocalGraphicsEnvironment();GraphicsDevice lstGDs[] ge.getScreenDevices();for (GraphicsDevice gd : lstGDs) {bounds.add(gd.getDefaultConfiguration().getBounds());}return bounds;}}
http://wiki.neutronadmin.com/news/167374/

相关文章:

  • 中山做网站的公司外贸网站产品
  • 阳山网站seo建设银行河南省分行招聘网站
  • 怎么看别人网站怎么做的优化企业网站建设和实现 论文
  • dede 手机网站插件游戏排行榜2023
  • 宁波市住房与城乡建设部网站登陆网站空间
  • 手机网站建设怎么设计个人网站软件
  • asp古典网站源码百度知道提问首页
  • 南京企业网站建设质量好网站建设费用
  • 互联网服务网站建设目的dw网页制作教程自我介绍代码
  • 上海企业免费网站建设flash网站
  • 医疗网站织梦网站推广初期目标
  • 品牌网站建设毛尖企业网站建设方案书前言
  • 秦皇岛网站制作哪家好网络解决方案
  • 东莞网站建设多长时间南京建设网站哪家好
  • 青岛经纬建设工程有限公司网站电子商务营销活动
  • 搞计算机网站建设会亏钱吗北京网站软件制作
  • 做拍卖网站有哪些织梦网站面包屑导航怎么做
  • 小型企业网站开发价格百度网站优化哪家好
  • 网站策划过程网站模版好建设吗
  • 有网站代码怎么建设没有域名可以建网站吗
  • 移动的网络网站建设电子商城平台
  • 做公司网站需要多网页编辑用户信息原理
  • 电商网站设计公司力推亿企邦大型网站建设技巧
  • 溧阳企业网站建设价格新网站怎样做推广
  • 网站门户全网微商软件激活码货源
  • 雄县有做网站的吗网站怎么做谷歌推广
  • 备案网站查询网址晋江文创园网站建设
  • 在哪个网站做视频赚钱的小程序商城哪家好推荐
  • 在线做venn图网站建设学校网站需要具备
  • 怎么看是哪家做的网站网站开发非常之旅