moveUpButton.addActionListener(pageActionListener);
moveUpButton.setIcon(new ImageIcon(this.getClass().getResource("/images/up.png")));
moveUpButton.setActionCommand(PagesWorker.MOVE_UP);
moveUpButton.setText(GettextResource.gettext(config.getI18nResourceBundle(),"Move Up"));
moveUpButton.setToolTipText(GettextResource.gettext(config.getI18nResourceBundle(),"Move up selected pages")+" "+GettextResource.gettext(config.getI18nResourceBundle(),"(Alt+ArrowUp)"));
moveUpButton.addKeyListener(new EnterDoClickListener(moveUpButton));
moveUpButton.setAlignmentX(Component.CENTER_ALIGNMENT);
addButtonToButtonPanel(moveUpButton);
//move down button
moveDownButton = new JButton();
moveDownButton.addActionListener(pageActionListener);
moveDownButton.setIcon(new ImageIcon(this.getClass().getResource("/images/down.png")));
moveDownButton.setActionCommand(PagesWorker.MOVE_DOWN);
moveDownButton.setMargin(new Insets(2, 2, 2, 2));
moveDownButton.setText(GettextResource.gettext(config.getI18nResourceBundle(),"Move Down"));
moveDownButton.setToolTipText(GettextResource.gettext(config.getI18nResourceBundle(),"Move down selected pages")+" "+GettextResource.gettext(config.getI18nResourceBundle(),"(Alt+ArrowDown)"));
moveDownButton.addKeyListener(new EnterDoClickListener(moveDownButton));
moveDownButton.setAlignmentX(Component.CENTER_ALIGNMENT);
addButtonToButtonPanel(moveDownButton);
//delete button
removeButton = new JButton();
removeButton.addActionListener(pageActionListener);
removeButton.setIcon(new ImageIcon(this.getClass().getResource("/images/remove.png")));
removeButton.setActionCommand(PagesWorker.REMOVE);
removeButton.setMargin(new Insets(2, 2, 2, 2));
removeButton.setText(GettextResource.gettext(config.getI18nResourceBundle(),"Delete"));
removeButton.setToolTipText(GettextResource.gettext(config.getI18nResourceBundle(),"Delete selected pages")+" "+GettextResource.gettext(config.getI18nResourceBundle(),"(Canc)"));
removeButton.addKeyListener(new EnterDoClickListener(removeButton));
removeButton.setAlignmentX(Component.CENTER_ALIGNMENT);
addButtonToButtonPanel(removeButton);
//undelete button
if(drawDeletedItems){
undeleteButton = new JButton();
undeleteButton.addActionListener(pageActionListener);
undeleteButton.setIcon(new ImageIcon(this.getClass().getResource("/images/remove.png")));
undeleteButton.setActionCommand(PagesWorker.UNDELETE);
undeleteButton.setMargin(new Insets(2, 2, 2, 2));
undeleteButton.setText(GettextResource.gettext(config.getI18nResourceBundle(),"Undelete"));
undeleteButton.setToolTipText(GettextResource.gettext(config.getI18nResourceBundle(),"Undelete selected pages")+" "+GettextResource.gettext(config.getI18nResourceBundle(),"(Ctrl+Z)"));
undeleteButton.addKeyListener(new EnterDoClickListener(undeleteButton));
undeleteButton.setAlignmentX(Component.CENTER_ALIGNMENT);
addButtonToButtonPanel(undeleteButton);
}
//rotate button
rotateButton = new JButton();
rotateButton.addActionListener(pageActionListener);
rotateButton.setIcon(new ImageIcon(this.getClass().getResource("/images/clockwise.png")));
rotateButton.setActionCommand(PagesWorker.ROTATE_CLOCK);
rotateButton.setMargin(new Insets(2, 2, 2, 2));
rotateButton.setText(GettextResource.gettext(config.getI18nResourceBundle(),"Rotate right"));
rotateButton.setToolTipText(GettextResource.gettext(config.getI18nResourceBundle(),"Rotate clockwise selected pages")+" "+GettextResource.gettext(config.getI18nResourceBundle(),"(Alt+ArrowRight)"));
rotateButton.addKeyListener(new EnterDoClickListener(rotateButton));
rotateButton.setAlignmentX(Component.CENTER_ALIGNMENT);
addButtonToButtonPanel(rotateButton);
//rotate button
rotateAntiButton = new JButton();
rotateAntiButton.addActionListener(pageActionListener);
rotateAntiButton.setIcon(new ImageIcon(this.getClass().getResource("/images/anticlockwise.png")));
rotateAntiButton.setActionCommand(PagesWorker.ROTATE_ANTICLOCK);
rotateAntiButton.setMargin(new Insets(2, 2, 2, 2));
rotateAntiButton.setText(GettextResource.gettext(config.getI18nResourceBundle(),"Rotate left"));
rotateAntiButton.setToolTipText(GettextResource.gettext(config.getI18nResourceBundle(),"Rotate anticlockwise selected pages")+" "+GettextResource.gettext(config.getI18nResourceBundle(),"(Alt+ArrowLeft)"));
rotateAntiButton.addKeyListener(new EnterDoClickListener(rotateAntiButton));
rotateAntiButton.setAlignmentX(Component.CENTER_ALIGNMENT);
addButtonToButtonPanel(rotateAntiButton);
//reverse button
reverseButton = new JButton();
reverseButton.addActionListener(pageActionListener);
reverseButton.setIcon(new ImageIcon(this.getClass().getResource("/images/reverse.png")));
reverseButton.setActionCommand(PagesWorker.REVERSE);
reverseButton.setMargin(new Insets(2, 2, 2, 2));
reverseButton.setText(GettextResource.gettext(config.getI18nResourceBundle(),"Reverse"));
reverseButton.setToolTipText(GettextResource.gettext(config.getI18nResourceBundle(),"Reverse pages order"));
reverseButton.addKeyListener(new EnterDoClickListener(reverseButton));
reverseButton.setAlignmentX(Component.CENTER_ALIGNMENT);
addButtonToButtonPanel(reverseButton);
}