TavernerPOS - Source Code
Clone:
git clone http://www.librarysmith.co.uk/tavernerPOS
viewgit/viewgit/inc/functions.php:49 Function create_function() is deprecated [8192]Add option to allow blank buttons defined by a '-' as the menu item name. These are set as invisible when the MenuItemView is rendered and allow for creating column layouts using the Sort Order field
Filename
src/com/floreantpos/ui/views/order/MenuItemView.java
src/com/floreantpos/ui/views/order/SelectionView.java
diff --git a/src/com/floreantpos/ui/views/order/MenuItemView.java b/src/com/floreantpos/ui/views/order/MenuItemView.java
old mode 100644
new mode 100755
index 46d2e96..8c8a46f
--- a/src/com/floreantpos/ui/views/order/MenuItemView.java
+++ b/src/com/floreantpos/ui/views/order/MenuItemView.java
@@ -74,7 +74,7 @@ public class MenuItemView extends SelectionView {
MenuItem menuItem = (MenuItem) item;
ItemButton itemButton = new ItemButton(menuItem);
menuItemButtonMap.put(menuItem.getId(), itemButton);
-
+
return itemButton;
}
@@ -136,6 +136,7 @@ public class MenuItemView extends SelectionView {
setText("<html><body><center>" + menuItem.getName() + "</center></body></html>"); //$NON-NLS-1$ //$NON-NLS-2$
}
+
if(menuItem.getButtonColor() != null) {
setBackground(new Color(menuItem.getButtonColor()));
}
@@ -144,6 +145,9 @@ public class MenuItemView extends SelectionView {
}
setPreferredSize(new Dimension(BUTTON_SIZE, BUTTON_SIZE));
+
+ if (menuItem.getName().equals("-")) this.setVisible(false);
+
addActionListener(this);
}
diff --git a/src/com/floreantpos/ui/views/order/SelectionView.java b/src/com/floreantpos/ui/views/order/SelectionView.java
old mode 100644
new mode 100755
- Details
- Last Updated: Monday, 04 April 2016 02:04
- Hits: 39551440