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

HyperFrame

HyperView V3.2 — class
version V3.2 class

Summary

(C) 2000 Tony Swain All rights reserved. Tony's simple license you are free to use this for any legal purpose.

Source file: HyperFrame.java

Hierarchy

Extends: JFrame

Implements: OrangeStub, OrangeContext, Runnable, AWTEventListener

Referenced HyperView classes

Media files used

Declaration & members

public class HyperFrame extends JFrame implements OrangeStub, OrangeContext, Runnable, AWTEventListener

Declared in src/com/multiversesocial/hyperview/HyperFrame.java, lines 13–886. 20 field(s), 6 constructor(s), 45 method(s). Every member has an anchor you can link to (e.g. HyperFrame.html#<id>).

Fields (20)

DeclarationValue / initializerDescriptionSource
private String[] argsNo comment in source; assigned in makeOrange(); used in HyperFrame(), parseArgs(), eventDispatched().line 23
int contextFlags= 0No comment in source; assigned in setFlags(); used in getFlags().line 34
static String fileSeparator= System.getProperty("file.separator")No comment in source; assigned in HyperFrame(); name appears in 8 other source file(s): Directory, Enfora2218WhackButton, Externalizer, HyperFileList ….line 31
int heightNo comment in source; used in makeOrange(), eventDispatched().line 20
Thread hyperFrameTaskNo comment in source; assigned in start(), halt(); used in run().line 22
int idNo comment in source; assigned in HyperFrame(); used in getID().line 18
static int instances= 0No comment in source; assigned in makeOrange(), eventDispatched().line 16
static long lastRun= 0No comment in source; assigned in eventDispatched(); name appears in 12 other source file(s): AWTEventManager, CollisionManager, HyperConnectionHandler, HyperExternalConnectionHandler ….line 32
Menu menuNo comment in source; not referenced by name in this type’s methods.line 29
MenuBar menuBarNo comment in source; not referenced by name in this type’s methods.line 28
String nameNo comment in source; assigned in HyperFrame(), makeOrange(); used in getParameter(), getAudioClip(), getImage(), play(), getOrange().line 24
static long now= 0No comment in source; assigned in eventDispatched().line 33
Orange orangeNo comment in source; assigned in makeOrange(); used in init(), eventDispatched(), run(), orangeResize(), initComponentBase() ….line 26
Dimension orangeSizeNo comment in source; assigned in eventDispatched().line 27
static final String PARAMETER_PROPERTY_PREFIX= "parameter." (constant)No comment in source; used in parseArgs(), getParameter().line 17
boolean peerMenuEna= falseNo comment in source; used in makeOrange().line 25
Properties propertiesNo comment in source; assigned in makeOrange().line 21
String startDirNo comment in source; assigned in HyperFrame().line 30
Hashtable streamMap= new java.util.Hashtable()No comment in source; assigned in setStream(); used in expunge(), getStream().line 35
int widthNo comment in source; used in makeOrange(), eventDispatched().line 19

Constructors (6)

SignatureDescriptionSource
public HyperFrame(STDInputHandler tStdIn, int tID, String[] args, int tWidth, int tHeight)6 statement(s); calls super(), System.getProperty(), makeOrange(); creates ServerViewMain.line 37
public HyperFrame(Orange tOrange, int tID, String[] args, int tWidth, int tHeight)5 statement(s); calls super(), System.getProperty(), makeOrange().line 46
public HyperFrame(Object tObject, int tID, Orange tOrange, String[] args)7 statement(s); calls super(), System.getProperty(), setTitle(), makeOrange().line 54
public HyperFrame(Object tObject, Orange tOrange, int tID, int tWidth, int tHeight)7 statement(s); calls super(), System.getProperty(), setTitle(), makeOrange().line 64
public HyperFrame(Orange tOrange, int tID, String[] args)6 statement(s); calls super(), System.getProperty(), setTitle(), makeOrange().line 74
public HyperFrame(Orange tOrange, int tID, int tWidth, int tHeight)5 statement(s); calls super(), System.getProperty(), setTitle(), makeOrange().line 83

Methods (45)

SignatureDescriptionSource
static { … }Implicit default constructor generated by the compiler (not written in the source).implicit
public void eventDispatched(AWTEvent tAWTEvent)8 statement(s); calls tAWTEvent.getID(), mouse.notifyAll(), System.currentTimeMillis(), keyboard.notifyAll(), ((HyperView)orange).mouseWheelMoved() …; creates Dimension, HyperFrame.
Implements AWTEventListener.eventDispatched()
line 216
public void expunge()3 statement(s); calls showStatus(), orange.expunge(), streamMap.clear().
Implements OrangeContext.expunge()
line 718
public AudioClip getAudioClip(URL tURL)2 statement(s); calls orange.getAudioClip().
Implements OrangeContext.getAudioClip()
line 733
public AudioClip getAudioClip(URL url, String name)2 statement(s); calls orange.getAudioClip().
Implements OrangeContext.getAudioClip()
line 742
public URL getCodeBase()2 statement(s); calls System.getProperty(), e.printStackTrace(); creates URL.
Implements OrangeStub.getCodeBase()
line 575
public Component getComponent(String tString)Returns null.
Implements OrangeContext.getComponent()
line 664
public HyperLinkedList getComponentList()Returns null.
Implements OrangeContext.getComponentList()
line 669
public URL getDocumentBase()In HyperFrame.java
Implements OrangeStub.getDocumentBase()
line 558
public int getFlags()2 statement(s); calls orange.getFlags().
Implements OrangeContext.getFlags()
line 640
public int getID()Returns id.
Implements OrangeContext.getID()
line 626
public Image getImage(URL tURL)Returns Toolkit.getDefaultToolkit().getImage(tURL).
Implements OrangeContext.getImage()
line 683
public Image getImage(URL url, String name)1 statement(s); calls Toolkit.getDefaultToolkit().getImage(), Toolkit.getDefaultToolkit(); creates URL.
Implements OrangeContext.getImage()
line 751
public HyperLinkedList getInputStream(String tString)Returns null.
Implements OrangeContext.getInputStream()
line 688
public Orange getOrange(String name)2 statement(s); calls name.equals().
Implements OrangeContext.getOrange()
line 880
public OrangeContext getOrangeContext()Returns this.
Implements OrangeStub.getOrangeContext()
line 605
public Enumeration<Orange> getOranges()3 statement(s); calls oranges.add(), oranges.elements(); creates Vector<Orange>.
Implements OrangeContext.getOranges()
line 873
public String getParameter(String name)Returns System.getProperty(PARAMETER_PROPERTY_PREFIX + name.toLowerCase()).
Implements OrangeStub.getParameter()
line 600
public String[][] getParameterInfo()Returns new String[0][0].
Implements OrangeContext.getParameterInfo()
line 764
public Runnable getRunnable()Returns null.
Implements OrangeContext.getRunnable()
line 659
public AudioClip getSound(URL url)2 statement(s); calls orange.getAudioClip().
Implements OrangeContext.getSound()
line 674
public InputStream getStream(String key)3 statement(s); calls streamMap.containsKey(), streamMap.get(), orange.getStream().
Implements OrangeContext.getStream()
line 854
public Iterator<String> getStreamKeys()2 statement(s); calls keys.iterator(); creates Vector<String>.
Implements OrangeContext.getStreamKeys()
line 867
public Thread getThread()Returns Thread.currentThread().
Implements OrangeContext.getThread()
line 654
public synchronized void halt()5 statement(s); calls tThread.interrupt(), Toolkit.getDefaultToolkit().removeAWTEventListener(), Toolkit.getDefaultToolkit().
Implements OrangeContext.halt()
line 464
public void init()Add this method to HyperFrame.java (OrangeContext requires it)
Implements OrangeContext.init()
line 91
public void initComponentBase()2 statement(s); calls showStatus(), orange.initComponentBase().
Implements OrangeStub.initComponentBase()
line 615
public boolean isActive()Returns true.
Implements OrangeStub.isActive()
line 553
private void makeOrange(STDInputHandler tHandler, Orange tOrange, int tID, String[] tArgs, int tWidth, int tHeight)38 statement(s); calls tOrange.setStub(), orange.getClass().getName(), orange.getClass(), System.getProperties(), properties.put() …; creates MenuBar, Menu, MenuItem.line 101
public void orangeResize(int tWidth, int tHeight)1 statement(s); calls orange.setSize().
Implements OrangeStub.orangeResize()
line 610
private static void parseArgs(String[] args, Properties tProperties)1 statement(s); calls arg.indexOf(), tProperties.put(), arg.toLowerCase(), arg.substring(0, ind).toLowerCase(), arg.substring().line 201
public void play(URL url)2 statement(s); calls getAudioClip(), clip.play().
Implements OrangeContext.play()
line 778
public void play(URL url, String name)2 statement(s); calls getAudioClip(), clip.play().
Implements OrangeContext.play()
line 787
protected void processEvent(AWTEvent evt)1 statement(s).
Overrides Window.processEvent()
line 453
public void run()14 statement(s); calls Thread.currentThread(), getToolkit().getSystemEventQueue(), getToolkit(), eventQue.peekEvent(), eventQue.getNextEvent() ….
Implements Runnable.run()
line 476
public void setFlags(int tInt)2 statement(s); calls orange.setFlags().
Implements OrangeContext.setFlags()
line 631
public void setInputStream(String key, InputStream tStream) throws IOException1 statement(s); calls setStream().
Implements OrangeContext.setInputStream()
line 693
public void setStream(String key, InputStream stream) throws IOException4 statement(s); calls streamMap.remove(), streamMap.put(), orange.setStream(); creates IOException, java.util.Hashtable.
Implements OrangeContext.setStream()
line 830
public void setStub(OrangeStub stub)1 statement(s); calls orange.setStub().
Implements OrangeContext.setStub()
line 770
public void showDocument(URL url)1 statement(s); calls showDocument().
Implements OrangeContext.showDocument()
line 796
public void showDocument(URL url, String target)4 statement(s); calls showStatus(), orange.showDocument(), java.awt.Desktop.isDesktopSupported(), java.awt.Desktop.getDesktop(), desktop.isSupported() ….
Implements OrangeContext.showDocument()
line 801
public void showDocument(URL tURL, String tBMLFileName, int tFlags)2 statement(s); calls showStatus(), Integer.toHexString(), orange.showDocument(), showDocument().
Implements OrangeContext.showDocument()
line 698
public void showFlags()1 statement(s); calls showStatus(), Integer.toHexString(), getFlags().
Implements OrangeContext.showFlags()
line 649
public void showStatus(String tStatus)2 statement(s); calls tStatus.endsWith().
Implements OrangeContext.showStatus()
line 711
public synchronized void start()2 statement(s); calls hyperFrameTask.start(); creates Thread.
Implements OrangeContext.start()
line 458

Inherited members

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

Also inherits the public/protected members of javax.swing.JFrame (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 6726

 6726  new HyperFrame( viewMain, tID,(String[])null, 640, 480 );

Applet hosting

The window and AppletStub replacement for a ported applet (which extends ViewMain). It calls setStub(), init() and start(), and its eventDispatched() feeds mouse events to HyperMouse and key events to HyperKeyboard (lines 187–293). See the Applet Migration Guide.

Hits--