Package: com.multiversesocial.hyperview
Class: com.multiversesocial.hyperview.HyperKeyboard
Source: src/com/multiversesocial/hyperview/HyperKeyboard.java

HyperKeyboard

HyperView V3.2 — class
version V3.2 class

Summary

Source file: HyperKeyboard.java

Hierarchy

Extends: Component

Implements: Runnable, HyperConstants, GetStringConstants, KeyboardConstants, ThreadReport

Referenced HyperView classes

Media files used

Declaration & members

public class HyperKeyboard extends Component implements Runnable, HyperConstants, GetStringConstants, KeyboardConstants, ThreadReport

Declared in src/com/multiversesocial/hyperview/HyperKeyboard.java, lines 7–327. 21 field(s), 1 constructor(s), 10 method(s). Every member has an anchor you can link to (e.g. HyperKeyboard.html#<id>).

Fields (21)

DeclarationValue / initializerDescriptionSource
int cnumNo comment in source; assigned in HyperKeyboard().line 23
HyperView curViewNo comment in source; assigned in HyperKeyboard(), setView(), destroy(); used in run(), anyKey().line 10
int errorCountNo comment in source; assigned in HyperKeyboard().line 22
int flagsNo comment in source; assigned in HyperKeyboard().line 21
volatile Gadget focusNo comment in source; assigned in HyperKeyboard(), destroy(); used in run().line 13
volatile int intBufferIndexNo comment in source; assigned in HyperKeyboard(), run(); used in flush(), anyKey().line 15
int iterationNo comment in source; assigned in HyperKeyboard(), run(), getRunInfo(); used in start().line 30
Thread keyboardTaskNo comment in source; assigned in start(), stop(), destroy(); used in run().line 14
HyperKeyEvent[] keyMsgNo comment in source; assigned in HyperKeyboard().line 17
int kzNo comment in source; assigned in HyperKeyboard().line 18
long lastRunIf Report Bit setline 27
volatile int mainBufferIndexNo comment in source; assigned in HyperKeyboard(), run(), flush(); used in anyKey().line 16
long nowTime of the last HyperView() run of this Threadline 25
RunInfo runInfoNo comment in source; assigned in HyperKeyboard(); used in start(), stop(), run(), getRunInfo(), anyKey().line 11
long runLagNo comment in source; assigned in HyperKeyboard(), getRunInfo().line 26
long startTimeNo comment in source; assigned in HyperKeyboard(), getRunInfo().line 28
String tmpStringNo comment in source; assigned in HyperKeyboard().line 12
int tz= 0No comment in source; assigned in HyperKeyboard().line 23
int waitTimeNo comment in source; assigned in HyperKeyboard(), getRunInfo().line 29
int xNo comment in source; assigned in HyperKeyboard().line 20
int yNo comment in source; assigned in HyperKeyboard().line 19

Constructors (1)

SignatureDescriptionSource
HyperKeyboard(HyperView tcurView)14 statement(s); calls super(); creates RunInfo, HyperKeyEvent.line 32

Methods (10)

SignatureDescriptionSource
public void anyKey()6 statement(s); calls curView.statusText(), wait(); creates Object.line 296
public synchronized void destroy()5 statement(s); calls notifyAll().line 169
public void flush()Sets mainBufferIndex = intBufferIndex.line 164
public RunInfo getRunInfo()7 statement(s).
Implements ThreadReport.getRunInfo()
line 182
static boolean isNumeric(int keyCode)Returns (keyCode > 47 && keyCode < 58) ? true : false.line 192
static boolean isPrintable(int keyCode)1 statement(s).line 197
public void run()4 statement(s); calls Thread.currentThread(), focus.inKey(), curView.inKey(), notifyAll(), wait() ….
Implements Runnable.run()
line 90
public void setView(HyperView tView)1 statement(s); calls notifyAll().line 57
public synchronized void start()6 statement(s); calls tTask.interrupt(), keyboardTask.setName(), keyboardTask.start(); creates Thread.line 66
public synchronized void stop()4 statement(s); calls tTask.interrupt().line 79

Inherited members

Non-private members inherited from HyperView superclasses and not overridden or hidden here.

Also inherits the public/protected members of java.awt.Component (JDK class) and its superclasses.

Examples

Real usage taken from elsewhere in the HyperView 3.2 source (file and line shown; source path src/com/multiversesocial/hyperview/).

instantiation — HyperView.java, line 1218

 1218  keyboard = new HyperKeyboard(this);

static call — HyperEditBuffer.java, line 212

  212  if(HyperKeyboard.isPrintable(keyCode))
  213  {

declaration — AWTEventManager.java, line 82

   82  HyperKeyboard keyboard = tView.keyboard;

Applet hosting

Delivers keyboard input to a ported applet: the keyboard thread calls inKey() on the focused gadget, then curView.inKey() for keys left in the buffer (lines 105–123). See the Applet Migration Guide.

Hits--