.build();
}
public static MenuItem buildCustomMenu() {
Menus menu = MenuFactory
.newTopLevelCustomMenu( new MenuFactory.CustomMenuBuilder() {
@Override
public void push( MenuFactory.CustomMenuBuilder element ) {
}
@Override
public MenuItem build() {
return new MenuCustom<Widget>() {
@Override
public Widget build() {
return new ContextDropdownButton() {
{
displayCaret( false );
setRightDropdown( true );
setIcon( IconType.COG );
setSize( MINI );
add( new NavLink( "Business view" ) {{
setIconSize( IconSize.SMALL );
}} );
add( new NavLink( "Tech view" ) {{
setIcon( IconType.ASTERISK );
setIconSize( IconSize.SMALL );
}} );
add( new Divider() );
add( new NavLink( "Breadbrumb Explorer" ) {{
setIcon( IconType.OK );
setIconSize( IconSize.SMALL );
}} );
add( new NavLink( "Tree explorer" ) {{
}} );
add( new Divider() );
add( new NavLink( "Flatten folders" ) {{
}} );
add( new NavLink( "Compact empty folders" ) {{
}} );
add( new NavLink( "Display hidden files" ) {{
}} );
}
};
}
@Override
public boolean isEnabled() {
return false;
}
@Override
public void setEnabled( boolean enabled ) {
}
@Override
public String getContributionPoint() {
return null;
}
@Override
public String getCaption() {
return null;
}
@Override
public MenuPosition getPosition() {
return null;
}
@Override
public int getOrder() {
return 0;
}
@Override
public void addEnabledStateChangeListener( EnabledStateChangeListener listener ) {
}
@Override
public String getSignatureId() {
return null;
}
@Override
public Collection<String> getRoles() {
return null;
}
@Override
public Collection<String> getTraits() {
return null;
}
};
}
} ).endMenu().build();
return menu.getItems().get( 0 );
}