|
|||||||||
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 | +--java.awt.Window | +--java.awt.Frame | +--javax.swing.JFrame | +--JavaQuest.Client.CClientFrame
the Main Class CClientFrame is the GUI for the Client of the sophisticated JavaQuest
Inner classes inherited from class javax.swing.JFrame |
javax.swing.JFrame.AccessibleJFrame |
Inner classes inherited from class java.awt.Frame |
java.awt.Frame.AccessibleAWTFrame |
Inner classes inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.AWTTreeLock |
Field Summary | |
private java.awt.BorderLayout |
borderLayoutFrame
border-Layout for the Frame |
private java.awt.BorderLayout |
borderLayoutMap
borderLayout for the Map |
private CClientMenuBar |
clientMenuBar
menu-bar of the frame |
private java.awt.GridBagLayout |
gridBagLayoutInventory
gridBagLayout for the Inventory-Lists and the buttons (Activate, Deactivate) |
private java.awt.GridBagLayout |
gridBagLayoutRight
gridBagLayout for the right side of Frame (East) |
private javax.swing.JButton |
jButtonActivate
Button for Activate Items |
private javax.swing.JButton |
jButtonDeactivate
Button for Deactivate Items |
private javax.swing.JButton |
jButtonEnd
Button for EndTurn |
protected CClientInventory |
jComboBoxInventory
inactive-inventory-box |
protected CClientInventory |
jComboBoxInventoryActive
active-inventory-box |
private javax.swing.JLabel |
jLabelAttack
label for AttackCubes |
private javax.swing.JLabel |
jLabelDefense
label for DefenseCubes |
private javax.swing.JLabel |
jLabelLife
label for vital force |
private javax.swing.JLabel |
jLabelMoveability
label for Moveability |
private java.awt.event.MouseEvent |
JListEvent
event-variable for a mouse-event in the Lists |
private javax.swing.JPanel |
jPanelActionValues
a Panel for the Action-Values (Moveability, Attack, Defense) |
private javax.swing.JPanel |
jPanelInfo
a Panel for the InfoField |
private javax.swing.JPanel |
jPanelInventory
a Panel for the Inventory-Lists |
private javax.swing.JPanel |
jPanelInventoryActive
a Panel for the Inventory Active |
private javax.swing.JPanel |
jPanelInventoryInactive
a Panel for the Inventory Inactive |
private javax.swing.JPanel |
jPanelMap
a Panel for the Map |
private javax.swing.JPanel |
jPanelRight
a Panel for the right side of the Frame |
private javax.swing.JPanel |
jPanelStrengthValues
a Panel for the Strength-Values (Labels and TextFields for Moveability, ...) |
private javax.swing.JProgressBar |
jProgressBarRemainingTime
ProgressBar for Remaining Time |
private javax.swing.JProgressBar |
jProgressBarVitalForce
ProgressBar for VitalForce |
private javax.swing.JScrollPane |
jScrollPaneMap
scrollpane of the map |
private javax.swing.JTextField |
jTextFieldAttack
the TextField for AttackCubes |
private javax.swing.JTextField |
jTextFieldDefense
the TextField for DefenseCubes |
private CClientInfo |
jTextfieldInfo
info-field |
private javax.swing.JTextField |
jTextFieldMoveability
the TextField for Movability |
private boolean |
m_bConnected
boolean to check if connected |
private boolean |
m_bDoubleClick
boolean to check for double-click |
private CMap |
m_CMap
reference-variable of the server-map |
private int |
m_iResolutionX
screen-resolution-width |
private int |
m_iResolutionY
screen-resolution-height |
private double |
m_Multiply
is the multiplier for the screen-resolution |
protected CClient |
m_oClient
reference to call the server-methods |
private CClientMap |
m_oClientMap
reference-variable of the clientmap |
private IClientListenerProxy |
m_oClientProxy
proxy for the client/server communication |
private CClientDoubleClickTime |
m_oDoubleClickTime
implements the DoubleClick-Event |
(package private) static CUtils |
m_oUtil
Objekt fuer allg. |
private java.lang.String |
m_sAlias
alias of the player |
private java.lang.String |
m_sConfigFile
Name of the Configfile |
private java.lang.String |
m_sName
name of the player |
private CClientMessages |
message
reference to class CClientMessages for standard DialogBoxes |
private CClientRemainingTime |
remainingTime
reference for the Thread for remainingTime |
Fields inherited from class javax.swing.JFrame |
accessibleContext, defaultCloseOperation, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Frame |
base, CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, frameSerializedDataVersion, HAND_CURSOR, icon, ICONIFIED, mbManagement, menuBar, MOVE_CURSOR, N_RESIZE_CURSOR, nameCounter, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, ownedWindows, resizable, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, serialVersionUID, state, SW_RESIZE_CURSOR, TEXT_CURSOR, title, W_RESIZE_CURSOR, WAIT_CURSOR, weakThis |
Fields inherited from class java.awt.Window |
active, dbg, focusMgr, inputContext, inputContextLock, OPENED, ownedWindowList, warningString, windowListener, windowSerializedDataVersion |
Fields inherited from class java.awt.Container |
component, containerListener, containerSerializedDataVersion, dispatcher, layoutMgr, listeningBoundsChildren, listeningChildren, maxSize, ncomponents, printing, printingThreads |
Fields inherited from class java.awt.Component |
actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, changeSupport, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, graphicsConfig, hasFocus, height, hierarchyBoundsListener, hierarchyBoundsListenerK, hierarchyListener, hierarchyListenerK, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, metrics, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, name, nameExplicitlySet, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, privateKey, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowClosingException, windowListenerK, x, y |
Fields inherited from interface javax.swing.WindowConstants |
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
CClientFrame(double _Multiply)
Constructor |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent event)
actionPerformed method to handle the action-event (e.g. |
boolean |
beginTurn(int iTimer)
begin the Turn activate buttons, menuitems, etc. |
protected void |
clearInfoField()
clearInfoField set the text to 'null' on the info-field |
protected void |
deactivateGui()
deactivateGui method to disable the gui-elements |
private void |
doConnect(CClientConnect connect)
doConnect try to connect to the Server |
protected void |
doDisconnect()
Disconnect to disconnect the Client |
boolean |
endTurn()
end the Turn of the Client and sets the JProgressBar to Zero deactivate buttons, menuitems, etc. |
protected void |
gameover()
gameover setHeroDied from Server (Critical Error located from Server) |
protected java.lang.String |
getActiveItemName(int _iSelected)
getActivateItemName to get the Name of the selected Item in the List ActiveItems |
CClientMap |
getClientMap()
getClientMap Get the Map CClientMap |
protected boolean |
getConnectionFinished()
getConnectionFinished tests, if Client is connected and connection is completed |
protected boolean |
getDoubleClick()
getDoubleClick |
protected java.lang.String |
getInactiveItemName(int _iSelected)
getInactivateItemName to get the Name of the selected Item in the List InactiveItems |
private javax.swing.JPanel |
getListPanel(CClientDNDList list,
java.lang.String labelName,
javax.swing.DefaultListModel listModel)
getListPanel a convenience method used for positioning of the ListBox and the Label. |
private void |
HandleException(java.lang.String strMethod,
java.lang.String strException)
HandleException Additional Method. |
protected boolean |
isTimeRemaining()
isTimeRemaining check if the client has time left |
private void |
jbInit()
Component initialization |
private void |
jButtonActivate_mouseEntered(java.awt.event.MouseEvent event)
jButtonActivate_mouseEntered method from MouseEvent Interface |
private void |
jButtonDeactivate_mouseEntered(java.awt.event.MouseEvent event)
jButtonDeactivate_mouseEntered method from MouseEvent Interface |
private void |
jButtonEnd_mouseEntered(java.awt.event.MouseEvent event)
jButtonEnd_mouseEntered method from MouseEvent Interface |
private void |
jList_mouseClicked()
jList_mouseClicked - Updates the Information Textfield gets the DoubleClick and activates/deactivates Items |
private void |
jProgressBarRemainingTime_stateChanged(javax.swing.event.ChangeEvent event)
jProgressBarRemainingTime_stateChanged Handle the Timeprogressbar sets the Foreground Color in dependence of the value |
void |
ListRefresh(javax.swing.DefaultListModel modelAct,
javax.swing.DefaultListModel modelInact)
ListRefresh Refresh both Lists with activate and deactivate Items |
protected void |
processWindowEvent(java.awt.event.WindowEvent event)
processWindowEvent - Overridden so we can exit when window is closed |
protected void |
setAttackValue(int _iAttackValue)
setAttackValue method to set the attack-value of the player |
protected void |
setDefenseValue(int _iDefenseValue)
setDefenseValue method to set the defense-value of the player |
private void |
SetHeroName(java.lang.String _Name)
SetHeroName set the name of the hero |
protected void |
setInfoField(java.lang.String _sMessage,
boolean _bServer)
setInfoField method to write on the info-field |
protected void |
setMessageDialog(java.lang.String _sMessage)
setMessageDialog setMessageDialog from Server (Critical Error located from Server) |
protected void |
setMoveabilityValue(int _iMoveabilityValue)
setMoveabilityValue method to set the movability-value of the player |
protected void |
setVitalForce(int _iVitalForce)
setVitelForce method to set the health-value of the player sets the Foreground Color in dependence of the value |
protected void |
shutdown()
shutdown method to shutdown the clients if the server is going down |
protected void |
SingleClick()
SingleClick method to handle the SingleClick gets the Infos on Items |
Methods inherited from class javax.swing.JFrame |
addImpl, createRootPane, createRootPaneException, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, processKeyEvent, remove, setContentPane, setDefaultCloseOperation, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
Methods inherited from class java.awt.Frame |
|
Methods inherited from class java.awt.Window |
addOwnedWindow, addWindowListener, adjustListeningChildren, applyResourceBundle, applyResourceBundle, connectOwnedWindow, dispatchEventImpl, dispose, eventEnabled, getFocusOwner, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, hide, isActive, isShowing, nextFocus, ownedInit, pack, postEvent, postWindowEvent, preProcessKeyEvent, processEvent, removeOwnedWindow, removeWindowListener, resetGC, setCursor, setFocusOwner, setWarningString, show, toBack, toFront, transferFocus |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, applyOrientation, checkGD, countComponents, createChildHierarchyEvents, createHierarchyEvents, deliverEvent, dispatchEventToSelf, doLayout, findComponentAt, findComponentAt, findComponentAt, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getMouseEventTarget, getPreferredSize, getWindow, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPaint, lightweightPrint, list, list, locate, minimumSize, numListening, paint, paintComponents, paintHeavyweightComponents, postsOldMouseEvents, preferredSize, print, printComponents, printHeavyweightComponents, processContainerEvent, proxyEnableEvents, proxyRequestFocus, remove, removeAll, removeContainerListener, setFont, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, checkWindowClosingException, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleIndexInParent, getAccessibleStateSet, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkitImpl, getTreeLock, getWidth, getWindowForObject, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isRecursivelyVisible, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseMotionEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
getFont, postEvent |
Field Detail |
private java.lang.String m_sConfigFile
private double m_Multiply
private CClientDoubleClickTime m_oDoubleClickTime
private boolean m_bDoubleClick
private boolean m_bConnected
private CClientMessages message
private java.awt.event.MouseEvent JListEvent
private CClientMenuBar clientMenuBar
private java.awt.BorderLayout borderLayoutFrame
private java.awt.GridBagLayout gridBagLayoutRight
private java.awt.GridBagLayout gridBagLayoutInventory
private java.awt.BorderLayout borderLayoutMap
private javax.swing.JPanel jPanelRight
private javax.swing.JPanel jPanelMap
private javax.swing.JPanel jPanelInventory
private javax.swing.JPanel jPanelInventoryInactive
private javax.swing.JPanel jPanelInventoryActive
private javax.swing.JPanel jPanelInfo
private javax.swing.JPanel jPanelActionValues
private javax.swing.JPanel jPanelStrengthValues
private javax.swing.JLabel jLabelLife
private javax.swing.JLabel jLabelMoveability
private javax.swing.JLabel jLabelAttack
private javax.swing.JLabel jLabelDefense
private javax.swing.JTextField jTextFieldMoveability
private javax.swing.JTextField jTextFieldAttack
private javax.swing.JTextField jTextFieldDefense
private javax.swing.JProgressBar jProgressBarVitalForce
private javax.swing.JProgressBar jProgressBarRemainingTime
private javax.swing.JButton jButtonEnd
private javax.swing.JButton jButtonActivate
private javax.swing.JButton jButtonDeactivate
protected CClientInventory jComboBoxInventory
protected CClientInventory jComboBoxInventoryActive
private CClientInfo jTextfieldInfo
private javax.swing.JScrollPane jScrollPaneMap
private CClientMap m_oClientMap
private CClientRemainingTime remainingTime
protected CClient m_oClient
private int m_iResolutionX
private int m_iResolutionY
private IClientListenerProxy m_oClientProxy
private CMap m_CMap
private java.lang.String m_sName
private java.lang.String m_sAlias
static CUtils m_oUtil
Constructor Detail |
public CClientFrame(double _Multiply)
double
- _Multiply for scaling the screen-resolutionCClient
,
CClientConnect
,
CClientHelp
,
CClientInfo
,
CClientInventory
,
CClientMap
,
CClientMenuBar
,
CClientMessages
,
CClientMessagesThread
,
CClientRemainingTime
,
CUtils
Method Detail |
private void jbInit() throws java.lang.Exception
java.lang.Exception
- Exceptionprotected void processWindowEvent(java.awt.event.WindowEvent event)
processWindowEvent
in class javax.swing.JFrame
WindowEvent
- eventprivate void jList_mouseClicked()
protected boolean getDoubleClick()
protected void SingleClick()
public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed
in interface java.awt.event.ActionListener
ActionEvent
- eventprivate void doConnect(CClientConnect connect)
CClientConnect
- connectprotected void doDisconnect()
private void HandleException(java.lang.String strMethod, java.lang.String strException)
String
- strMethod - The Name of the method, where the Exception occursString
- strException - The Exceptionstringpublic boolean beginTurn(int iTimer)
int
- iTimerpublic boolean endTurn()
protected void gameover()
protected void shutdown()
protected void deactivateGui()
private javax.swing.JPanel getListPanel(CClientDNDList list, java.lang.String labelName, javax.swing.DefaultListModel listModel)
CClientDNDList
- list - the special DND ListString
- labelName - the heading for the listDefaultListModel
- listModel - model for the listpublic void ListRefresh(javax.swing.DefaultListModel modelAct, javax.swing.DefaultListModel modelInact)
DefaultListModel
- modelAct the Model with active ItemsDefaultListModel
- modelInact the Model with deactivate Itemsprotected java.lang.String getActiveItemName(int _iSelected)
int
- _iSelectedprotected java.lang.String getInactiveItemName(int _iSelected)
int
- _iSelectedprotected boolean getConnectionFinished()
protected boolean isTimeRemaining()
public CClientMap getClientMap()
CClientMap
private void SetHeroName(java.lang.String _Name)
String
- _Name - name of the heroprotected void setMoveabilityValue(int _iMoveabilityValue)
int
- _iMoveabilityValueprotected void setAttackValue(int _iAttackValue)
int
- _iAttackValueprotected void setDefenseValue(int _iDefenseValue)
int
- _iDefenseValueprotected void setVitalForce(int _iVitalForce)
int
- _iVitalForceprivate void jProgressBarRemainingTime_stateChanged(javax.swing.event.ChangeEvent event)
ChangeEvent
- eventprotected void setMessageDialog(java.lang.String _sMessage)
String
- _sMessage - text to viewprotected void setInfoField(java.lang.String _sMessage, boolean _bServer)
String
- _sMessage - text to viewboolean
- _bServer (true -> red / false -> black)protected void clearInfoField()
private void jButtonEnd_mouseEntered(java.awt.event.MouseEvent event)
MouseEvent
- eventprivate void jButtonActivate_mouseEntered(java.awt.event.MouseEvent event)
MouseEvent
- eventprivate void jButtonDeactivate_mouseEntered(java.awt.event.MouseEvent event)
MouseEvent
- event
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |