|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
megamek.client.ui.AWT.widget.PicMap
public abstract class PicMap
PicMap is a lightweight component, which area is composed by the set of cutom
elements added to PicMap Engine. There are three main groups of cutom
elements
1) BackgroundDrawers
2) Hot areas
3) Labels
* Hot areas and labels can be grouped handled together by
AreasGroup class. Content of PicMap - Areas group that includes all areas on
the stage. Added Elements are placed into several layers within PicMap
engine.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
(package private) int |
minHeight
|
(package private) int |
minWidth
|
| 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 | |
|---|---|
PicMap()
creates PicMap engine. |
|
| Method Summary | |
|---|---|
void |
addBgDrawer(BackGroundDrawer bd)
Adds background drawer to the stage. |
void |
addElement(PMElement e)
Adds element to PicMap component. |
void |
addNotify()
Please remember to add super.addNotify() when overriding |
PMHotArea |
getAreaUnder(int x,
int y)
Returns Hot Area under coordinates (x, y) |
java.awt.Rectangle |
getContentBounds()
Returns Rectangle bounding content of component |
java.awt.Dimension |
getMinimumSize()
|
java.awt.Dimension |
getPreferredSize()
|
abstract void |
onResize()
onResize() function is calling every time PicMap is resized. |
void |
paint(java.awt.Graphics g)
|
protected void |
processComponentEvent(java.awt.event.ComponentEvent e)
|
protected void |
processMouseEvent(java.awt.event.MouseEvent e)
|
protected void |
processMouseMotionEvent(java.awt.event.MouseEvent e)
|
void |
removeAll()
Removes all elements from PicMap component. |
void |
removeBgDrawer(BackGroundDrawer bd)
Removes Background drawer from component. |
void |
removeElement(PMElement e)
Removes element from PicMap component. |
void |
setBackgroundOpaque(boolean v)
Sets background of PicMap to fully opaque or fully transparent. |
void |
setContentMargins(int l,
int t,
int r,
int b)
Sets margins in pixels around Content of component. |
void |
update()
Updates all changes in areas state and repaints component. |
void |
update(java.awt.Graphics g)
|
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
int minWidth
int minHeight
| Constructor Detail |
|---|
public PicMap()
| Method Detail |
|---|
public abstract void onResize()
public void addElement(PMElement e)
public void removeElement(PMElement e)
public void removeAll()
public void addBgDrawer(BackGroundDrawer bd)
public void removeBgDrawer(BackGroundDrawer bd)
public void setContentMargins(int l,
int t,
int r,
int b)
l - Left margint - Top marginr - Right marginb - Bottom marginpublic java.awt.Rectangle getContentBounds()
public void addNotify()
addNotify in class java.awt.Componentpublic void update()
public void update(java.awt.Graphics g)
update in class java.awt.Componentpublic void paint(java.awt.Graphics g)
paint in class java.awt.Componentpublic java.awt.Dimension getPreferredSize()
getPreferredSize in class java.awt.Componentpublic java.awt.Dimension getMinimumSize()
getMinimumSize in class java.awt.Component
public PMHotArea getAreaUnder(int x,
int y)
public void setBackgroundOpaque(boolean v)
protected void processMouseEvent(java.awt.event.MouseEvent e)
processMouseEvent in class java.awt.Componentprotected void processMouseMotionEvent(java.awt.event.MouseEvent e)
processMouseMotionEvent in class java.awt.Componentprotected void processComponentEvent(java.awt.event.ComponentEvent e)
processComponentEvent in class java.awt.Component
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||