1 /*******************************************************************************
2 * Copyright (c) 2007, 2011 Association for Decentralized Information Management in
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.trend.impl;
14 import java.awt.Cursor;
15 import java.awt.Image;
16 import java.awt.Point;
17 import java.awt.Toolkit;
20 public class MouseCursors {
22 public Cursor grab, hand, grab_horiz, grab_vert;
24 public MouseCursors() {
25 Toolkit toolkit = Toolkit.getDefaultToolkit();
27 URL url = MouseCursors.class.getResource( "grab.png" );
28 Image image = toolkit.getImage( url );
29 Point hotspot = new Point(16, 14);
30 grab = toolkit.createCustomCursor(image, hotspot, "org.simantics.trend.grab");
32 url = MouseCursors.class.getResource( "hand.png" );
33 image = toolkit.getImage( url );
34 hotspot = new Point(16, 15);
35 hand = toolkit.createCustomCursor(image, hotspot, "org.simantics.trend.hand");
37 url = MouseCursors.class.getResource( "grab_horiz.png" );
38 image = toolkit.getImage( url );
39 hotspot = new Point(12, 10);
40 grab_horiz = toolkit.createCustomCursor(image, hotspot, "org.simantics.trend.grab_horiz");
42 url = MouseCursors.class.getResource( "grab_vert.png" );
43 image = toolkit.getImage( url );
44 hotspot = new Point(16, 11);
45 grab_vert = toolkit.createCustomCursor(image, hotspot, "org.simantics.trend.grab_vert");