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

com.extjs.gxt.ui.client.widget.toolbar.SplitToolItem Maven / Gradle / Ivy

There is a newer version: 2.3.1-gwt22
Show newest version
/*
 * Ext GWT - Ext for GWT
 * Copyright(c) 2007, 2008, Ext JS, LLC.
 * [email protected]
 * 
 * http://extjs.com/license
 */
package com.extjs.gxt.ui.client.widget.toolbar;

import com.extjs.gxt.ui.client.Events;
import com.extjs.gxt.ui.client.event.ComponentEvent;
import com.extjs.gxt.ui.client.event.Listener;
import com.extjs.gxt.ui.client.widget.button.SplitButton;

/**
 * A split button tool item.
 * 
 * 
Events:
* *
ArrowClick : ToolBarEvent(toolBar, item, event)
*
Fires when this button's arrow is clicked.
*
    *
  • component : this
  • *
  • item : the menu
  • *
  • event : the dom event
  • *
*
*/ public class SplitToolItem extends TextToolItem { protected SplitButton splitButton; /** * Creates a new split button item. */ public SplitToolItem() { splitButton = new SplitButton(); initComponent(); } /** * Creates a new split tool item. * * @param text the item's text */ public SplitToolItem(String text) { splitButton = new SplitButton(text); initComponent(); } protected void initComponent() { button = splitButton; splitButton.addListener(Events.ArrowClick, new Listener() { public void handleEvent(ComponentEvent ce) { onArrowClick(ce); } }); } protected void onArrowClick(ComponentEvent ce) { ce.component = this; fireEvent(Events.ArrowClick, ce); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy