A B C D E G H I L M N P R S T V

A

activateHUD(HUD) - Method in class net.tmachine.gpg.hue.HUDManager
Activates the HUD; since a HUD cannot be invisible and active, it is implicitly made visible at the same time; active HUDs receive input events, e.g mouse movement and keyboard presses.
activeColumnWidth - Variable in class net.tmachine.gpg.hue.HUDList
 
activeHUDGroupsStack - Variable in class net.tmachine.gpg.hue.HUDManager
 
addHUD(HUD) - Method in class net.tmachine.gpg.hue.HUDManager
Adds the HUD to the set of current HUDs, and sets the HUD's reference to it's parent manager to point to this instance
addHUDs(HUDManager) - Static method in class net.tmachine.gpg.hue.Demo
In this example program, simply adds some hard-coded HUDs; a typical editor would load classes from some form of config file or etc to dynamically include additional features.
addShape(Shape) - Method in class net.tmachine.gpg.hue.Document
Converts all added shapes to Area instances if they are not already, since Sun's 2D API was badly designed and prevents you from applying AffineTransforms to most shapes.
allHUDs - Variable in class net.tmachine.gpg.hue.HUDManager
 

B

BaseHUD - class net.tmachine.gpg.hue.BaseHUD.
Provides most of the common methods etc for HUD implementations Subclasses should set the "name" variable in their constructor.
BaseHUD() - Constructor for class net.tmachine.gpg.hue.BaseHUD
 
bounds - Variable in class net.tmachine.gpg.hue.ShapeShifter
 

C

ContextManager - class net.tmachine.gpg.hue.ContextManager.
All input for the viewport is directed to this class, enabling it to keep track of cursor position, current button and keystates, etc.
ContextManager() - Constructor for class net.tmachine.gpg.hue.ContextManager
 
context - Variable in class net.tmachine.gpg.hue.HUDManager
 
controlSurface - Variable in class net.tmachine.gpg.hue.ContextManager
 
creatingShape - Variable in class net.tmachine.gpg.hue.ShapeCreator
indicates that we are in the middle of a drag action that is creating a shape
currentDocument - Variable in class net.tmachine.gpg.hue.ContextManager
 

D

Demo - class net.tmachine.gpg.hue.Demo.
The automatically-run demo application that loads a few HUDs and lets you draw shapes etc
Demo() - Constructor for class net.tmachine.gpg.hue.Demo
 
Document - class net.tmachine.gpg.hue.Document.
 
Document() - Constructor for class net.tmachine.gpg.hue.Document
 
deActivateHUD(HUD) - Method in class net.tmachine.gpg.hue.HUDManager
De-activates the HUD, so that it gets NO input events, and cannot respond as a tool/control Inactive HUDs can still paint, if they are also visible.
display - Variable in class net.tmachine.gpg.hue.HUDManager
 

E

exitExclusiveActiveHUD() - Method in class net.tmachine.gpg.hue.HUDManager
Restores all the previously active HUDs to their active state

G

getActiveHUDs() - Method in class net.tmachine.gpg.hue.HUDManager
Only returns HUDs that are both active and visible (assumes that invisible HUDs, which cannot give feedback on what the user is doing, should not be counted active - but leaves them "isActive() == true" so that as soon as they are made visible again they will automatically become active)
getAllHUDs() - Method in class net.tmachine.gpg.hue.HUDManager
Fetches all HUDs, regardless of status
getAllShapes() - Method in class net.tmachine.gpg.hue.Document
 
getContext() - Method in class net.tmachine.gpg.hue.HUDManager
The context that HUDs can query to find out e.g the most recent cursor co-ordinates
getCursorPosition() - Method in class net.tmachine.gpg.hue.ContextManager
 
getDocument() - Method in class net.tmachine.gpg.hue.ContextManager
The Document is a simple MVC Model containing data on what shapes there are, where they are, etc; it has all the data that would be "saved" if there were a load/save feature in this demo!
getMaximumSize() - Method in class net.tmachine.gpg.hue.HUDList
 
getMinimumSize() - Method in class net.tmachine.gpg.hue.HUDList
Sun's Swing API does automatic dynamic sized layout - it needs this method to tell it how much space to allocate to this particular GUI element (the HUDList)
getName() - Method in class net.tmachine.gpg.hue.BaseHUD
 
getName() - Method in interface net.tmachine.gpg.hue.HUD
Each HUD should have a unique user-readable name; must be unique, since it is used as a key in Maps
getPreferredSize() - Method in class net.tmachine.gpg.hue.HUDList
 
getShapesAtPoint(int[]) - Method in class net.tmachine.gpg.hue.Document
 
getVisibleHUDs() - Method in class net.tmachine.gpg.hue.HUDManager
Fetches only HUDs that are visible, i.e are being painted to the main renderer

H

HUD - interface net.tmachine.gpg.hue.HUD.
The base type for all HUD implementations; contains the major callbacks needed by the heads-up-editing system.
HUDList - class net.tmachine.gpg.hue.HUDList.
Useful control that allows the user to hide/show any layer and also to activate / de-activate any layer; also displays name and status of all layers, and shows their paint order
HUDList(HUDManager) - Constructor for class net.tmachine.gpg.hue.HUDList
Requires a HUD manager so that it can retrieve the list of HUDs!
HUDManager - class net.tmachine.gpg.hue.HUDManager.
The main Model and Controller (in MVC terms) for managing the HUDs system.
HUDManager() - Constructor for class net.tmachine.gpg.hue.HUDManager
You MUST call setDisplayComponent before using this new instance
HUDManager - Variable in class net.tmachine.gpg.hue.MainRenderer
 
hideHUD(HUD) - Method in class net.tmachine.gpg.hue.HUDManager
Renders the supplied HUD invisible, i.e it doesn't participate in repaints
hudManager - Variable in class net.tmachine.gpg.hue.HUDList
 

I

inputListeningHUDs - Variable in class net.tmachine.gpg.hue.HUDManager
HUD instances that are currently listening for any input events
isActive - Variable in class net.tmachine.gpg.hue.BaseHUD
 
isActive(boolean) - Method in class net.tmachine.gpg.hue.BaseHUD
 
isActive() - Method in class net.tmachine.gpg.hue.BaseHUD
 
isActive(boolean) - Method in interface net.tmachine.gpg.hue.HUD
Used by the HUD-manager to inform the HUD it is no longer active, i.e.
isActive() - Method in interface net.tmachine.gpg.hue.HUD
Simply returns the value of the active flag
isVisible - Variable in class net.tmachine.gpg.hue.BaseHUD
 
isVisible(boolean) - Method in class net.tmachine.gpg.hue.BaseHUD
 
isVisible() - Method in class net.tmachine.gpg.hue.BaseHUD
 
isVisible(boolean) - Method in interface net.tmachine.gpg.hue.HUD
Used by the HUD-manager to inform this HUD when it has been made visible or hidden
isVisible() - Method in interface net.tmachine.gpg.hue.HUD
Simply returns the value of the visibility flag

L

lastx - Variable in class net.tmachine.gpg.hue.ShapeShifter2
Co-ords where a drag-translate was last updated (so we can work out how far to shift it)
lasty - Variable in class net.tmachine.gpg.hue.ShapeShifter2
Co-ords where a drag-translate was last updated (so we can work out how far to shift it)
list - Variable in class net.tmachine.gpg.hue.HUDList
 

M

MainRenderer - class net.tmachine.gpg.hue.MainRenderer.
A very simple main renderer that simply grabs a paint surface on every repaint (managed by Sun's windowing system, "Swing") and gets each visible HUD to paint to that surface in turn.
MainRenderer() - Constructor for class net.tmachine.gpg.hue.MainRenderer
Creates a renderer; you MUST call setManager() afterwards before using the renderer, otherwise it won't be able to get hold of any HUDs to render!
main(String[]) - Static method in class net.tmachine.gpg.hue.Demo
 
manager - Variable in class net.tmachine.gpg.hue.BaseHUD
 
mouseClicked(MouseEvent) - Method in class net.tmachine.gpg.hue.BaseHUD
 
mouseClicked(MouseEvent) - Method in class net.tmachine.gpg.hue.ContextManager
 
mouseClicked(MouseEvent) - Method in class net.tmachine.gpg.hue.HUDList
Logic for either showing/hiding a HUD or activating/de-activating, depending upon which circle/icon was clicked
mouseClicked(MouseEvent) - Method in class net.tmachine.gpg.hue.HUDManager
Delegates to all the currently active HUDs that are listening to inputs
mouseClicked(MouseEvent) - Method in class net.tmachine.gpg.hue.ShapeRenderer
 
mouseDragged(MouseEvent) - Method in class net.tmachine.gpg.hue.BaseHUD
 
mouseDragged(MouseEvent) - Method in class net.tmachine.gpg.hue.ContextManager
Automatically updates its knowledge of the mouse cursor position
mouseDragged(MouseEvent) - Method in class net.tmachine.gpg.hue.HUDManager
Delegates to all the currently active HUDs that are listening to inputs
mouseDragged(MouseEvent) - Method in class net.tmachine.gpg.hue.ShapeRenderer
 
mouseDragged(MouseEvent) - Method in class net.tmachine.gpg.hue.ShapeShifter2
Compares the mouse cursor position to it's last known position, and translates all "currently being moved" shapes by the same relative distance
mouseEntered(MouseEvent) - Method in class net.tmachine.gpg.hue.BaseHUD
 
mouseEntered(MouseEvent) - Method in class net.tmachine.gpg.hue.ContextManager
 
mouseEntered(MouseEvent) - Method in class net.tmachine.gpg.hue.HUDList
 
mouseEntered(MouseEvent) - Method in class net.tmachine.gpg.hue.HUDManager
Delegates to all the currently active HUDs that are listening to inputs
mouseEntered(MouseEvent) - Method in class net.tmachine.gpg.hue.ShapeRenderer
 
mouseExited(MouseEvent) - Method in class net.tmachine.gpg.hue.BaseHUD
 
mouseExited(MouseEvent) - Method in class net.tmachine.gpg.hue.ContextManager
 
mouseExited(MouseEvent) - Method in class net.tmachine.gpg.hue.HUDList
 
mouseExited(MouseEvent) - Method in class net.tmachine.gpg.hue.HUDManager
Delegates to all the currently active HUDs that are listening to inputs
mouseExited(MouseEvent) - Method in class net.tmachine.gpg.hue.ShapeRenderer
 
mouseMoved(MouseEvent) - Method in class net.tmachine.gpg.hue.BaseHUD
 
mouseMoved(MouseEvent) - Method in class net.tmachine.gpg.hue.ContextManager
Automatically updates its knowledge of the mouse cursor position
mouseMoved(MouseEvent) - Method in class net.tmachine.gpg.hue.HUDManager
Delegates to all the currently active HUDs that are listening to inputs
mouseMoved(MouseEvent) - Method in class net.tmachine.gpg.hue.ShapeRenderer
 
mouseMoved(MouseEvent) - Method in class net.tmachine.gpg.hue.ShapeShifter
 
mousePressed(MouseEvent) - Method in class net.tmachine.gpg.hue.BaseHUD
 
mousePressed(MouseEvent) - Method in class net.tmachine.gpg.hue.ContextManager
 
mousePressed(MouseEvent) - Method in class net.tmachine.gpg.hue.HUDList
 
mousePressed(MouseEvent) - Method in class net.tmachine.gpg.hue.HUDManager
Delegates to all the currently active HUDs that are listening to inputs
mousePressed(MouseEvent) - Method in class net.tmachine.gpg.hue.ShapeCreator
 
mousePressed(MouseEvent) - Method in class net.tmachine.gpg.hue.ShapeRenderer
 
mousePressed(MouseEvent) - Method in class net.tmachine.gpg.hue.ShapeShifter2
Finds all shapes under the mouse cursor, and flags them internally as being "currently being moved"
mouseReleased(MouseEvent) - Method in class net.tmachine.gpg.hue.BaseHUD
 
mouseReleased(MouseEvent) - Method in class net.tmachine.gpg.hue.ContextManager
 
mouseReleased(MouseEvent) - Method in class net.tmachine.gpg.hue.HUDList
 
mouseReleased(MouseEvent) - Method in class net.tmachine.gpg.hue.HUDManager
Delegates to all the currently active HUDs that are listening to inputs
mouseReleased(MouseEvent) - Method in class net.tmachine.gpg.hue.ShapeCreator
 
mouseReleased(MouseEvent) - Method in class net.tmachine.gpg.hue.ShapeRenderer
 
movingObjects - Variable in class net.tmachine.gpg.hue.ShapeShifter2
 
mx - Variable in class net.tmachine.gpg.hue.ContextManager
 
my - Variable in class net.tmachine.gpg.hue.ContextManager
 

N

name - Variable in class net.tmachine.gpg.hue.BaseHUD
 
net.tmachine.gpg.hue - package net.tmachine.gpg.hue
 

P

paint(Graphics) - Method in interface net.tmachine.gpg.hue.HUD
If this HUD is visible, it will be asked to paint to the supplied display surface during repaints
paint(Graphics) - Method in class net.tmachine.gpg.hue.ShapeCreator
 
paint(Graphics) - Method in class net.tmachine.gpg.hue.ShapeRenderer
 
paint(Graphics) - Method in class net.tmachine.gpg.hue.ShapeShifter
 
paint(Graphics) - Method in class net.tmachine.gpg.hue.ShapeShifter2
 
paintComponent(Graphics) - Method in class net.tmachine.gpg.hue.HUDList
All painting takes place here; this component uses no widgets, and does everything by hand
paintComponent(Graphics) - Method in class net.tmachine.gpg.hue.MainRenderer
 

R

repaint() - Method in class net.tmachine.gpg.hue.HUDManager
Callback for HUDs to instruct the manager that they have changed their paint state and need a repaint of the main renderer
rowHeight - Variable in class net.tmachine.gpg.hue.HUDList
 

S

ShapeCreator - class net.tmachine.gpg.hue.ShapeCreator.
A simple HUD that, when active, draws a crosshair and responds to drag / click+move events by drawing a new Rectangle, and when the mouse is released it creates a new rectangle of that size + position and adds it to the base document
ShapeCreator() - Constructor for class net.tmachine.gpg.hue.ShapeCreator
 
ShapeRenderer - class net.tmachine.gpg.hue.ShapeRenderer.
Very simple renderer that simply renders every shape in the base document using a unique colour for each.
ShapeRenderer() - Constructor for class net.tmachine.gpg.hue.ShapeRenderer
 
ShapeShifter - class net.tmachine.gpg.hue.ShapeShifter.
 
ShapeShifter() - Constructor for class net.tmachine.gpg.hue.ShapeShifter
 
ShapeShifter2 - class net.tmachine.gpg.hue.ShapeShifter2.
Simple HUD which displays a "your mouse cursor is currently floating over THIS shape" selection-box style thing, and includes a tool which will allow you to drag shapes around the document, even multiple shapes at once (if they overlap and can be dragged in a single gesture).
ShapeShifter2() - Constructor for class net.tmachine.gpg.hue.ShapeShifter2
 
setContext(ContextManager) - Method in class net.tmachine.gpg.hue.HUDManager
 
setControlComponent(JComponent) - Method in class net.tmachine.gpg.hue.ContextManager
Informs this class which component it has to listen to to get input events etc so that it can correctly maintain it's context
setDisplayComponent(JComponent) - Method in class net.tmachine.gpg.hue.HUDManager
Informs this class which display component is the main renderer
setDocument(Document) - Method in class net.tmachine.gpg.hue.ContextManager
The Document is a simple MVC Model containing data on what shapes there are, where they are, etc; it has all the data that would be "saved" if there were a load/save feature in this demo!
setExclusiveActiveHUD(HUD) - Method in class net.tmachine.gpg.hue.HUDManager
Enables a HUD to temporarily mask out all currently active HUD's in favour of one in particular; once that HUD has completed it's action, it should call exitExclusiveHUD to re-enable all previously active HUDs.
setManager(HUDManager) - Method in class net.tmachine.gpg.hue.BaseHUD
 
setManager(HUDManager) - Method in interface net.tmachine.gpg.hue.HUD
Callback when added to a HUD manager to give the HUD a reference it can use to control or delegate to other HUDs etc
setManager(HUDManager) - Method in class net.tmachine.gpg.hue.MainRenderer
 
setModel(ListModel) - Method in class net.tmachine.gpg.hue.HUDList
Internal use; uses the ListModel for easy compatibilty with Swing
setRelativeCursorPosition(int, int) - Method in class net.tmachine.gpg.hue.ContextManager
Sets cursor position ignoring any special transformations performed on the rendering surface (this method then automatically applies those transformations to the incoming co-ords before storing them)
shapes - Variable in class net.tmachine.gpg.hue.Document
 
showHUD(HUD) - Method in class net.tmachine.gpg.hue.HUDManager
Renders the supplied HUD visible, i.e it's paint callback is invoked on all repaints
sx - Variable in class net.tmachine.gpg.hue.ShapeCreator
co-ords where the current create-shape gesture was started
sx - Variable in class net.tmachine.gpg.hue.ShapeShifter2
Co-ords where a drag-translate was started
sy - Variable in class net.tmachine.gpg.hue.ShapeCreator
co-ords where the current create-shape gesture was started
sy - Variable in class net.tmachine.gpg.hue.ShapeShifter2
Co-ords where a drag-translate was started

T

titleHeight - Variable in class net.tmachine.gpg.hue.HUDList
 
toString() - Method in class net.tmachine.gpg.hue.BaseHUD
 

V

visibilityColumnWidth - Variable in class net.tmachine.gpg.hue.HUDList
 

A B C D E G H I L M N P R S T V