📄 resource.java
字号:
/*
* $Header: /home/cvs/WEBPUMP2.0/WebPumpIDE_Src/WebPumpIDE/src/com/webpump/ui/module/model/Resource.java,v 1.1.1.1 2004/07/01 09:07:50 wang_j Exp $
* $Revision: 1.1.1.1 $
* $Date: 2004/07/01 09:07:50 $
*
* ====================================================================
*
* The NanJing HopeRun(IT-FOREST) Software License, Version 2.0.0
*
* Copyright 2003-2004 by NanJing HopeRun(IT-FOREST) Information System Co., Ltd, CHINA and
* IT Forest Corporation
* All rights reserved.
*
* This software is the confidential and proprietary information of
* HopeRun(IT-FOREST) Information System Co., Ltd, CHINA and IT Forest Corporation.
* You shall not disclose such Confidential Information and shall use it only in
* accordance with the terms of the license agreement you entered into with
* HopeRun(IT-FOREST) Information System Co., Ltd, CHINA and IT Forest Corporation.
*/
package com.webpump.ui.module.model;
import java.util.Vector;
import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.graphics.Cursor;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.*;
/**
* Class for resource
*
* @author shi_l
* @version 2.0.0 2004-2-12
*/
public class Resource {
/** arrow cursor id*/
public static int ARROW_CURSOR = 0;
/** cross cursor id*/
public static int CROSS_CURSOR = 1;
/** hand cursor id*/
public static int HAND_CURSOR = 2;
/** sizewe cursor id*/
public static int SIZEWE_CURSOR = 3;
/** sizens cursor id*/
public static int SIZENS_CURSOR = 4;
/** sizeall cursor id*/
public static int SIZEALL_CURSOR = 5;
/** shell*/
private Shell m_objShell;
/** display*/
private Display m_objDisplay;
/** canvas*/
private Canvas m_objCanvas;
/** cross cursor*/
private Cursor m_CROSS_CURSOR;
/** arrow cursor*/
private Cursor m_ARROW_CURSOR;
/** hand cursor*/
private Cursor m_HAND_CURSOR;
/** sizewe cursor*/
private Cursor m_SIZEWE_CURSOR;
/** sizens cursor*/
private Cursor m_SIZENS_CURSOR;
/** sizeall cursor*/
private Cursor m_SIZEALL_CURSOR;
/** gc*/
private GC m_objGc;
/** record the state of the module editor*/
private int m_nState;
/** the numbers of the active pages*/
private Vector m_vActivePageNum;
/** the number of the active task*/
private int m_nActiveTaskNum;
/** the number of the hot page*/
private int m_nHotPageNum;
/** the number of the active port*/
private int m_nActivePortNum;
/** the number of the seam*/
private int m_nSeamNum;
/** the number of the start port*/
private int m_nStartPort;
/** the start point*/
private Point m_objStartPoint;
/** the number of the start page*/
private int m_nStartPageNum;
/** the origin point*/
private Point m_objOriginPoint;
/** the old point*/
private Point m_objOldPoint;
/** points of old task*/
private Vector m_vOldTaskPoints;
/** old points*/
private Vector m_vOldPoints;
/** old position of the task*/
private int m_nOldLinePos;
/** start or end point*/
private int m_nStartEndPoint;
/** temp rect*/
private Rectangle m_objTmpRect;
/** record the actvie squeqe of the pages*/
private Vector m_vActiveList;
/**
* constructor
*/
public Resource() {
m_nState = 1;
m_vActivePageNum = new Vector();
m_nActiveTaskNum = -1;
m_nHotPageNum = -1;
m_nActivePortNum = -1;
m_nSeamNum = -1;
m_nStartPort = -1;
m_nStartPageNum = -1;
m_objStartPoint = new Point(-1, -1);
m_objOriginPoint = new Point(-1, -1);
m_objOldPoint = new Point(-1, -1);
m_vOldTaskPoints = new Vector();
m_nOldLinePos = -1;
m_nStartEndPoint = -1;
m_objTmpRect = new Rectangle(0, 0, Page.WIDTH, Page.HEIGHT);
m_vActiveList = new Vector();
m_vOldPoints = new Vector();
}
/**
* set shell
* @param shell
*/
public void setShell(Shell shell) {
m_objShell = shell;
}
/**
* set display
* @param display
*/
public void setDisplay(Display display) {
m_objDisplay = display;
}
/**
* set canvas
* @param canvas
*/
public void setCanvas(Canvas canvas) {
m_objCanvas = canvas;
}
/**
* set arrow cursor
* @param cursor
*/
public void setArrowCursor(Cursor cursor) {
m_ARROW_CURSOR = cursor;
}
/**
* set crosss cursor
* @param cursor
*/
public void setCrossCursor(Cursor cursor) {
m_CROSS_CURSOR = cursor;
}
/**
* set hand cursor
* @param cursor
*/
public void setHandCursor(Cursor cursor) {
m_HAND_CURSOR = cursor;
}
/**
* set sizewe cursor
* @param cursor
*/
public void setSIZEWECursor(Cursor cursor) {
m_SIZEWE_CURSOR = cursor;
}
/**
* set sizens cursor
* @param cursor
*/
public void setSIZENSCursor(Cursor cursor) {
m_SIZENS_CURSOR = cursor;
}
/**
* set size all cursor
* @param cursor
*/
public void setSIZEALLCursor(Cursor cursor) {
m_SIZEALL_CURSOR = cursor;
}
/**
* set cursor of the canvas according the param
* @param style
*/
public void setCursor(int style) {
//根据参
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -