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.MenuItemExplorer;
public class ItemExplorerAction extends AbstractAction {
public ItemExplorerAction() {
super(com.floreantpos.POSConstants.MENU_ITEMS);
}
public ItemExplorerAction(String name) {
super(name);
}
public ItemExplorerAction(String name, Icon icon) {
super(name, icon);
}
public void actionPerformed(ActionEvent e) {
BackOfficeWindow backOfficeWindow = com.floreantpos.util.POSUtil.getBackOfficeWindow();
JTabbedPane tabbedPane;
MenuItemExplorer item;
tabbedPane = backOfficeWindow.getTabbedPane();
int index = tabbedPane.indexOfTab(com.floreantpos.POSConstants.ITEM_EXPLORER);
if (index == -1) {
item = new MenuItemExplorer();
tabbedPane.addTab(com.floreantpos.POSConstants.ITEM_EXPLORER, item);
}
else {
item = (MenuItemExplorer) tabbedPane.getComponentAt(index);
}
tabbedPane.setSelectedComponent(item);
}
}
- Details
- Last Updated: Monday, 04 April 2016 02:04
- Hits: 35748216