Revision 1341

View differences:

trunk/libraries/libCorePlugin/src/com/iver/core/mdiManager/NewSkin.java
114 114
		fvs = new FrameViewSupport(mainFrame);
115 115
		dss = new DialogStackSupport(mainFrame);
116 116
		svs = new SingletonViewSupport(vis, fvs);
117
		vis = new ViewInfoSupport(fvs, svs);
117
		vis = new ViewInfoSupport(mainFrame, fvs, svs);
118 118
		fvs.setVis(vis);
119 119
		vss = new ViewStackSupport(vis);
120 120
	}
......
146 146
		}
147 147

  
148 148
		if (singletonPreviouslyAdded){
149
			//Si la vista no est? actualmente abierta
149 150
			if (!svs.contains((SingletonView)p)){
150 151
				JInternalFrame frame = fvs.getJInternalFrame(p);
151 152
				svs.openSingletonView((SingletonView)p, frame);
152 153
				addJInternalFrame(frame, vi);
154
				vss.add(p,
155
						new ActionListener() {
156
							public void actionPerformed(ActionEvent e) {
157
								View v = vis.getViewById(Integer.parseInt(
158
											e.getActionCommand()));
159
								JInternalFrame f = fvs.getJInternalFrame(v);
160
								activateJInternalFrame(f);
161
							}
162
						});
153 163
				return p;
154 164
			}else{
155
//				vis.deleteViewInfo(p);
156
//				vi = vis.getViewInfo(p);
165
				//La vista est? actualmente abierta
157 166
				JInternalFrame frame = (JInternalFrame) svs.getFrame((SingletonView)p);
158 167
				activateJInternalFrame((JInternalFrame) frame);
159 168
				return fvs.getView((JInternalFrame) frame);
trunk/libraries/libCorePlugin/src/com/iver/core/mdiManager/ViewInfoSupport.java
40 40
 */
41 41
package com.iver.core.mdiManager;
42 42

  
43
import com.iver.andami.ui.mdiManager.SingletonView;
44
import com.iver.andami.ui.mdiManager.View;
45
import com.iver.andami.ui.mdiManager.ViewInfo;
46

  
47 43
import java.beans.PropertyChangeEvent;
48 44
import java.beans.PropertyChangeListener;
49

  
50 45
import java.util.Enumeration;
51 46
import java.util.Hashtable;
52
import java.util.Iterator;
53 47

  
48
import com.iver.andami.plugins.PluginClassLoader;
49
import com.iver.andami.ui.mdiFrame.MainFrame;
50
import com.iver.andami.ui.mdiManager.SingletonView;
51
import com.iver.andami.ui.mdiManager.View;
52
import com.iver.andami.ui.mdiManager.ViewInfo;
54 53

  
54

  
55 55
/**
56 56
 *
57 57
 */
......
64 64
    private Hashtable infoView = new Hashtable();
65 65
    private ViewPropertyChangeListener viewInfoListener = new ViewPropertyChangeListener();
66 66
	private SingletonViewSupport svs;
67

  
67
	private MainFrame mdiFrame;
68
	
69
	
68 70
    /**
69 71
     * Creates a new ViewInfoSupport object.
70 72
     *
71 73
     * @param fvs DOCUMENT ME!
72 74
     * @param svs
73 75
     */
74
    public ViewInfoSupport(FrameViewSupport fvs, SingletonViewSupport svs) {
76
    public ViewInfoSupport(MainFrame frame, FrameViewSupport fvs, SingletonViewSupport svs) {
75 77
        this.fvs = fvs;
76 78
        this.svs = svs;
79
        this.mdiFrame = frame;
77 80
    }
78 81

  
79 82
    /**
......
157 160
                    svs.setWidth(sv, ((Integer) evt.getNewValue()).intValue());
158 161
                } else if (evt.getPropertyName().equals("title")) {
159 162
                    svs.setTitle(sv, (String) evt.getNewValue());
163
                    mdiFrame.changeMenuName(new String[]{"ventana", (String) evt.getOldValue()}, (String) evt.getNewValue(), (PluginClassLoader) getClass().getClassLoader());
160 164
                }
161 165
            }else{
162 166
                if (evt.getPropertyName().equals("x")) {
......
169 173
                    fvs.setWidth(view, ((Integer) evt.getNewValue()).intValue());
170 174
                } else if (evt.getPropertyName().equals("title")) {
171 175
                    fvs.setTitle(view, (String) evt.getNewValue());
176
                    mdiFrame.changeMenuName(new String[]{"ventana", (String) evt.getOldValue()}, (String) evt.getNewValue(), (PluginClassLoader) getClass().getClassLoader());
172 177
                }
173 178
            }
174 179

  
trunk/libraries/libCorePlugin/src/com/iver/core/mdiManager/ViewStackSupport.java
75 75
		vistas.add(v);
76 76
		ViewInfo vi = vis.getViewInfo(v);
77 77
		int id = vi.getId();
78
		final Menu m = new Menu();
78
		Menu m = new Menu();
79 79
		m.setActionCommand(""+id);
80 80
		m.setTooltip("activa la ventana");
81 81
		m.setText("ventana/"+vi.getTitle());

Also available in: Unified diff