Created
February 21, 2019 23:09
-
-
Save branflake2267/671f57ac6dbb3498c936a47d5db9147a to your computer and use it in GitHub Desktop.
GXT 4.0.x custom split button appearance barebones.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* override the other class selectors in this gss */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.google.gwt.core.client.EntryPoint; | |
| import com.google.gwt.user.client.ui.RootPanel; | |
| import com.sencha.gxt.cell.core.client.SplitButtonCell; | |
| import com.sencha.gxt.widget.core.client.button.SplitButton; | |
| import com.sencha.gxt.widget.core.client.container.FlowLayoutContainer; | |
| import com.sencha.gxt.widget.core.client.menu.Menu; | |
| import com.sencha.gxt.widget.core.client.menu.MenuItem; | |
| public class CustomSplitButtonExample implements EntryPoint { | |
| private SplitButton button1; | |
| @Override | |
| public void onModuleLoad() { | |
| Menu menu1 = new Menu(); | |
| menu1.add(new MenuItem("Menu 1")); | |
| menu1.add(new MenuItem("Menu 2")); | |
| menu1.add(new MenuItem("Menu 3")); | |
| // Override the appearance, the look and behavior | |
| CustomCss3ButtonCellAppearance<String> customAppearance = new CustomCss3ButtonCellAppearance(); | |
| SplitButtonCell cell1 = new SplitButtonCell(customAppearance); | |
| button1 = new SplitButton(cell1, "Button"); | |
| button1.setMenu(menu1); | |
| FlowLayoutContainer flc = new FlowLayoutContainer(); | |
| flc.add(button1); | |
| RootPanel.get().add(flc); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is how you could override the appearance of the split button.