Revision 32879

View differences:

trunk/libraries/libCorePlugin/src/com/iver/core/mdiManager/NewSkin.java
45 45
import java.awt.Container;
46 46
import java.awt.Cursor;
47 47
import java.awt.Dimension;
48
import java.awt.Frame;
48 49
import java.awt.Graphics;
49 50
import java.awt.KeyEventDispatcher;
50 51
import java.awt.Point;
......
67 68
import javax.swing.JFrame;
68 69
import javax.swing.JInternalFrame;
69 70
import javax.swing.JLayeredPane;
71
import javax.swing.JMenuBar;
70 72
import javax.swing.JPopupMenu;
71 73
import javax.swing.KeyStroke;
72 74
import javax.swing.event.InternalFrameEvent;
......
1006 1008
			}
1007 1009
	      }
1008 1010
	    }
1011

  
1012
	/**
1013
	 * We need this in order to addMenuBar to windows, for example
1014
	 * @return
1015
	 */
1016
	public void addJMenuBarToWindow(IWindow w, JMenuBar menuBar) {
1017
		Component c = fws.getFrame(w);
1018
		if (c instanceof JDialog) {
1019
			((JDialog) c).setJMenuBar(menuBar);
1020
		}
1021
		if (c instanceof JInternalFrame) {
1022
			((JInternalFrame) c).setJMenuBar(menuBar);
1023
		}
1024
	}
1009 1025
}

Also available in: Unified diff