From 1fa17fa99a1cdbe564a06f421984e93154b6e7bc Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Wed, 9 Nov 2011 13:54:32 +0000 Subject: [PATCH] - show user dialog when class specified in CustomControl wizard is no Control git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8620 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../nodes/actions/impl/NewCustomControlWizardAction.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/impl/NewCustomControlWizardAction.java b/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/impl/NewCustomControlWizardAction.java index 08c27a8c8..46e4c9295 100644 --- a/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/impl/NewCustomControlWizardAction.java +++ b/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/impl/NewCustomControlWizardAction.java @@ -108,6 +108,8 @@ public final class NewCustomControlWizardAction extends AbstractNewControlWizard Object contr = clazz.newInstance(); if (contr instanceof Control) { return (Control) contr; + } else { + DialogDisplayer.getDefault().notifyLater(new NotifyDescriptor.Message("This is no Control class!")); } } catch (InstantiationException ex) { Exceptions.printStackTrace(ex); @@ -117,7 +119,7 @@ public final class NewCustomControlWizardAction extends AbstractNewControlWizard DialogDisplayer.getDefault().notifyLater(new NotifyDescriptor.Message("Error instatiating class!")); } } else { - DialogDisplayer.getDefault().notifyLater(new NotifyDescriptor.Message("Cannot find class: " + className+ "\nMake sure the name is correct and the project is compiled,\nbest enable 'Save on Compile' in the project preferences.")); + DialogDisplayer.getDefault().notifyLater(new NotifyDescriptor.Message("Cannot find class: " + className + "\nMake sure the name is correct and the project is compiled,\nbest enable 'Save on Compile' in the project preferences.")); } return null; }