Package com.cedarsoft.spring.rcp.jide

Source Code of com.cedarsoft.spring.rcp.jide.JideMenuFactory

package com.cedarsoft.spring.rcp.jide;

import com.jidesoft.swing.JideMenu;
import com.jidesoft.swing.JidePopupMenu;
import org.springframework.richclient.factory.DefaultMenuFactory;

import javax.swing.JMenu;
import javax.swing.JPopupMenu;

/**
*
*/
public class JideMenuFactory extends DefaultMenuFactory {
  private int preferredPopupHorizontalAlignment = JideMenu.LEFT;

  public void setPreferredPopupHorizontalAlignment( int alignment ) {
    this.preferredPopupHorizontalAlignment = alignment;
  }

  @Override
  public JPopupMenu createPopupMenu() {
    return new JidePopupMenu();
  }

  @Override
  public JMenu createMenu() {
    JideMenu menu = new JideMenu();
    menu.setPreferredPopupHorizontalAlignment( preferredPopupHorizontalAlignment );
    return menu;
  }
}
TOP

Related Classes of com.cedarsoft.spring.rcp.jide.JideMenuFactory

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.