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