|
JSettlers v1.0.6 API Built ${date} |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
java.applet.Applet
soc.client.SOCAccountClient
Applet/Standalone client for connecting to the SOCServer and making user accounts. If you want another connection port, you have to specify it as the "port" argument in the html source. If you run this as a stand-alone, you have to specify the port.
Nested Class Summary |
Nested classes inherited from class java.applet.Applet |
java.applet.Applet.AccessibleApplet |
Nested classes inherited from class java.awt.Panel |
java.awt.Panel.AccessibleAWTPanel |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
protected java.applet.AppletContext |
ac
|
protected java.awt.CardLayout |
cardLayout
|
protected boolean |
connected
|
protected java.awt.TextField |
email
|
protected java.lang.String |
emailAddress
the email address |
protected java.lang.Exception |
ex
|
protected java.lang.String |
host
|
protected java.io.DataInputStream |
in
|
protected java.awt.Label |
messageLabel
|
protected java.awt.TextField |
nick
|
protected java.lang.String |
nickname
the nickname |
protected java.io.DataOutputStream |
out
|
protected java.awt.TextField |
pass
|
protected java.awt.TextField |
pass2
|
protected java.lang.String |
password
the password |
protected java.lang.String |
password2
the second password |
protected int |
port
|
protected java.lang.Thread |
reader
|
protected java.net.Socket |
s
|
protected java.awt.TextField |
status
|
protected java.awt.Button |
submit
|
protected boolean |
submitLock
|
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
SOCAccountClient()
Create a SOCAccountClient connecting to localhost port 8880 |
|
SOCAccountClient(java.lang.String h,
int p)
Constructor for connecting to the specified host, on the specified port. |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
Handle mouse clicks and keyboard |
void |
connect()
Attempts to connect to the server. |
void |
destroy()
destroy the applet |
protected void |
disconnect()
disconnect from the net |
java.lang.String |
getAppletInfo()
applet info |
int |
getHexParameter(java.lang.String name)
Retrieve a parameter and translate to a hex value. |
protected void |
handleCHANNELS(SOCChannels mes)
handle the "list of channels" message |
protected void |
handleREJECTCONNECTION(SOCRejectConnection mes)
handle the "reject connection" message |
protected void |
handleSTATUSMESSAGE(SOCStatusMessage mes)
handle the "status message" message |
void |
init()
Initialize the applet |
protected void |
initVisualElements()
init the visual elements |
static void |
main(java.lang.String[] args)
for stand-alones |
boolean |
put(java.lang.String s)
write a message to the net |
void |
run()
continuously read from the net in a separate thread |
void |
treat(SOCMessage mes)
Treat the incoming messages |
static void |
usage()
for stand-alones |
Methods inherited from class java.applet.Applet |
getAccessibleContext, getAppletContext, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop |
Methods inherited from class java.awt.Panel |
addNotify |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.awt.TextField nick
protected java.awt.TextField pass
protected java.awt.TextField pass2
protected java.awt.TextField email
protected java.awt.TextField status
protected java.awt.Button submit
protected java.awt.Label messageLabel
protected java.applet.AppletContext ac
protected boolean submitLock
protected java.awt.CardLayout cardLayout
protected java.lang.String host
protected int port
protected java.net.Socket s
protected java.io.DataInputStream in
protected java.io.DataOutputStream out
protected java.lang.Thread reader
protected java.lang.Exception ex
protected boolean connected
protected java.lang.String nickname
protected java.lang.String password
protected java.lang.String password2
protected java.lang.String emailAddress
Constructor Detail |
public SOCAccountClient()
public SOCAccountClient(java.lang.String h, int p)
h
- hostp
- portMethod Detail |
protected void initVisualElements()
public int getHexParameter(java.lang.String name)
name
- a parameter name. null is ignored
public void init()
public void connect()
connected
for success or
failure.
java.lang.IllegalStateException
- if already connectedpublic void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public void run()
run
in interface java.lang.Runnable
public boolean put(java.lang.String s)
s
- the message
public void treat(SOCMessage mes)
mes
- the messageprotected void handleCHANNELS(SOCChannels mes)
mes
- the messageprotected void handleREJECTCONNECTION(SOCRejectConnection mes)
mes
- the messageprotected void handleSTATUSMESSAGE(SOCStatusMessage mes)
mes
- the messageprotected void disconnect()
public java.lang.String getAppletInfo()
public void destroy()
public static void usage()
public static void main(java.lang.String[] args)
|
JSettlers v1.0.6 API Built ${date} |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |