TavernerPOS - Source Code
Clone:
git clone http://www.librarysmith.co.uk/tavernerPOS
package com.floreantpos.bo.actions;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.Icon;
import javax.swing.JTabbedPane;
import com.floreantpos.bo.ui.BackOfficeWindow;
import com.floreantpos.bo.ui.explorer.ModifierExplorer;
public class ModifierExplorerAction extends AbstractAction {
public ModifierExplorerAction() {
super(com.floreantpos.POSConstants.MENU_MODIFIERS);
}
public ModifierExplorerAction(String name) {
super(name);
}
public ModifierExplorerAction(String name, Icon icon) {
super(name, icon);
}
public void actionPerformed(ActionEvent e) {
BackOfficeWindow backOfficeWindow = com.floreantpos.util.POSUtil.getBackOfficeWindow();
JTabbedPane tabbedPane;
ModifierExplorer modifier;
tabbedPane = backOfficeWindow.getTabbedPane();
int index = tabbedPane.indexOfTab(com.floreantpos.POSConstants.MODIFIER_EXPLORER);
if (index == -1) {
modifier = new ModifierExplorer();
tabbedPane.addTab(com.floreantpos.POSConstants.MODIFIER_EXPLORER, modifier);
}
else {
modifier = (ModifierExplorer) tabbedPane.getComponentAt(index);
}
tabbedPane.setSelectedComponent(modifier);
}
}
- Details
- Last Updated: Monday, 04 April 2016 02:04
- Hits: 36112242