|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
gcspy.vis.TileManager
public class TileManager
Canvas that manages tiles
| Nested Class Summary | |
|---|---|
static class |
TileManager.Tile
Tile types |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
javax.swing.JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
java.awt.Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary |
|---|
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
TileManager(java.lang.String title,
int maxTiles)
Create a new tile manager |
|
TileManager(java.lang.String title,
int maxTiles,
boolean singleRow)
Create a new tile manager |
|
TileManager(java.lang.String title,
int maxTiles,
boolean singleRow,
boolean enableSelect)
Create a new tile manager |
|
TileManager(java.lang.String title,
int maxTiles,
TileManagerColors colorConfig,
boolean singleRow,
boolean enableSelect)
Create a new tile manager |
|
| Method Summary | |
|---|---|
void |
addListener(TileManagerListener listener)
Add a listener |
void |
clear()
Clear the tile area |
void |
clearMarkers()
Clear all the markers |
void |
deselectTile()
Deselect a (previously selected, if any) tile |
void |
disableSelection()
Disable tile selection |
void |
enableFooter(boolean enable)
Enable/disable the footer |
void |
enableSelection()
Enable tile selection |
void |
flush()
Flush the image |
int |
getIndex(int x,
int y)
Get the index of a tile |
(package private) void |
mapImage()
Draw the image including markers, selected tile |
void |
paintComponent(java.awt.Graphics g)
|
void |
paintLink(int index)
Paints the link *after* the tile |
void |
paintSeparator(int index)
Paints a separator *before* the tile |
void |
paintTile(int index,
java.awt.Color c)
Paints a tile |
void |
paintTile(int index,
java.awt.Color c,
TileManager.Tile tile)
Paints a tile with overflow |
void |
paintTile(int index,
java.awt.Color c,
TileManager.Tile tile,
boolean force)
Paints a tile with overflow |
void |
paintTileOverflow(int index,
java.awt.Color c)
Paints a tile with overflow |
void |
paintTileZero(int index)
Paints a tile with value zero |
void |
resize(int tileNum)
Resize the tiles area |
void |
selectRange(int from,
int to,
java.awt.Color c)
Selects a tile range |
void |
selectTile(int selectedTile)
Select a tile |
void |
setColumns(int cols)
Set the number of columns in the tiles area |
void |
setDrawFrame(boolean drawFrame)
Draw the frame if not a single row and drawFrame has changed |
void |
setTileSizeLarge()
Set tiles to be large |
void |
setTileSizeSmall()
Set tiles to be small |
void |
setTileSizeTiny()
Set tiles to be tiny |
void |
setTileUnused(int index)
Paints a tile with the 'off' color |
void |
setWidth(int widthNew)
Set the width of the tiles area |
void |
setWindow(int low,
int num)
|
| Methods inherited from class javax.swing.JComponent |
|---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI |
| Methods inherited from class java.awt.Container |
|---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TileManager(java.lang.String title,
int maxTiles)
title - A title for this areamaxTiles - The maximum number of tiles in this area
public TileManager(java.lang.String title,
int maxTiles,
boolean singleRow)
title - A title for this areamaxTiles - The maximum number of tiles in this areasingleRow - True if the area is a single row
public TileManager(java.lang.String title,
int maxTiles,
boolean singleRow,
boolean enableSelect)
title - A title for this areamaxTiles - The maximum number of tiles in this areasingleRow - True if the area is a single rowenableSelect - True if tiles can be selected
public TileManager(java.lang.String title,
int maxTiles,
TileManagerColors colorConfig,
boolean singleRow,
boolean enableSelect)
title - A title for this areamaxTiles - The maximum number of tiles in this areacolorConfig - A colour configuration for the tilessingleRow - True if the area is a single rowenableSelect - True if tiles can be selected| Method Detail |
|---|
public int getIndex(int x,
int y)
x - The x coordy - The y coord
public void clear()
void mapImage()
public void flush()
public void paintComponent(java.awt.Graphics g)
paintComponent in class javax.swing.JComponentpublic void paintSeparator(int index)
index - the unadjusted indexpublic void paintLink(int index)
index - the unadjusted index
public void selectRange(int from,
int to,
java.awt.Color c)
from - unadjusted from indexto - unadjusted to indexc - the selection colourpublic void setTileUnused(int index)
index - the unadjusted index
public void paintTile(int index,
java.awt.Color c)
index - the unadjusted indexc - the colour of the tilepublic void paintTileZero(int index)
index - the unadjusted index
public void paintTileOverflow(int index,
java.awt.Color c)
index - the unadjusted indexc - The tile colour
public void paintTile(int index,
java.awt.Color c,
TileManager.Tile tile)
index - the unadjusted indexc - The tile colourtile - the tile kind
public void paintTile(int index,
java.awt.Color c,
TileManager.Tile tile,
boolean force)
index - the unadjusted indexc - The colour of the tiletile - the tile kindforce - force the painting regardless of overflow or visibilitypublic void setColumns(int cols)
cols - the number of columnspublic void setWidth(int widthNew)
widthNew - the new widthpublic void resize(int tileNum)
tileNum - The new number of tiles in the areapublic void enableFooter(boolean enable)
enable - True if the footer is enabled
public void setWindow(int low,
int num)
low - num - public void setTileSizeLarge()
public void setTileSizeSmall()
public void setTileSizeTiny()
public void selectTile(int selectedTile)
selectedTile - the tilepublic void deselectTile()
public void setDrawFrame(boolean drawFrame)
drawFrame - public void addListener(TileManagerListener listener)
listener - the listenerpublic void clearMarkers()
public void enableSelection()
public void disableSelection()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||