this.workbenchToolbar.addButton( toolbarButton );
this.messageToolbarButtons.add( toolbarButton );
ToolbarSeparator separator = new ToolbarSeparator();
this.workbenchToolbar.addItem( separator );
Menu menu = new Menu();
MenuItem item = UIFactory.createMenuItem( ActionRegistry.REPLY.get() );
item.setText( TextProvider.get().toolbar_manager_to_all() );
menu.addItem( item );
item = UIFactory.createMenuItem( ActionRegistry.REPLY_ALL.get() );
item.setText( TextProvider.get().toolbar_manager_to_originator() );
menu.addItem( item );
ToolbarMenuButton menuButton = UIFactory.createToolbarMenuButton( ActionRegistry.REPLY.get() );
menuButton.setMenu( menu );
this.workbenchToolbar.addButton( menuButton );
this.messageToolbarButtons.add( menuButton );
separator = new ToolbarSeparator();
this.messageToolbarItems.add( separator );
this.messageToolbarButtons.add( toolbarButton );
toolbarButton = UIFactory.createToolbarButton( ActionRegistry.FORWARD.get() );
this.workbenchToolbar.addButton( toolbarButton );
this.messageToolbarButtons.add( toolbarButton );
toolbarButton = UIFactory.createToolbarButton( ActionRegistry.DELETE_MESSAGES.get() );
this.workbenchToolbar.addButton( toolbarButton );
this.messageToolbarButtons.add( toolbarButton );
this.markToolbarButton = new ToolbarButton( TextProvider.get().toolbar_manager_mark() );
this.markToolbarButton.setIcon( ImageProvider.MSG_MARK );
this.workbenchToolbar.addButton( this.markToolbarButton );
this.messageToolbarButtons.add( this.markToolbarButton );
menu = new Menu();
menu.addItem( UIFactory.createMenuItem( ActionRegistry.MARK_AS_READ.get() ) );
menu.addItem( UIFactory.createMenuItem( ActionRegistry.MARK_AS_UNREAD.get() ) );
menu.addItem( new Separator() );
menu.addItem( UIFactory.createMenuItem( ActionRegistry.MARK_AS_DELETED.get() ) );
menu.addItem( UIFactory.createMenuItem( ActionRegistry.MARK_AS_UNDELETED.get() ) );
this.markToolbarButton.setMenu( menu );
separator = new ToolbarSeparator();
this.workbenchToolbar.addItem( separator );
this.messageToolbarItems.add( separator );
toolbarButton = UIFactory.createToolbarButton( ActionRegistry.PRINT_MESSAGE.get() );
this.workbenchToolbar.addButton( toolbarButton );
this.messageToolbarButtons.add( toolbarButton );
toolbarButton = UIFactory.createToolbarButton( ActionRegistry.SHOW_MESSAGE_SOURCE.get() );
this.workbenchToolbar.addButton( toolbarButton );
this.messageToolbarButtons.add( toolbarButton );
disableMessageToolbar( true );
// add contact toolbar buttons
this.contactToolbarButtons = new ArrayList<ToolbarButton>();
toolbarButton = UIFactory.createToolbarButton( ActionRegistry.ADD_CONTACT.get() );
this.workbenchToolbar.addButton( toolbarButton );
this.contactToolbarButtons.add( toolbarButton );
toolbarButton = UIFactory.createToolbarButton( ActionRegistry.NEW_MESSAGE_FOR_CONTACT.get() );
this.workbenchToolbar.addButton( toolbarButton );
this.contactToolbarButtons.add( toolbarButton );
toolbarButton = UIFactory.createToolbarButton( ActionRegistry.EDIT_CONTACT.get() );
this.workbenchToolbar.addButton( toolbarButton );
this.contactToolbarButtons.add( toolbarButton );
toolbarButton = UIFactory.createToolbarButton( ActionRegistry.DELETE_CONTACT.get() );
this.workbenchToolbar.addButton( toolbarButton );
this.contactToolbarButtons.add( toolbarButton );
hideContactToolbarItems();
disableContactToolbar( true );
// common buttons
this.workbenchToolbar.addSeparator();
// Reading pane
menu = new Menu();
item = new MenuItem();
item.setText( TextProvider.get().actions_reading_pane_right() );
item.setIcon( ImageProvider.MSG_READING_PANE_RIGHT );
item.setStateId( String.valueOf( Preferences.READING_PANE_RIGHT ) );
item.addListener( ActionRegistry.READING_PANE.get() );
menu.addItem( item );
item = new MenuItem();
item.setText( TextProvider.get().actions_reading_pane_bottom() );
item.setIcon( ImageProvider.MSG_READING_PANE_BOTTOM );
item.setStateId( String.valueOf( Preferences.READING_PANE_BOTTOM ) );
item.addListener( ActionRegistry.READING_PANE.get() );
menu.addItem( item );
item = new MenuItem();
item.setText( TextProvider.get().actions_reading_pane_hide() );
item.setIcon( ImageProvider.MSG_READING_PANE_HIDE );
item.setStateId( String.valueOf( Preferences.READING_PANE_HIDE ) );
item.addListener( ActionRegistry.READING_PANE.get() );
menu.addItem( item );
menuButton = UIFactory.createToolbarMenuButton( ActionRegistry.READING_PANE.get() );
menuButton.setMenu( menu );
this.workbenchToolbar.addButton( menuButton );
this.workbenchToolbar.addButton( UIFactory.createToolbarButton( ActionRegistry.OPEN_PREFERENCES.get() ) );