|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JPanel | +--org.jogre.awt.MessageComponent
Little message component which can be used in several ways. These include boardcast message (all clients recieve messages), room messages (only users at a room/table) will recieve it and private message between 2 people.
Inner classes inherited from class javax.swing.JPanel |
JPanel.AccessibleJPanel |
Inner classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Inner classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent |
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
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 | |
MessageComponent(int height)
Constructor for a message component. |
Method Summary | |
void |
receiveMessage(String messageFrom,
String message)
Receives a message from the server. |
void |
setConnection(String usernameFrom,
Socket socket)
Set the connection of this message component using a Socket and also the username of the person who is sending messages from this component. |
void |
setEnabled(boolean enabled)
Sets the enabled status of component and message input box. |
void |
setRoom(int room)
Sets a room so that the message will go to a specified room. |
void |
setUsernameTo(String usernameTo)
Set the username to of this component (not required if the component is in broadcast mode). |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUIClassID, paramString, updateUI |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MessageComponent(int height)
height
- Hieght of the message component in rows.Method Detail |
public void setConnection(String usernameFrom, Socket socket)
usernameFrom
- socket
- public void setEnabled(boolean enabled)
setEnabled
in class JComponent
Component.setEnabled(boolean)
public void setUsernameTo(String usernameTo)
usernameTo
- public void setRoom(int room)
room
- public void receiveMessage(String messageFrom, String message)
messageFrom
- Who the message is from.message
- Text of the message.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |