// Undo
JButton undoButton = getButtonFactory().createJToolbarButton("UndoButton");
undoButton.setDisabledIcon
(new ImageIcon
(getClass().getResource(resources.getString("UndoButton.disabledIcon"))));
DropDownComponent undoDD = new DropDownComponent(undoButton);
undoDD.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 2));
undoDD.setMaximumSize(new Dimension(44, 25));
undoDD.setPreferredSize(new Dimension(44, 25));
tb.add(undoDD);
UndoPopUpMenuModel undoModel = new UndoPopUpMenuModel(undoDD
.getPopupMenu(), historyBrowserInterface);
undoDD.getPopupMenu().setModel(undoModel);
// Redo
JButton redoButton = getButtonFactory().createJToolbarButton("RedoButton");
redoButton.setDisabledIcon
(new ImageIcon
(getClass().getResource(resources.getString("RedoButton.disabledIcon"))));
DropDownComponent redoDD = new DropDownComponent(redoButton);
redoDD.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 2));
redoDD.setMaximumSize(new Dimension(44, 25));
redoDD.setPreferredSize(new Dimension(44, 25));
tb.add(redoDD);
RedoPopUpMenuModel redoModel = new RedoPopUpMenuModel(redoDD
.getPopupMenu(), historyBrowserInterface);
redoDD.getPopupMenu().setModel(redoModel);
// Capturing click toggle button
JToggleButton capturingClickButton = getButtonFactory()
.createJToolbarToggleButton("CapturingClickButton");
capturingClickButton.setEnabled(true);