/** prints line from jTextField and also notifies the GraphicalUI of it */ private void submitLine() { String input = jTextField.getText(); if (input.length() > 0) { println(input); jTextField.setText(""); } ui.recieveAction(EventFlag.CHAT_STRING, input); }
/** * Notifies the GraphicalUI that a CardButton has been pressed * * @param card the card of the CardButton that was pressed * @param evt */ public void cardButtonHitActionPerformed(Card card, java.awt.event.ActionEvent evt) { ui.recieveAction(EventFlag.SELECTION_BUTTONS, EventFlag.CARD_BUTTON, card); }
/** * Notifies the GraphicalUI that the game restart button was pressed * * @param evt */ private void jButtonWinnersActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jButtonWinnersActionPerformed ui.recieveAction(EventFlag.RESTART_BUTTON, null); } // GEN-LAST:event_jButtonWinnersActionPerformed
/** * Notifies the GraphicalUI that the hit button has been pressed * * @param evt */ private void selectorSWHitActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_selectorSWHitActionPerformed // can't hit if no selections! ui.recieveAction(EventFlag.SELECTION_BUTTONS, EventFlag.HIT_BUTTON, null); } // GEN-LAST:event_selectorSWHitActionPerformed
/** * Notifies the GraphicalUI that the pass button has been pressed * * @param evt */ private void selectorSWPassActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_selectorSWPassActionPerformed ui.recieveAction(EventFlag.SELECTION_BUTTONS, EventFlag.PASS_BUTTON, null); } // GEN-LAST:event_selectorSWPassActionPerformed
/** * Notifies the GraphicalUI that the continue button has been pressed * * @param evt */ private void continueSWButtonActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_continueSWButtonActionPerformed ui.recieveAction(EventFlag.PRETURN_CONTINUE_BUTTON, null); } // GEN-LAST:event_continueSWButtonActionPerformed