Revision 31496 branches/v2_0_0_prep/extensions/extEditing/src/org/gvsig/editing/gui/cad/DefaultCADTool.java

View differences:

DefaultCADTool.java
50 50
import org.gvsig.andami.PluginServices;
51 51
import org.gvsig.andami.messages.NotificationManager;
52 52
import org.gvsig.andami.ui.mdiManager.IWindow;
53
import org.gvsig.app.project.documents.view.gui.View;
53
import org.gvsig.app.project.documents.view.gui.DefaultViewPanel;
54 54
import org.gvsig.editing.CADExtension;
55 55
import org.gvsig.editing.gui.cad.exception.CommandException;
56 56
import org.gvsig.editing.layers.VectorialLayerEdited;
......
652 652
				if (ct.isApplicable(type)) {
653 653
					getCadToolAdapter().setCadTool(ct);
654 654
					ct.init();
655
					View vista = (View) PluginServices.getMDIManager()
655
					DefaultViewPanel vista = (DefaultViewPanel) PluginServices.getMDIManager()
656 656
					.getActiveWindow();
657 657
					vista.getConsolePanel().addText("\n" + ct.getName(),
658 658
							JConsole.COMMAND);
......
675 675

  
676 676
	public void throwValueException(String s, double d) {
677 677
		IWindow window = PluginServices.getMDIManager().getActiveWindow();
678
		if (window instanceof View){
679
			((View)window).getConsolePanel().addText(s + " : " + d, JConsole.ERROR);
678
		if (window instanceof DefaultViewPanel){
679
			((DefaultViewPanel)window).getConsolePanel().addText(s + " : " + d, JConsole.ERROR);
680 680
		}
681 681
	}
682 682

  
683 683
	public void throwOptionException(String s, String o) {
684 684
		IWindow window = PluginServices.getMDIManager().getActiveWindow();
685
		if (window instanceof View){
686
			((View)window).getConsolePanel().addText(s + " : " + o, JConsole.ERROR);
685
		if (window instanceof DefaultViewPanel){
686
			((DefaultViewPanel)window).getConsolePanel().addText(s + " : " + o, JConsole.ERROR);
687 687
		}
688 688
	}
689 689
	
690 690
	public void throwPointException(String s, double x, double y) {
691 691
		IWindow window = PluginServices.getMDIManager().getActiveWindow();
692
		if (window instanceof View){
693
			((View)window).getConsolePanel().addText(s + " : " + " X = " + x + ", Y = " + y,
692
		if (window instanceof DefaultViewPanel){
693
			((DefaultViewPanel)window).getConsolePanel().addText(s + " : " + " X = " + x + ", Y = " + y,
694 694
				JConsole.ERROR);
695 695
		}
696 696
	}

Also available in: Unified diff