Revision 22616 branches/v10/extensions/extPublish/src/org/gvsig/publish/gui/publish/PublishController.java

View differences:

PublishController.java
68 68
 *
69 69
 */
70 70
public class PublishController implements ActionListener, Observer {
71
	/*
72
	 * Events 
73
	 */
71
	//events
74 72
	public static final String PUBLISH_EVENT_ACCEPT="accept_publish";
75 73
	public static final String PUBLISH_EVENT_CANCEL="cancel_publish";
76

  
77
	/*
78
	 * Main window
79
	 */
74
	//associations
80 75
	private PublishWindow window = null;
81
	/*
82
	 * Active publication
83
	 */	
84 76
	private Publication publication = null;
85
	/*
86
	 * Plugin controller
87
	 */
88
	IPublishPluginController pluginCtrl = null;
77
	private IPublishPluginController pluginCtrl = null;
78
	private String initialMessage=null;
79
	
80
	
89 81
	/**
90 82
	 * Constructor
91 83
	 */
......
105 97
	 * @return IWindow 
106 98
	 */
107 99
	public PublishWindow getWindow(){
100
		if (getInitialMessage() != null){
101
			JOptionPane.showMessageDialog(window,				
102
				getInitialMessage(),
103
				PluginServices.getText(this,"publish_publication_has_changed"),
104
				JOptionPane.WARNING_MESSAGE);
105
		}
108 106
		updateWindow();
109 107
		return window;
110 108
	}
......
112 110
	 * Shown the controller's window.
113 111
	 * Preconditions: first you must call setPublication
114 112
	 */
115
	public void showWindow(){
113
	public void showWindow(){		
116 114
		window.showWindow();
117 115
	}	
118 116
	/**
......
200 198
			PublishLogger.getLog().error("ERROR Publish Controller",e);
201 199
		}	
202 200
		window.setPublicationPanel(panel);
203
	}	
201
	}
202
	/**
203
	 * @return the initialMessage
204
	 */
205
	public String getInitialMessage() {
206
		return initialMessage;
207
	}
208
	/**
209
	 * @param initialMessage the initialMessage to set
210
	 */
211
	public void setInitialMessage(String initialMessage) {
212
		this.initialMessage = initialMessage;
213
	}
204 214

  
205 215
}

Also available in: Unified diff