Need Mouse Coordinates While Zooming
I want to annotate the current coordinates of the mouse pointer while the user is rubberbanding to do a zoom. MouseMove would work if I could figure out how to convert the OLE_XPOS_PIXELS coordinates to the Axes coordinates.
Why doesn't mousemove give Axes coordinates? What is the conversion to Axes coordinates?
As you can see, the graph does not support this particular request. In this case, when you are zooming, there is no way you can calculate the coordinates in relation to the axes. You have seen we simply get the pixel points. With this method, you could use the MouseMove command to calibrate your pixels, or in other words, see how many pixels high and long the actual graph window is, and then do scaling calculations in accordance with the min and max values of the x and y axes. This however will not be all that precise, as it is limited by the size of a pixel, and the scaling settings of the graph.
A better way is to change the graph track mode to cwGTrackAllEvents from the zoom mode you were in. cwGTrackAllEvents mode allows you to use the PlotAreaMouseDown and Pl
otAreaMouseUp. These two report back the XPos and YPos in terms of the axes coordinates. Then you can output these to display for the user. At the MouseDown event, you can set the Xmin and Ymax values, and at the MouseUp, set the Xmax and YMin values. This of course means you always do the zooming from upper left to lower right. The only drawback to this method is that you never view the "rubber band", as this is a zoom feature, and is immediately lost in the cwGTrackAllEvents. Hope this solves it for you.
Similar Messages
-
Hi Friends,
I face some mouse issues with the later versions of the Firefox (6 and above). When a flex application is executed in a Firefox, It runs on the flash player in the browser. While getting the mouse coordinates, flash player is returning some bad coordinates. Please respond to this as soon as possibleA good place to ask advice about web development is at the mozillaZine Web Development/Standards Evangelism forum.<br />
The helpers at that forum are more knowledgeable about web development issues.<br />
You need to register at the mozillaZine forum site in order to post at that forum.<br />
See http://forums.mozillazine.org/viewforum.php?f=25 -
Can FF win return mouse coordinates while over a .swf object
Hi there,
I have a flash object embedded in a page and need to get
coordinates returned from javascript to the flash object. I can get
this to happen in IE, Safari, and FF Mac even Camino. FF windows
will not return coordinates when the mouse is over the flash
object. Is there a way to do this? I'd really appreciate any info.
Thanks.
Is this a firefox issue or the way the flash player is
implemented into firefox windows?
Here is a link for clarity:
http://client.karo.com/bcdev/
Thanks,
Beausorry for not using the code tags..just learn about it...thanx
my problem is.when i want to record every coordinates of the mouse while it moves..but using the printstream,it only records the end point of the mouse and not while the mouse moves/dragged.I'm developing a sketch pad program. the program needs to capture the coordinates and saved it into a file.i tried using it but keeps on saving the last point but not all
example
point A..........................point N............................point Z
i want the program to save the coordinate of point A,point B,C,D...point N....and last point Z
but it keeps on saving only point Z.can u help or give any ideas..thanx -
Mouse Coordinate issues caused by Scaling Components in a JScrollPane
Hi All,
I've been attempting to write a program that includes a simple modeler. However, I've been having some trouble with being able to select components when attempting to implement zoom functionality - when I "zoom" (which is done via scroll wheel) using the scale Graphics2D method, while it zooms correctly, the mouse location of components do not seem scale.
I've tried one of the solutions found on the forums here (create a custom event queue that adjusts the mouse coordinates) and while it seemed to work initially, if I zoom in and adjust the current view position using the scrollbars, certain components contained in the JPane will become un-selectable and I haven't been able to work out why.
I've attached a SSCCE that reproduces the problem below - it implements a JScrollPane with a JPane with a few selectable shapes set as the Viewport. The zoom is done using the mouse scroll wheel (with wheel up being zoom in and wheel down being zoom out)
Any help in order to fix the selection/de-selection issues on zoom would be greatly appreciated! I've spent some time reading through the forums here but have unfortunately not been able to find a workable solution around it.
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
import javax.swing.*;
public class Tester extends JScrollPane
public Tester() {
this.setViewportView(new Model());
public static void main (String[] args) {
JFrame main = new JFrame();
main.add(new Tester());
main.setSize(500,300);
main.setResizable(false);
main.setVisible(true);
class Model extends JPanel implements MouseListener, MouseWheelListener
private GfxClass selection = null;
private static double zoomLevel = 1;
// zoom methods
public void setZoom(double zoom) {
if( zoom < 0 && zoomLevel > 1.0)
zoomLevel += zoom;
if( zoom > 0 && zoomLevel < 5.0)
zoomLevel += zoom;
public static double getZoom() { return zoomLevel; }
public void resetZoom() { zoomLevel = 1; }
public Model() {
super(null);
addMouseListener(this);
addMouseWheelListener(this);
MyEventQueue meq = new MyEventQueue();
Toolkit.getDefaultToolkit().getSystemEventQueue().push(meq);
for(int i = 0; i <7; i++) {
double angle = Math.toRadians(i * 360 / 7);
GfxClass oc_tmp = new GfxClass((int)(200 + 150 * Math.cos(angle)), (int)(125 + 100 * Math.sin(angle)), "Element"+i);
add(oc_tmp);
repaint();
public void paint (Graphics g) {
Graphics2D g2 = (Graphics2D) g.create();
AffineTransform oldTr=g2.getTransform();
g2.scale(getZoom(),getZoom());
super.paint(g2);
g2.setTransform(oldTr);
setBackground (Color.white);
super.paintBorder(g2);
private static class MyEventQueue extends EventQueue {
protected void dispatchEvent(AWTEvent event) {
AWTEvent event2=event;
if ( !(event instanceof MouseWheelEvent) && (event instanceof MouseEvent) ) {
if ( event.getSource() instanceof Component && event instanceof MouseEvent) {
MouseEvent me=(MouseEvent)event2;
Component c=(Component)event.getSource();
Component cursorComponent=SwingUtilities.getDeepestComponentAt(c, me.getX(), me.getY());
JPanel zContainer= getZoomedPanel(cursorComponent);
if (zContainer!=null) {
int x=me.getX();
Point p=SwingUtilities.convertPoint(zContainer,0,0,(Component)event.getSource());
int cX=me.getX()-p.x;
x=x-cX+(int)(cX/getZoom());
int y=me.getY();
int cY=me.getY()-p.y;
y=y-cY+(int)(cY/getZoom());
MouseEvent ze = new MouseEvent(me.getComponent(), me.getID(), me.getWhen(), me.getModifiers(), x, y, me.getClickCount(), me.isPopupTrigger());
event2=ze;
super.dispatchEvent(event2);
public static JPanel getZoomedPanel(Component c) {
if (c == null)
return null;
else if (c instanceof Model)
return (Model)c;
else
return getZoomedPanel(c.getParent());
private void deselectAll() {
if(selection != null)
selection.setSelected(false);
selection = null;
public void mouseClicked(MouseEvent arg0) { }
public void mouseEntered(MouseEvent arg0) { }
public void mouseExited(MouseEvent arg0) { }
public void mouseReleased(MouseEvent arg0) { }
public void mousePressed(MouseEvent me) {
Component c1 = findComponentAt(me.getX(),me.getY());
if(c1 instanceof GfxClass)
if(selection != null)
selection.setSelected(false);
selection = (GfxClass)c1;
selection.setSelected(true);
else
deselectAll();
repaint();
return;
public void mouseWheelMoved(MouseWheelEvent e) { // controls zoom
int notches = e.getWheelRotation();
if (notches < 0)
setZoom(0.1);
else
setZoom(-0.1);
this.setSize(new Dimension((int)(500*getZoom()),(int)(300*getZoom())));
this.setPreferredSize(new Dimension((int)(500*getZoom()),(int)(300*getZoom())));
repaint();
class GfxClass extends Component { // simple graphical component
private boolean isSelected = false;
private String name;
public GfxClass(int xPos, int yPos, String name) {
this.name = name;
this.setLocation(xPos,yPos);
this.setSize(100,35);
public void setSelected(boolean b) {
if( b == isSelected )
return;
isSelected = b;
repaint();
public boolean isSelected() {
return isSelected;
public void paint(Graphics g2) {
Graphics2D g = (Graphics2D)g2;
if( isSelected )
g.setColor(Color.RED);
else
g.setColor(Color.BLUE);
g.fill(new Ellipse2D.Double(0,0,100,35));
g.setColor(Color.BLACK);
g.drawString(name, getSize().width/2 - 25, getSize().height/2);
}Edited by: Kys99 on Feb 22, 2010 9:09 AM
Edited by: Kys99 on Feb 22, 2010 9:10 AMDelete your EventQueue class. Change one line of code in your mouse pressed method.
public void mousePressed(MouseEvent me) {
Component c1 = findComponentAt((int) (me.getX()/getZoom()),
(int) (me.getY()/getZoom()));
} -
Get mouse coordinates when its moved over a powerpoint slideshow -URGENT
i am writing a code to get the mouse coordinates as its moved over the screen(especially over powerpoint slide show. plz help me if u know a simple code that perform this function without a plug-in, but if i have to use a plug-in advice me.
tahnk u very much :)sorry for not using the code tags..just learn about it...thanx
my problem is.when i want to record every coordinates of the mouse while it moves..but using the printstream,it only records the end point of the mouse and not while the mouse moves/dragged.I'm developing a sketch pad program. the program needs to capture the coordinates and saved it into a file.i tried using it but keeps on saving the last point but not all
example
point A..........................point N............................point Z
i want the program to save the coordinate of point A,point B,C,D...point N....and last point Z
but it keeps on saving only point Z.can u help or give any ideas..thanx -
Need help: BufferedImage and zooming
please help me understand what i am doing wrong. i am having a hard time understanding the concept behind BufferedImage and zooming. the applet code loads an image as its background. after loading, you can draw line segments on it. but when i try to zoom in, the image in the background remains the same in terms of size, line segments are the only ones that are being zoomed, and the mouse coordinates are confusing.
import java.awt.*;
import java.awt.event.*;
import java.awt.image.BufferedImage;
import java.awt.geom.*;
import javax.swing.*;
import javax.imageio.*;
import java.io.*;
import java.util.ArrayList;
import java.io.IOException;
import java.net.URL;
import java.awt.image.*;
public class Testing extends JApplet {
private String url;
private Map map;
public void init() {
public void start()
url = "http://localhost/image.gif";
map = new Map(url);
getContentPane().add(map, "Center");
validate();
map.validate();
class Map extends JPanel implements MouseListener, MouseMotionListener{
private Image image;
private ArrayList<Point2D> points;
private ArrayList<Line2D> lineSegment;
private Point2D startingPoint;
private int mouseX;
private int mouseY;
private BufferedImage bimg;
private AffineTransform xform;
private AffineTransform inverse;
private double zoomFactor = 1;
public Map(String url)
super();
//this.image = image;
try
image = ImageIO.read(new URL(url));
catch(Exception e)
Insets insets = getInsets();
xform = AffineTransform.getTranslateInstance(insets.left, insets.top);
xform.scale(zoomFactor,zoomFactor);
try {
inverse = xform.createInverse();
} catch (NoninvertibleTransformException e) {
System.out.println(e);
points = new ArrayList();
startingPoint = new Point();
bimg = new BufferedImage(this.image.getWidth(this), this.image.getHeight(this), BufferedImage.TYPE_INT_ARGB);
repaintBImg();
addMouseListener(this);
addMouseMotionListener(this);
public void paintComponent(Graphics g)
Graphics2D g2d = (Graphics2D)g;
g2d.addRenderingHints(new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON));
g2d.addRenderingHints(new RenderingHints(RenderingHints.KEY_RENDERING , RenderingHints.VALUE_RENDER_QUALITY ));
bimg = (BufferedImage)image;
g2d.drawRenderedImage(bimg, xform);
if(!points.isEmpty())
for(int i=0; i<points.size(); i++)
if(i > 0)
drawLineSegment(g2d,points.get(i-1),points.get(i));
drawPoint(g2d, points.get(i));
if(startingPoint != null)
drawTempLine(startingPoint, g2d);
else
mouseX = 0;
mouseY = 0;
private void repaintBImg()
bimg.flush();
Graphics2D g2d = bimg.createGraphics();
g2d.addRenderingHints(new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON));
g2d.addRenderingHints(new RenderingHints(RenderingHints.KEY_RENDERING , RenderingHints.VALUE_RENDER_QUALITY ));
g2d.drawRenderedImage(bimg, xform);
g2d.dispose();
private void drawPoint(Graphics2D g2d, Point2D p)
int x = (int)(p.getX() * zoomFactor);
int y = (int)(p.getY() * zoomFactor);
int w = (int)(13 * zoomFactor);
int h = (int)(13 * zoomFactor);
g2d.setColor(Color.ORANGE);
g2d.setStroke(new BasicStroke(1.0F));
g2d.fillOval(x - w / 2, y - h / 2, w, h);
g2d.setColor(Color.BLACK);
g2d.drawOval(x - w / 2, y - h / 2, w - 1, h - 1);
private void drawLineSegment(Graphics2D g2d, Point2D p1, Point2D p2)
double x1 = p1.getX() * zoomFactor;
double y1 = p1.getY() * zoomFactor;
double x2 = p2.getX() * zoomFactor;
double y2 = p2.getY() * zoomFactor;
g2d.setColor(Color.RED);
g2d.setStroke(new BasicStroke(3.0F));
g2d.draw(new java.awt.geom.Line2D.Double(x1, y1, x2, y2));
private void drawTempLine(Point2D p, Graphics2D g2d)
int startX = (int)(p.getX() * zoomFactor);
int startY = (int)(p.getY() * zoomFactor);
if(mouseX != 0 && mouseY != 0)
g2d.setColor(Color.RED);
g2d.setStroke(new BasicStroke(2.0F));
g2d.drawLine(startX, startY, mouseX, mouseY);
public void mouseClicked(MouseEvent e)
public void mouseDragged(MouseEvent e)
mouseX = (int)(e.getX()*zoomFactor);
mouseY = (int)(e.getY()*zoomFactor);
repaint();
public void mousePressed(MouseEvent e)
if(e.getButton() == 1)
points.add(inverse.transform(e.getPoint(), null));
if(points.size() > 0)
startingPoint = points.get(points.size()-1);
mouseX = mouseY = 0;
repaint();
else if(e.getButton() == 2)
zoomFactor = zoomFactor + .05;
repaintBImg();
else if(e.getButton() == 3)
zoomFactor = zoomFactor - .05;
repaintBImg();
public void mouseReleased(MouseEvent e)
if(e.getButton() == 1)
points.add(inverse.transform(e.getPoint(), null));
repaint();
public void mouseEntered(MouseEvent mouseevent)
public void mouseExited(MouseEvent mouseevent)
public void mouseMoved(MouseEvent mouseevent)
}Message was edited by:
hardc0d3rimport java.awt.*;
import java.awt.event.*;
import java.awt.image.BufferedImage;
import java.awt.geom.*;
import java.io.*;
import java.net.URL;
import java.util.*;
import javax.imageio.*;
import javax.swing.*;
public class ZoomTesting extends JApplet {
public void init() {
//String dir = "file:/" + System.getProperty("user.dir");
//System.out.printf("dir = %s%n", dir);
String url = "http://localhost/image.gif";
//dir + "/images/cougar.jpg";
MapPanel map = new MapPanel(url);
getContentPane().add(map, "Center");
public static void main(String[] args) {
JApplet applet = new ZoomTesting();
JFrame f = new JFrame();
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.getContentPane().add(applet);
f.setSize(400,400);
f.setLocation(200,200);
applet.init();
f.setVisible(true);
class MapPanel extends JPanel implements MouseListener, MouseMotionListener {
private BufferedImage image;
private ArrayList<Point2D> points;
private Point2D startingPoint;
private int mouseX;
private int mouseY;
private AffineTransform xform;
private AffineTransform inverse;
RenderingHints hints;
private double zoomFactor = 1;
public MapPanel(String url) {
super();
try {
image = ImageIO.read(new URL(url));
} catch(Exception e) {
System.out.println(e.getClass().getName() +
" = " + e.getMessage());
Map<RenderingHints.Key, Object> map =
new HashMap<RenderingHints.Key, Object>();
map.put(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
map.put(RenderingHints.KEY_RENDERING,
RenderingHints.VALUE_RENDER_QUALITY);
hints = new RenderingHints(map);
setTransforms();
points = new ArrayList<Point2D>();
startingPoint = new Point();
addMouseListener(this);
addMouseMotionListener(this);
private void setTransforms() {
Insets insets = getInsets();
xform = AffineTransform.getTranslateInstance(insets.left, insets.top);
xform.scale(zoomFactor,zoomFactor);
try {
inverse = xform.createInverse();
} catch (NoninvertibleTransformException e) {
System.out.println(e);
protected void paintComponent(Graphics g) {
super.paintComponent(g);
Graphics2D g2d = (Graphics2D)g;
g2d.setRenderingHints(hints);
g2d.drawRenderedImage(image, xform);
if(!points.isEmpty()) {
for(int i=0; i<points.size(); i++) {
if(i > 0)
drawLineSegment(g2d,points.get(i-1),points.get(i));
drawPoint(g2d, points.get(i));
if(startingPoint != null) {
drawTempLine(startingPoint, g2d);
} else {
mouseX = 0;
mouseY = 0;
private void drawPoint(Graphics2D g2d, Point2D p) {
int x = (int)(p.getX() * zoomFactor);
int y = (int)(p.getY() * zoomFactor);
int w = (int)(13 * zoomFactor);
int h = (int)(13 * zoomFactor);
g2d.setColor(Color.ORANGE);
g2d.setStroke(new BasicStroke(1.0F));
g2d.fillOval(x - w / 2, y - h / 2, w, h);
g2d.setColor(Color.BLACK);
g2d.drawOval(x - w / 2, y - h / 2, w - 1, h - 1);
private void drawLineSegment(Graphics2D g2d, Point2D p1, Point2D p2) {
double x1 = p1.getX() * zoomFactor;
double y1 = p1.getY() * zoomFactor;
double x2 = p2.getX() * zoomFactor;
double y2 = p2.getY() * zoomFactor;
g2d.setColor(Color.RED);
g2d.setStroke(new BasicStroke(3.0F));
g2d.draw(new java.awt.geom.Line2D.Double(x1, y1, x2, y2));
private void drawTempLine(Point2D p, Graphics2D g2d) {
int startX = (int)(p.getX() * zoomFactor);
int startY = (int)(p.getY() * zoomFactor);
if(mouseX != 0 && mouseY != 0) {
g2d.setColor(Color.RED);
g2d.setStroke(new BasicStroke(2.0F));
g2d.drawLine(startX, startY, mouseX, mouseY);
public void mouseClicked(MouseEvent e) {}
public void mouseDragged(MouseEvent e) {
mouseX = (int)(e.getX()*zoomFactor);
mouseY = (int)(e.getY()*zoomFactor);
repaint();
public void mousePressed(MouseEvent e) {
if(e.getButton() == 1) {
points.add(inverse.transform(e.getPoint(), null));
if(points.size() > 0) {
startingPoint = points.get(points.size()-1);
mouseX = mouseY = 0;
} else if(e.getButton() == 2) {
zoomFactor = zoomFactor + .05;
setTransforms();
} else if(e.getButton() == 3) {
zoomFactor = zoomFactor - .05;
setTransforms();
repaint();
public void mouseReleased(MouseEvent e) {
if(e.getButton() == 1) {
points.add(inverse.transform(e.getPoint(), null));
repaint();
public void mouseEntered(MouseEvent mouseevent) {}
public void mouseExited(MouseEvent mouseevent) {}
public void mouseMoved(MouseEvent mouseevent) {}
} -
How to strore mouse coordinates in array
Hi,
I am using LaptopTouchpad to get cursor coordinates. I need to track all the coordinates while the cursor moving. But i am getting only present coordinates. i thought that to track coordinates, i need to store in an array. while doing that i am getting only present coordinates in all the index position of array.Post your VI so we can see how you are doing it now.
-
Windows XP - Bootcamp ---need mouse controls
I just partitioned my MacBook Pro (10.6.6) HD using Bootcamp. I installed Windows XP and noticed that the only response from my mouse pad while in Windows is only when I hard-press the mouse pad. I have no double-click or finger scroll capabilities. I have read other posts in reference to downloading applications but they mainly pertain to Windows 7, Vista or mice that I don't have. Is there a DL available to allow me to control my built in mouse pad so that I can have full functionality as in my MAC OSX?
True. There are no XP drivers available for the 2011 MacBook Pros. So even though the 2011 MacBook Pro can run XP, without any XP drivers available, you can't take advantage of any of the hardware in the 2011 MacBook Pro. I tried to find the AMD Radeon HD 6490M driver on the internet, and AMDs site directs you back to the OEM manufacturer. So since Apple did not write XP drivers for the new hardware, you can't effectively run XP. So it looks like you are stuck with Windows 7 if you need to run a specific Windows program.
I did a further search on the internet and found Dell and HP OEM vendor drivers for the AMD Radeon HD 6490M, and their system requirements are also Windows 7. So you can't even find an XP driver no matter where you search, because they just don't exist. -
Which app is the best for viewing documents without sliding while zooming?
I have many novels saved under *.htm, doc and pdf.
I'm using Quick Office, but when I zoom in, I have to slide the screen from side to side just to watch the whole things, which make my eyes feel very tired.
So I need your help about which app is the best for viewing documents without sliding while zooming, I mean, when you zoom in, you just have to slide vertically to see the whole documents, and don't have to slide horizontally.shazeal wrote:
There is a big difference between Windows and Linux, the scheduler being the biggest. Here are 3 shots from oblivion, I tried to keep the Tri-passes around 400-450k, and the texture mem is ~ the same in all 3.
The first two also have, Apache, Dovecott, Mysql, Samba, and SSHD running in the back ground, these were all stopped for the 3rd.
Gnome Desktop 2.2.4 Full bloated install - All background services running, run from gnome terminal, Firefox open. Consonance Music player running.
http://img525.imageshack.us/img525/1551 … tc5.th.jpg
Xorg only no WM, with urxvt console open to launch the game, nothing else running except background services.
http://img265.imageshack.us/img265/34/s … zu1.th.jpg
Xorg only, all non essential services stopped.
http://img225.imageshack.us/img225/7540 … zd7.th.jpg
All running on Wine 1.1.7, Oblivion is running around 150 mods, and QTP3, Body mods, High res texture packs for the character skins, with HDR lighting. As you can see the FPS does not change, it fluctuated between 19-20 on all three runs.
Especially with Dual cores, you will find that games do not loose FPS even with things like a lightweight music player running in the background. Windows scheduler simply was not made for that kind of thing, and benifits alot more from a lower number of background processes. I wont say linux does not benifit, but with Dual cores and CFS, it is not really noticable anymore.
Wait, does that mean you have better performance while you are running more stuff? Does the desktop manager handle graphics better?
This really did confuse me... -
Plotting on xy graph based on mouse coordinates
I am looking into plotting Mouse coordinates on XY Graph continuously based on where i move. My computer's resolution is 1200x800 and i would like it to plot based on where i move.,
Attached is my progress so far.
Attachments:
progress.png 74 KBThe XY Graph has a method which converts coordinates to XY values. You can call it by right clicking the graph and selecting Create>>Invoke Node>>Map Coordinates to XY.
However, if you look at the help for it, you will see that the coordinates it expects are those of the pane the graph is in, and the coordinates you have are of the screen. You can convert your global coords to pane coords by getting the VI's Front Panel Window. Panel Bounds property, building two matching XY clusters from the data and subtracting them (assuming the VI only has one pane) or you can use another loop with an event structure and a Mouse Move event (which returns local data) on the graph and then transfer the position data to your loop (you could also use a single loop, but that might be more complicated because the event structure will process every move of the mouse as a new event).
You will also need to keep the data to place in the graph somewhere. If you open the context help window and hover over the graph's BD terminal, you will see the data types it expects and you will need to build one of those yourself. A shift register is something you might want to look into. There are also some examples showing working with graphs in the example finder (Help>>Find Examples).
Try to take over the world! -
Using mouse wheel to zoom and pan
I was wondering if there would be a way to make a javascript that would load at Photoshop's startup that would allow the user to zoom in and out using the mouse wheel (instead of using it for scrolling), and to use that same mouse wheel as a third button (when you push on the mouse wheel) or any third button on a three button mouse to pan in your image. I'm a 3ds max user and I love the way the navigation work in that software so it'd be great to be able to do that for Photoshop and Illustrator and get rid of those useless key shortcuts that we need to use to zoom and pan.
For the pan fonction, I guess if there was a way to simply say "when the third mouse button is pressed, press the space button, until the mouse button is released" it could work. But then it would force the panning to stop when the mouse goes offscreen, unlike in 3ds max where you can pan for whatever distance you want, even if you have the loop throught the screen ten times.
For the zoom function, if scolling up could simply "push" the keyboard shortcuts to zoom in/ zoom out it could work, but I don't know if that's possible. And then we'd have to disable the scrolling up and down in the document.
Anyways, if anyone has any ideas about that let me know! I've been looking for that for such a long time!Not sure if I am misreading your post, but there is an option in the preferences that allows you to choose Zoom With Scroll Wheel. With this option active you hold the ALT key to scroll.
My Logitech mouse has a tilt wheel on it and this works fine in Photoshop. It doesn't loop through the screen but it does pan left and right with no problem. On this mouse the scroll wheel can also be pressed, and can be programmed to almost any key, I use for double click.
Forgive me if I've misunderstood your question. -
Mouse movment while clicking not detected
I have a Java Swing program that was built using the Netbeans IDE. I notice that the bottons all work is I hold the mouse still while I click but if the mouse is moving while the click happens my software never sees the click event. User complain that it is sometimes hard to hold the mouse exactly stationary when they click.
I figure there is either some proberty I'm not setting right or I need to look for some other kind of event. I can't seem to find this in the docs. Mybe I don't even know what search term to use.I have a Java Swing program that was built using the Netbeans IDE.Yuck.
the bottons all work is I hold the mouse still while I click but if the mouse is moving while the click happens my software never sees the click event.Use an ActionListener, not a MouseListener.
[http://java.sun.com/docs/books/tutorial/uiswing/index.html]
[http://java.sun.com/docs/books/tutorial/uiswing/components/button.html]
db -
Mouse Coordinates and Timer Resolution
First - I am not a Flash or ActionScript programmer. I have
been asked by someone if I could port my ActiveX code (private) to
the Flash client. In researching all of the Flash, Flex and
ActionScript documentation, it appears that almost everything I
need is present... Almost....
A. My program relies on Mouse Coordinates being fed to it in
twips. The only possible references I get to this issue have come
from searching this forum.
- Is it true that the X and Y coordinates are returned to
ActionScript as floating point values that represent fractional
pixel values that I can translate to twips?
B. My program also relies on good timer resolution. The
Windows GetTicks() API is not sufficient, because it is returned
via the Windows message queue and can be off enormously at a
MouseMove event. Therefore, in my ActiveX code, I call the
QueryPerformanceCounter(), which gives me the resolution I need.
- Can anyone tell me what timer API the Flash client engine
is using for the values it returns?
Thank you,
GrantI still don't understand your problem and apparently nobody else does either since there are no responses. Why don't you write a simple program (like I did for you on your last post) that demonstrates the problem.
"A picture is worth a thousand words". -
I'm using Illustrator and the newest mac pro running the most updated version of os x mavericks, with a bluetooth trackpad as a mouse.
I try to alt + scroll to zoom in but illustrator won't start zooming until I finish scrolling. It is extremely jerky while zooming in.
This makes it impossible to use this feature and is disrupting my work flow quite a bit. Any help would be appreciated. Thanks!anybody?
-
Mouse coordinates on the screen
is it possible to get mouse coordinates on the screen? i want to make a program which makes screenshots of areas on the screen and i want use the mouse to mark them.
how could i do that? is it possible to get mousecoordinates even if the mouse is outside the java JFrame?
there must be a way! i searched in the forum but i found no answer.
please don't tell me i have to use jni, the app should be platform independent.Yeah, basically there's no way to do this. This should be requested if it hasn't already (too lazy to check). It's not hard for sun to add, they just need to add it. Ok, anyway, I looked into it and see if there was a way to do this even somewhat reasonably in Java. I was very disappointed. I pretty much had no luck, but I did get a lame way of implementing this :P After some thought, this is what I ended up with:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class MousePosition extends JFrame implements MouseMotionListener
private int x = 0;
private int y = 0;
private boolean isAP = true;
public MousePosition()
setSize(300, 300);
setLocation(200, 200);
addMouseMotionListener(this);
addMouseListener(new MouseAdapter()
public void mousePressed(MouseEvent e)
isAP = false;
setVisible(true);
try
Robot r = new Robot();
r.mouseMove(getLocation().x + 50, getLocation().y + 50);
r.mousePress(InputEvent.BUTTON1_MASK);
} catch(AWTException e) {}
public void mouseDragged(MouseEvent e)
System.out.println(e.getX() + getLocation().x + ", " + (e.getY() + getLocation().y));
public void mouseMoved(MouseEvent e) {}
public static void main(String[] args)
new MousePosition();
}So it'll "lock" the program getting the absolute coordinates until you press the mouse, then you're free to do what you want. You could also do this with keyPressed or anything else you want. JNI would be the real solution as of now, until then I think sun should address the problem.
Maybe you are looking for
-
Help! I bought iLife 08, but it won't put iMovie on my laptop
How can I download an older version of iMovie that WOULD work on my G4? What version should it be?
-
BIB-9509 OLAPI error viewing cubes data
Hi, I'm using 11.1.0.7 Oracle Server and AWM 11.1.0.7.0B. Last week I created a cube, mantained it and I could view all the data. Today when I try to view the cube data I get this error: An error has occurred on the server Error class: OLAPI Server e
-
Everytime I sync my computer puts all of my apps onto my iPhone when i dont want it to.
Antime I sync my iPhone on my computer it puts all the apps on my computer (which came from my iPod Touch (4th generation)) but I don't want them to.
-
Is it normal to receive emails asking to verify apple email address after upgrading to new iPhone 4s
I recently upgraded my phone to an iPhone 4s. The phone works fine purchased things from iTunes, then received two emails asking to verify apple email address within a minute of each other, clinked on one link and verified my email and it told me my
-
How do i change the frame size in FCX?
I create short videos for an ecom website and and need the frame/canvas size to be vertical. It was no problem in FC7, I'd just customize the frame size in the sequence settings. There is no option in FCX that i can find. Someone told me that appl