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

HyperMenu

HyperView V3.2 — class
version V3.2 class

Summary

Add mutual exclusion logic A stub to hold the Item Strings (allocated later) Menu Pane is the area inside which the Text Filed items are.

Source file: HyperMenu.java

Hierarchy

Extends: Gadget

Implements: MenuConstants

Referenced HyperView classes

Media files used

Declaration & members

public class HyperMenu extends Gadget implements MenuConstants

Declared in src/com/multiversesocial/hyperview/HyperMenu.java, lines 8–373. 38 field(s), 2 constructor(s), 9 method(s). Every member has an anchor you can link to (e.g. HyperMenu.html#<id>).

Fields (38)

DeclarationValue / initializerDescriptionSource
int borderWidth= 4No comment in source; used in HyperMenu().line 26
int curFont= 2Tod: remove implicit values and move to constuctorline 20
int curItem= -1Which MenuItem Mouse is over (if)line 16
HyperView curViewNo comment in source; assigned in HyperMenu(), destroy(); used in setExcludeBit(), addMenuItem(), deleteMenuItem(), setExcludeMask(), unSetExcludeMask() ….line 10
int[] exclude= {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…No comment in source; assigned in setExcludeBit(), setExcludeMask(), unSetExcludeMask().line 60
String[] excludeTextNo comment in source; assigned in deleteMenuItem().line 46
int ID= 0A stub to hold the Item Strings (allocated later)line 19
int[] itemFlags= {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…No comment in source; name appears in 1 other source file(s): HyperSelectItem.line 68
Font itemFontThe Font for MenuItemsline 36
int itemHeight= 12Maximum string becomes tring Width for allline 23
String[] itemText= new String[32]No comment in source; assigned in HyperMenu(), addMenuItem(), deleteMenuItem().line 17
int itemTextXOff= 3No comment in source; used in HyperMenu().line 24
int itemTextYOff= 18No comment in source; assigned in HyperMenu().line 25
int itemWidth= 0Width in pixels of the ItemStringline 22
int maxTextWidth= 0No comment in source; assigned in HyperMenu().line 21
int maxWidth= 0The Maximum Filed width (Becomes MenuPanel Size)line 76
Dispatch[] menuDispatch= new Dispatch[MAX_MENU_ITEMS]No comment in source; assigned in setDispatchBlock(), setDispatch().line 14
Gadget[] menuGads= new Gadget[MAX_GADGETS]No comment in source; not referenced by name in this type’s methods.line 15
int menuPaneHeightNo comment in source; assigned in HyperMenu().line 34
int menuPaneWidthNo comment in source; assigned in HyperMenu().line 33
int menuPaneXMenu Pane is the area inside which the Text Filed items are. While the Mouse is in the MenuPane items can be selected.line 29
int menuPaneX2No comment in source; assigned in HyperMenu().line 31
int menuPaneYNo comment in source; assigned in HyperMenu().line 30
int menuPaneY2No comment in source; assigned in HyperMenu().line 32
Color[] paletteNo comment in source; assigned in HyperMenu().line 48
Graphics screenGraphicsNo comment in source; assigned in HyperMenu(), destroy().line 11
String[] selectTextNo comment in source; assigned in deleteMenuItem().line 45
String[] shortCutKeyFor KeyBoard shortcutline 47
HyperMenu[] subMenuNo comment in source; not referenced by name in this type’s methods.line 51
int subMenuFlag= 032 Bits 1 for each Menu item (32 Max)line 50
Font titleFontThe Font for hyperMenu(); Titleline 35
int titleHeight= 0No comment in source; assigned in HyperMenu().line 39
int titleLength= 0width/height of Title String in Pixelsline 38
int titleWidth= 0No comment in source; assigned in HyperMenu().line 40
int totalItems= 0How many Item Fields are in Menuline 13
static int totalMenus= 0ie: this + any SubMenuline 12
int zoomDepth= 1Yup, Im going to make the hyperMenus() Zoom in.line 78
int zoomStep= 1Should be a nice touch.line 79

Constructors (2)

SignatureDescriptionSource
HyperMenu()1 statement(s); calls super().line 81
HyperMenu(HyperView tView, String tName, String[] itemStrings, int tFlags)100 statement(s); calls super(), tName.length(), screenGraphics.getFontMetrics(titleFont).stringWidth(), screenGraphics.getFontMetrics(), screenGraphics.getFontMetrics(titleFont).getHeight() …; creates Color.line 87

Methods (9)

SignatureDescriptionSource
static { … }Implicit default constructor generated by the compiler (not written in the source).implicit
public void addMenuItem(String tStr, int tNum)1 statement(s); calls this.curView.setMenu(), curView.errOut().line 264
public void deleteMenuItem(int tNum)1 statement(s); calls curView.setMenu(), this.curView.errOut().line 289
public void destroy()2 statement(s).line 367
public int setDispatch(Dispatch d, int tNum)2 statement(s); calls curView.statusText().line 352
public void setDispatchBlock(Dispatch[] D)Sets this.menuDispatch = D.line 347
public void setExcludeBit(int tNum, int BitNumber)1 statement(s); calls curView.errOut().line 252
public void setExcludeMask(int tNum, int bitMask)3 statement(s); calls curView.errOut().line 319
public void unSetExcludeMask(int tNum, int bitMask)2 statement(s); calls this.curView.errOut().line 334

Inherited members

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

From Gadget (35 fields, 26 methods)

Fields: backColor, conFont, cursorGraphics, cursorHeight, cursorImage, cursorName, cursorScrollXOffset, cursorScrollYOffset, cursorWidth, cursorX, cursorY, displayInfo, fGColor, flipCount, font, gadFlags, gadFlags2, gadNumber, keyboard, lastCursorX, lastCursorY, lineColorA, lineColorB, lineColorC, locked, method, parentTitlebar, stringHeight, stringWidth, stringX, stringY, tc1, tc2, tc3, tc4

Methods: addDispatch(Dispatch), allKeyMsgENA(), cleanUp(), drawCursor(), drawOutline(), drawOutline2(), getForeground(), inKey(), inString(String), isEnabled(), isShowing(), isVisible(), keyReleaseENA(), keyTypedENA(), layerDisable(), layerENA(), makeBitmap(Font), mouseWheelMoved(MouseWheelEvent), onMouseOver(), setEnabled(boolean), setForeground(int), setName(String), setVisible(boolean), toFront(), toString(), updateText()

From Gob (75 fields, 27 methods)

Fields: asynchGraphics1, asynchGraphics2, asynchImage1, asynchImage2, attachedGob, attachedIndex, backGround, bgMemoryImageSource, bGPen, bottomMax, clickX, clickY, collisionClassMask, curAttached, currentZIndex, depth, destGob, destGraphics, dispatchHoldCount, drawMode, dX, dY, dZ, fgMemoryImageSource, fGPen, gobEventFlags, gobFlags, gobFlags2, gobGadIndex, gobHx, gobHy, gobHz, gobName, gobNumber, gobOrbitRadius, gobPic, gobTypeFlags, graphics, gravity, height, heightBase, hSin, hyp, infoString, lClickX, lClickY, leftMin, maxAttached, memoryCounter, moveNum, mX, mX2, mY, mY2, oldX, oldY, oldZ, orbitGob, rightMax, scanLine, selectGraphics, selectImage, selectTime, spline, tint, topMin, totalAttached, width, widthBase, wSin, x, x2, y, y2, z

Methods: addGob(Gob), addSpline(Spline), center(), collisionOff(), collisionOn(), disable(), enable(), getGraphics(), getImageFromJar(String), getPixels(), gobZInit(), initScanline(int), inView(), isInView(), isMemoryImageSource(), move(int, int), move(Gadget, int, int), moveNext(), onClick(), onDisplay(), onRelease(), printGobAttr(HyperView), printScanLines(), remGob(), remove(), zENA(), zOff()

From Linkable (7 fields, 1 methods)

Fields: attachment, index, linkFlags, name, next, parentList, prev

Methods: inList()

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 878

  878  menuBase =  new HyperMenu(this," HyperMenu() ",menuOpts,0);

declaration — Dispatch.java, line 71

   71  HyperMenu menuBase;

instantiation — SplineEditPane.java, line 40

   40  HyperMenu tMenu  =  new HyperMenu(curView," Spline Menu ",splineMenuOpts,0);
Hits--