TavernerPOS - Source Code

Clone: 

git clone http://www.librarysmith.co.uk/tavernerPOS

 

Index » tavernerPOS : Commitdiff 06403c

Automatically Launch Login Screen on LogOut

Matt Smith [15-10-31 17:58]
Automatically Launch Login Screen on LogOut
diff --git a/.svn/wc.db-journal b/.svn/wc.db-journal
deleted file mode 100644
index e69de29..0000000
diff --git a/src/com/floreantpos/main/Application.java b/src/com/floreantpos/main/Application.java
index 9d4eca7..a8995fd 100755
--- a/src/com/floreantpos/main/Application.java
+++ b/src/com/floreantpos/main/Application.java
@@ -422,6 +422,7 @@ public class Application {
 				}
 			}
 		RootView.getInstance().showView(LoginView.VIEW_NAME);
+		RootView.getInstance().getLoginScreen().getPasswordScreen().doLogin();
 	}

 	public static User getCurrentUser() {
diff --git a/src/com/floreantpos/ui/views/LoginPasswordEntryView.java b/src/com/floreantpos/ui/views/LoginPasswordEntryView.java
old mode 100644
new mode 100755
index 967b4fc..2b69975
--- a/src/com/floreantpos/ui/views/LoginPasswordEntryView.java
+++ b/src/com/floreantpos/ui/views/LoginPasswordEntryView.java
@@ -46,7 +46,7 @@ import com.floreantpos.util.UserNotFoundException;
  *
  * @author MShahriar
  */
-class LoginPasswordEntryView extends JPanel {
+public class LoginPasswordEntryView extends JPanel {

 	/** Creates new form PasswordScreen */
 	LoginPasswordEntryView() {
diff --git a/src/com/floreantpos/ui/views/LoginView.java b/src/com/floreantpos/ui/views/LoginView.java
old mode 100644
new mode 100755
index 48e99a0..1884078
--- a/src/com/floreantpos/ui/views/LoginView.java
+++ b/src/com/floreantpos/ui/views/LoginView.java
@@ -27,7 +27,7 @@ import com.floreantpos.ui.views.order.ViewPanel;
 public class LoginView extends ViewPanel {
 	public final static String VIEW_NAME = "LOGIN_VIEW"; //$NON-NLS-1$

-	private LoginPasswordEntryView passwordScreen;
+	public static LoginPasswordEntryView passwordScreen;

 	/** Creates new form LoginScreen */
 	public LoginView() {
@@ -66,4 +66,8 @@ public class LoginView extends ViewPanel {
 	public String getViewName() {
 		return VIEW_NAME;
 	}
+
+	public LoginPasswordEntryView getPasswordScreen() {
+		return passwordScreen;
+	}
 }
diff --git a/src/com/floreantpos/ui/views/order/RootView.java b/src/com/floreantpos/ui/views/order/RootView.java
old mode 100644
new mode 100755
index f60c688..ccd5990
--- a/src/com/floreantpos/ui/views/order/RootView.java
+++ b/src/com/floreantpos/ui/views/order/RootView.java
@@ -18,7 +18,7 @@ public class RootView extends com.floreantpos.swing.TransparentPanel {

 	private HeaderPanel headerPanel = new HeaderPanel();
 	private JPanel contentPanel = new JPanel(cards);
-	private LoginView loginScreen;
+	public LoginView loginScreen;
 	private SettleTicketDialog paymentView;

 	private Map<String, IView> views = new HashMap<String, IView>();

Add comment
These comments are moderated so so won't be published until reviewed.