本文整理匯總了Java中org.eclipse.swt.graphics.Cursor.dispose方法的典型用法代碼示例。如果您正苦於以下問題:Java Cursor.dispose方法的具體用法?Java Cursor.dispose怎麽用?Java Cursor.dispose使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.swt.graphics.Cursor
的用法示例。
在下文中一共展示了Cursor.dispose方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: run
import org.eclipse.swt.graphics.Cursor; //導入方法依賴的package包/類
@Override
public void run(IAction action) {
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = getParentShell();
shell.setCursor(waitCursor);
try {
ImportWizard importWizard = new ImportWizard();
importWizard.setWindowTitle("Convertigo project import Wizard");
WizardDialog wzdlg = new WizardDialog(shell, importWizard);
wzdlg.open();
}
catch (Throwable e) {
ConvertigoPlugin.logException(e, "Unable to import project!");
}
finally {
shell.setCursor(null);
waitCursor.dispose();
}
}
示例2: run
import org.eclipse.swt.graphics.Cursor; //導入方法依賴的package包/類
@Override
public void run() {
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = getParentShell();
shell.setCursor(waitCursor);
MessageDialog.openInformation(
shell,
"Convertigo Plug-in",
"The choosen operation is not yet implemented : '"+ action.getId() + "'.");
shell.setCursor(null);
waitCursor.dispose();
}
示例3: run
import org.eclipse.swt.graphics.Cursor; //導入方法依賴的package包/類
public void run() {
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = getParentShell();
shell.setCursor(waitCursor);
try {
ProjectExplorerView explorerView = getProjectExplorerView();
if (explorerView != null)
explorerView.loadSelectedUnloadedProjectTreeObject();
}
catch (Throwable e) {
ConvertigoPlugin.logException(e, "Unable to open the project!");
}
finally {
shell.setCursor(null);
waitCursor.dispose();
}
}
示例4: run
import org.eclipse.swt.graphics.Cursor; //導入方法依賴的package包/類
public void run() {
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = getParentShell();
shell.setCursor(waitCursor);
try {
ProjectExplorerView explorerView = getProjectExplorerView();
if (explorerView != null) {
UndoManager undoManager = explorerView.getUndoManager();
undoManager.undo();
}
}
catch (Throwable e) {
ConvertigoPlugin.logException(e, "Unable to undo the last action.");
}
finally {
shell.setCursor(null);
waitCursor.dispose();
}
}
示例5: run
import org.eclipse.swt.graphics.Cursor; //導入方法依賴的package包/類
public void run() {
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = getParentShell();
shell.setCursor(waitCursor);
try {
ProjectExplorerView explorerView = getProjectExplorerView();
if (explorerView != null) {
DatabaseObjectTreeObject treeObject = null;
RouteEventComponent component = null;
TreeObject[] treeObjects = explorerView.getSelectedTreeObjects();
for (int i = treeObjects.length-1 ; i>=0 ; i--) {
treeObject = (DatabaseObjectTreeObject) treeObjects[i];
if (treeObject instanceof MobileRouteEventComponentTreeObject) {
MobileRouteEventComponentTreeObject componentTreeObject = (MobileRouteEventComponentTreeObject)treeObject;
component = (RouteEventComponent)componentTreeObject.getObject();
component.setEnabled(true);
componentTreeObject.setEnabled(true);
componentTreeObject.hasBeenModified(true);
TreeObjectEvent treeObjectEvent = new TreeObjectEvent(componentTreeObject, "isEnabled", false, true);
explorerView.fireTreeObjectPropertyChanged(treeObjectEvent);
}
}
explorerView.refreshSelectedTreeObjects();
}
}
catch (Throwable e) {
ConvertigoPlugin.logException(e, "Unable to enable event!");
}
finally {
shell.setCursor(null);
waitCursor.dispose();
}
}
示例6: run
import org.eclipse.swt.graphics.Cursor; //導入方法依賴的package包/類
public void run() {
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = getParentShell();
shell.setCursor(waitCursor);
try {
ProjectExplorerView explorerView = getProjectExplorerView();
if (explorerView != null) {
DatabaseObjectTreeObject treeObject = null;
UIComponent component = null;
TreeObject[] treeObjects = explorerView.getSelectedTreeObjects();
for (int i = treeObjects.length-1 ; i>=0 ; i--) {
treeObject = (DatabaseObjectTreeObject) treeObjects[i];
if (treeObject instanceof MobileUIComponentTreeObject) {
MobileUIComponentTreeObject componentTreeObject = (MobileUIComponentTreeObject)treeObject;
component = (UIComponent)componentTreeObject.getObject();
component.setEnabled(true);
componentTreeObject.setEnabled(true);
componentTreeObject.hasBeenModified(true);
TreeObjectEvent treeObjectEvent = new TreeObjectEvent(componentTreeObject, "isEnabled", false, true);
explorerView.fireTreeObjectPropertyChanged(treeObjectEvent);
}
}
explorerView.refreshSelectedTreeObjects();
}
}
catch (Throwable e) {
ConvertigoPlugin.logException(e, "Unable to enable component!");
}
finally {
shell.setCursor(null);
waitCursor.dispose();
}
}
示例7: run
import org.eclipse.swt.graphics.Cursor; //導入方法依賴的package包/類
public void run() {
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = getParentShell();
shell.setCursor(waitCursor);
try {
ProjectExplorerView explorerView = getProjectExplorerView();
if (explorerView != null) {
DesignDocumentTreeObject ddto = (DesignDocumentTreeObject)explorerView.getFirstSelectedTreeObject();
DesignDocumentViewTreeObject ddvto = ddto.addNewView();
if (ddto.hasChanged()) {
TreeParent treeParent = ddto.getParent();
if (treeParent instanceof FolderTreeObject)
treeParent = treeParent.getParent();
explorerView.objectChanged(new CompositeEvent(treeParent.getObject(),ddvto.getPath()));
}
}
}
catch (Throwable e) {
ConvertigoPlugin.logException(e, "Unable to create a new view!");
}
finally {
shell.setCursor(null);
waitCursor.dispose();
}
}
示例8: run
import org.eclipse.swt.graphics.Cursor; //導入方法依賴的package包/類
public void run() {
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = getParentShell();
shell.setCursor(waitCursor);
try {
ProjectExplorerView explorerView = getProjectExplorerView();
if (explorerView != null) {
TreeObject treeObject = explorerView.getFirstSelectedTreeObject();
if (treeObject instanceof MobileComponentTreeObject) {
if (treeObject instanceof MobileApplicationComponentTreeObject) {
MobileApplicationComponentTreeObject mpcto = (MobileApplicationComponentTreeObject) treeObject;
ApplicationComponentEditor editor = mpcto.activeEditor(false);
editor.launchBuilder(forceInstall, forceClean);
}
}
}
}
catch (Throwable e) {
ConvertigoPlugin.logException(e, "Unable to open the mobile builder!");
}
finally {
shell.setCursor(null);
waitCursor.dispose();
}
}
示例9: disposeCursors
import org.eclipse.swt.graphics.Cursor; //導入方法依賴的package包/類
/**
* Dispose all of the cached cursors.
*/
public static void disposeCursors() {
for (Cursor cursor : m_idToCursorMap.values()) {
cursor.dispose();
}
m_idToCursorMap.clear();
}
示例10: run
import org.eclipse.swt.graphics.Cursor; //導入方法依賴的package包/類
public void run() {
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = getParentShell();
shell.setCursor(waitCursor);
try {
ProjectExplorerView explorerView = getProjectExplorerView();
if (explorerView != null) {
TreeObject treeObject = explorerView.getFirstSelectedTreeObject();
Object databaseObject = treeObject.getObject();
if ((databaseObject != null) && (databaseObject instanceof SequenceStep)) {
SequenceStep sequenceStep = (SequenceStep)databaseObject;
sequenceStep.importVariableDefinition();
if (sequenceStep.hasChanged) {
explorerView.reloadTreeObject(treeObject);
StructuredSelection structuredSelection = new StructuredSelection(treeObject);
ConvertigoPlugin.getDefault().getPropertiesView().selectionChanged((IWorkbenchPart)explorerView, structuredSelection);
}
}
}
}
catch (Throwable e) {
ConvertigoPlugin.logException(e, "Unable to add sequence variables to step!");
}
finally {
shell.setCursor(null);
waitCursor.dispose();
}
}
示例11: run
import org.eclipse.swt.graphics.Cursor; //導入方法依賴的package包/類
public void run() {
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = getParentShell();
shell.setCursor(waitCursor);
try {
ProjectExplorerView explorerView = getProjectExplorerView();
if (explorerView != null) {
PropertyTableTreeObject propertyTableTreeObject = (PropertyTableTreeObject)explorerView.getFirstSelectedTreeObject();
TreeParent owner = propertyTableTreeObject.getTreeObjectOwner();
IPropertyTreeObject pto = propertyTableTreeObject.addNewRow();
if (owner instanceof DatabaseObjectTreeObject) {
DatabaseObjectTreeObject databaseObjectTreeObject = (DatabaseObjectTreeObject)owner;
if (databaseObjectTreeObject.hasChanged()) {
TreeParent treeParent = databaseObjectTreeObject.getParent();
if (treeParent instanceof FolderTreeObject)
treeParent = treeParent.getParent();
// explorerView.reloadTreeObject(treeParent);
explorerView.objectChanged(new CompositeEvent(treeParent.getObject(),pto.getPath()));
}
}
else
explorerView.refreshTreeObject(owner, true);
}
}
catch (Throwable e) {
ConvertigoPlugin.logException(e, "Unable to create a new row!");
}
finally {
shell.setCursor(null);
waitCursor.dispose();
}
}
示例12: run
import org.eclipse.swt.graphics.Cursor; //導入方法依賴的package包/類
public void run() {
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = getParentShell();
shell.setCursor(waitCursor);
try {
ProjectExplorerView explorerView = getProjectExplorerView();
if (explorerView != null) {
DatabaseObjectTreeObject treeObject = null;
Statement statement = null;
TreeObject[] treeObjects = explorerView.getSelectedTreeObjects();
for (int i = treeObjects.length-1 ; i>=0 ; i--) {
treeObject = (DatabaseObjectTreeObject) treeObjects[i];
if (treeObject instanceof StatementTreeObject) {
StatementTreeObject statementTreeObject = (StatementTreeObject)treeObject;
statement = (Statement)statementTreeObject.getObject();
statement.setEnabled(true);
statementTreeObject.setEnabled(true);
statementTreeObject.hasBeenModified(true);
}
}
explorerView.refreshSelectedTreeObjects();
}
}
catch (Throwable e) {
ConvertigoPlugin.logException(e, "Unable to enable statement!");
}
finally {
shell.setCursor(null);
waitCursor.dispose();
}
}
示例13: run
import org.eclipse.swt.graphics.Cursor; //導入方法依賴的package包/類
public void run() {
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = getParentShell();
shell.setCursor(waitCursor);
try {
ProjectExplorerView explorerView = getProjectExplorerView();
if (explorerView != null) {
ProjectTreeObject projectTreeObject = (ProjectTreeObject)explorerView.getFirstSelectedTreeObject();
if (projectTreeObject != null) {
StatisticsDialog stats = new StatisticsDialog(shell,
projectTreeObject.getName(), projectTreeObject.getObject().getComment(),
projectTreeObject.getObject().getVersion());
stats.open();
}
}
}
catch (Throwable e) {
ConvertigoPlugin.logException(e, "Unable to compute statistics!");
}
finally {
shell.setCursor(null);
waitCursor.dispose();
}
}
示例14: run
import org.eclipse.swt.graphics.Cursor; //導入方法依賴的package包/類
@Override
public void run() {
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = getParentShell();
shell.setCursor(waitCursor);
try {
ProjectExplorerView explorerView = getProjectExplorerView();
if (explorerView != null) {
TreeObject treeObject = explorerView.getFirstSelectedTreeObject();
Object databaseObject = treeObject.getObject();
if ((databaseObject != null) && (databaseObject instanceof UrlMappingParameter)) {
UrlMappingParameter parameter = (UrlMappingParameter)databaseObject;
TreeParent treeParent = treeObject.getParent();
DatabaseObjectTreeObject parentTreeObject = null;
if (treeParent instanceof DatabaseObjectTreeObject)
parentTreeObject = (DatabaseObjectTreeObject)treeParent;
else
parentTreeObject = (DatabaseObjectTreeObject)treeParent.getParent();
if (parentTreeObject != null) {
// Create new Body parameter
BodyParameter bodyParameter = new BodyParameter();
if (DatabaseObjectsManager.acceptDatabaseObjects(parameter.getParent(), bodyParameter) ) {
bodyParameter.setComment(parameter.getComment());
bodyParameter.setArray(false);
bodyParameter.setMultiValued(false);
bodyParameter.setRequired(parameter.isRequired());
bodyParameter.setMappedVariableName(parameter.getMappedVariableName());
bodyParameter.bNew = true;
bodyParameter.hasChanged = true;
// Add new parameter to parent operation
UrlMappingOperation operation = (UrlMappingOperation) parameter.getParent();
operation.changeTo(bodyParameter);
// Add new parameter in Tree
UrlMappingParameterTreeObject parameterTreeObject = new UrlMappingParameterTreeObject(explorerView.viewer,bodyParameter);
treeParent.addChild(parameterTreeObject);
// Delete old parameter
parameter.delete();
// Rename new parameter
bodyParameter.setName(parameter.getName());
// Reload in tree
parentTreeObject.hasBeenModified(true);
explorerView.reloadTreeObject(parentTreeObject);
explorerView.setSelectedTreeObject(explorerView.findTreeObjectByUserObject(bodyParameter));
} else {
throw new EngineException("You cannot paste to a " + parameter.getParent().getClass().getSimpleName() + " a database object of type " + bodyParameter.getClass().getSimpleName());
}
}
}
}
}
catch (Throwable e) {
ConvertigoPlugin.logException(e, "Unable to change to Body parameter!");
}
finally {
shell.setCursor(null);
waitCursor.dispose();
}
}
示例15: run
import org.eclipse.swt.graphics.Cursor; //導入方法依賴的package包/類
public void run() {
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = getParentShell();
shell.setCursor(waitCursor);
try {
ProjectExplorerView explorerView = getProjectExplorerView();
if (explorerView != null) {
Transaction transaction = null;
Connector connector = null;
TreeObject treeObject = explorerView.getFirstSelectedTreeObject();
if (treeObject instanceof TransactionTreeObject) {
transaction = (Transaction)treeObject.getObject();
connector = (Connector) transaction.getParent();
if (transaction instanceof TransactionWithVariables) {
TransactionWithVariables tr = (TransactionWithVariables)transaction;
//if (tr.getVariablesDefinitionSize() == 0) {
if (tr.numberOfVariables() == 0) {
MessageBox messageBox = new MessageBox(shell, SWT.YES | SWT.APPLICATION_MODAL);
messageBox.setMessage("No variables are defined for transaction " + tr.getName());
messageBox.open();
} else {
String xslContent = generateXSLForm(connector, tr);
// Refresh project resource
IProject project = ConvertigoPlugin.getDefault().getProjectPluginResource(tr.getProject().getName());
// Compute the targetXSL file name
String xslForm = tr.getName()+"Request.xsl";
IFile file = project.getFile(xslForm);
ByteArrayInputStream bais = new ByteArrayInputStream(xslContent.getBytes());
if (file.exists()) {
file.setContents((InputStream)bais, IFile.FORCE | IFile.KEEP_HISTORY, null);
} else {
file.create((InputStream)bais, true, null);
}
TransactionWithVariables newTrans = (TransactionWithVariables)tr.clone();
newTrans.hasChanged = true;
newTrans.bNew = true;
XMLVector<XMLVector<Long>> orderedVariables = new XMLVector<XMLVector<Long>>();
orderedVariables.add(new XMLVector<Long>());
newTrans.setOrderedVariables(orderedVariables);
newTrans.setSheetLocation(Transaction.SHEET_LOCATION_FROM_REQUESTABLE);
HandlerStatement handler = new HandlerStatement(HandlerStatement.EVENT_TRANSACTION_STARTED, HandlerStatement.RETURN_CANCEL);
newTrans.add(handler);
newTrans.setName(tr.getName()+"Request");
Sheet sheet = new Sheet();
sheet.setBrowser("*");
sheet.setUrl(xslForm);
newTrans.addSheet(sheet);
connector.add(newTrans);
postCreate(treeObject.getConnectorTreeObject(), newTrans);
}
}
}
}
}
catch (Throwable e) {
ConvertigoPlugin.logException(e, "Unable to generate a requestForm widget");
}
finally {
shell.setCursor(null);
waitCursor.dispose();
}
}