|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object triptracker.client.net.MapSocketAdapter triptracker.client.map.ui.LoginForm
public class LoginForm
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface triptracker.client.net.MapSocketListener |
---|
MapSocketListener.RouteState |
Field Summary | |
---|---|
protected String |
name
|
protected static int |
nameCount
|
Constructor Summary | |
---|---|
LoginForm(MapClientGui view,
MapSocket model)
The constructor creates a JPanel for the login information, and registers as a form on the view . |
|
LoginForm(MapClientGui view,
String name,
MapSocket model)
The constructor creates a JPanel for the login information, and registers as a form on the manager . |
Method Summary | |
---|---|
void |
addLoginBtnListener(ActionListener listener)
Register a listener on the login button. |
void |
connectionUpdate(ConnectionState state)
Invoked when the connection state of the underlying socket has changed. |
JComponent |
getFormComponent()
Returns the root JComponent object that this form operates on. |
String |
getName()
Returns the name of this form. |
String |
getPassword()
|
String |
getUsername()
|
void |
refreshView()
Invoked by FormManager right before this form is displayed. |
void |
setMessage(String msg)
|
void |
socketError(IOException e)
Invoked when a socket error is encountered. This generally means that the socket has been closed or at least disconnected from the server. |
Methods inherited from class triptracker.client.net.MapSocketAdapter |
---|
coordReceived, coordsReceived, invalidMessage, routeList, routeReceived, routeUpdate, userReceived, usersReceived |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static int nameCount
protected final String name
Constructor Detail |
---|
public LoginForm(MapClientGui view, MapSocket model)
view
.
view
- parent JComponent form managermodel
- map modelpublic LoginForm(MapClientGui view, String name, MapSocket model)
manager
. The form name should be unique for
the given form manager.
view
- JComponent form managername
- unique form nameMethod Detail |
---|
public void addLoginBtnListener(ActionListener listener)
listener
- public JComponent getFormComponent()
Form
JComponent
object that this form operates on.
getFormComponent
in interface Form
FormManager
public String getName()
Form
FormManager
.
getName
in interface Form
FormManager
public String getUsername()
public String getPassword()
public void setMessage(String msg)
public void socketError(IOException e)
socketError
in interface SocketListener
socketError
in class MapSocketAdapter
e
- the error that triggered the eventpublic void connectionUpdate(ConnectionState state)
connectionUpdate
in interface SocketListener
connectionUpdate
in class MapSocketAdapter
state
- new connection statepublic void refreshView()
Form
FormManager
right before this form is displayed.
refreshView
in interface Form
FormManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |