]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.trend/src/org/simantics/trend/impl/MouseCursors.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.trend / src / org / simantics / trend / impl / MouseCursors.java
1 /*******************************************************************************
2  * Copyright (c) 2007, 2011 Association for Decentralized Information Management in
3  * Industry THTH ry.
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
8  *
9  * Contributors:
10  *     VTT Technical Research Centre of Finland - initial API and implementation
11  *******************************************************************************/
12 package org.simantics.trend.impl;
13
14 import java.awt.Cursor;
15 import java.awt.Image;
16 import java.awt.Point;
17 import java.awt.Toolkit;
18 import java.net.URL;
19
20 public class MouseCursors {
21         
22         public Cursor grab, hand, grab_horiz, grab_vert;
23         
24         public MouseCursors() {
25                 Toolkit toolkit = Toolkit.getDefaultToolkit();
26
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");
31                 
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");
36                 
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");
41
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");
46                 
47         }
48                 
49 }