All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.extjs.gxt.ui.client.widget.menu.SeparatorMenuItem Maven / Gradle / Ivy

There is a newer version: 2.3.1-gwt22
Show newest version
/*
 * Sencha GXT 2.3.0 - Sencha for GWT
 * Copyright(c) 2007-2013, Sencha, Inc.
 * [email protected]
 * 
 * http://www.sencha.com/products/gxt/license/
 */
 package com.extjs.gxt.ui.client.widget.menu;

import com.extjs.gxt.ui.client.core.XDOM;
import com.google.gwt.user.client.Element;

/**
 * Adds a separator bar to a menu, used to divide logical groups of menu items.
 */
public class SeparatorMenuItem extends Item {

  /**
   * Creates a new separator menu item.
   */
  public SeparatorMenuItem() {
    hideOnClick = false;
  }

  @Override
  protected void onRender(Element target, int index) {
    Element span = XDOM.create(" ");
    setElement(span, target, index);
    fly(target).addStyleName("x-menu-sep-li");
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy