001 package org.springframework.richclient.command.support; 002 003 import org.springframework.richclient.command.ActionCommand; 004 import org.springframework.richclient.dialog.ApplicationDialog; 005 006 /** 007 * Open a dialog. 008 * 009 * @author Jan Hoskens 010 * 011 */ 012 public class DialogCommand extends ActionCommand { 013 014 private ApplicationDialog dialog; 015 016 /** 017 * Set the dialog to open. 018 */ 019 public void setDialog(ApplicationDialog dialog) { 020 this.dialog = dialog; 021 } 022 023 /** 024 * {@inheritDoc} 025 */ 026 protected void doExecuteCommand() { 027 dialog.showDialog(); 028 } 029 }