mousePosition.move(mouseCanvasPosition.getX(), mouseCanvasPosition.getY() + OFFSET + newBounds.height);
/** * Changes the point to have the specified location. * <p> * This method is included for completeness, to parallel the * <code>setLocation</code> method of <code>Component</code>. * Its behavior is identical with <code>move(int, int)</code>. * @param x the X coordinate of the new location * @param y the Y coordinate of the new location * @see java.awt.Component#setLocation(int, int) * @see java.awt.Point#getLocation * @see java.awt.Point#move(int, int) * @since 1.1 */ public void setLocation(int x, int y) { move(x, y); }
public void move(int x, int y) { super.move(x, y); makeDirty(); }
try { StringTokenizer st2 = new StringTokenizer(boardDesc, "\t\n"); b.relativePosition().move(Integer.parseInt(st2.nextToken()), Integer.parseInt(st2.nextToken())); String baseName = st2.nextToken(); updateBoard(baseName); try { StringTokenizer st2 = new StringTokenizer(command, "\t\n"); b.relativePosition().move(Integer.parseInt(st2.nextToken()), Integer.parseInt(st2.nextToken())); String baseName = st2.nextToken(); updateBoard(baseName);
public void buildBoard(ASLBoard b, String bd) throws BoardException { StringTokenizer st2 = new StringTokenizer(bd, "\t\n"); try { b.relativePosition().move(Integer.parseInt(st2.nextToken()), Integer.parseInt(st2.nextToken())); String baseName = st2.nextToken(); String unReversedBoardName;
if(dynamics[2]) dx = 2; if(dynamics[3]) dy = 2; p.move((int)p.getX() + dx, (int)p.getY() + dy); repaint();
@Override public void actionPerformed(ActionEvent e) { int width = optionView.getWidth(); int height = optionView.getHeight(); int maxWidth = optionPanel.getWidth(); int maxHeight = optionPanel.getHeight(); int minWidth = 30; int minHeight = 30; if(optionPanelHidden && ((width != minWidth) || (height != minHeight))) { width = Math.max(width - maxWidth / 5, minWidth); height = Math.max(height - maxHeight / 5, minHeight); } else if(!optionPanelHidden && ((width != maxWidth) || (height != maxHeight))) { width = Math.min(width + maxWidth / 5, maxWidth); height = Math.min(height + maxHeight / 5, maxHeight); } else { optionPanelTimer.stop(); return; } optionView.setBounds(pane.getParent().getWidth() - 10 - width, pane.getParent().getHeight() - 10 - height, width, height); viewPoint.move(0, maxHeight - minHeight); optionView.setViewPosition(viewPoint); optionView.revalidate(); repaint(); } });
np.move(pivot.x + dxs[dir], pivot.y + dys[dir]);
location.move(x, y);
dragHandler.myLoc.move(getX() + dragHandler.mPressedX, getY() + dragHandler.mPressedY); Point p = SwingUtilities.convertPoint(this.getParent(), dragHandler.myLoc, workspace); WorkspaceWidget widget = workspace.getWidgetAt(p);