com.swfm.mica.core
Class MiJCanvas

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended bycom.swfm.mica.core.MiJCanvas
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, MiiCanvas, java.io.Serializable

public class MiJCanvas
extends javax.swing.JPanel
implements MiiCanvas

Version:
%I% %G%
Author:
Michael L. Davis
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Field Summary
static java.lang.String Mi_NUM_SWING_EXTRA_PAINTS_PROPERTY_NAME
           
       
Constructor Summary
MiJCanvas()
          Constructs a new MiJCanvas.
 
Method Summary
 java.awt.Rectangle getCanvasBounds()
          Get the bounds of the canvas in pixels.
 java.awt.Insets getContainerInsets()
           
 java.awt.Dimension getMinimumSize()
          Returns the minimum size of this canvas.
 int getMouseAppearance()
          Returns the appearance of the mouse cursor in this canvas.
 java.awt.Dimension getPreferredSize()
          Returns the preferred size of this canvas.
 boolean isFocusTraversable()
           
 boolean isManagingFocus()
           
 boolean isOpaque()
           
 void paintComponent(java.awt.Graphics g)
           
 void requestRepaint()
           
 void setBounds(int x, int y, int width, int height)
          Causes the canvas to be reshaped as per the awt.Component API.
 void setCanvas(MiCanvas canvas)
           
 void setCanvasBounds(MiBounds deviceBounds)
          Sets the bounds of the canvas, in pixels.
 void setMouseAppearance(int appearance)
          Sets the appearance of the mouse cursor within the bounds of this canvas.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isMaximumSizeSet, isMinimumSizeSet, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, 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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.swfm.mica.core.MiiCanvas
createImage, getGraphics, handleEvent, paint, update
 

Field Detail

Mi_NUM_SWING_EXTRA_PAINTS_PROPERTY_NAME

public static final java.lang.String Mi_NUM_SWING_EXTRA_PAINTS_PROPERTY_NAME
See Also:
Constant Field Values
Constructor Detail

MiJCanvas

public MiJCanvas()
Constructs a new MiJCanvas.

Method Detail

isOpaque

public boolean isOpaque()

isManagingFocus

public boolean isManagingFocus()

isFocusTraversable

public boolean isFocusTraversable()

paintComponent

public void paintComponent(java.awt.Graphics g)

setCanvas

public void setCanvas(MiCanvas canvas)
Specified by:
setCanvas in interface MiiCanvas

setMouseAppearance

public void setMouseAppearance(int appearance)
Sets the appearance of the mouse cursor within the bounds of this canvas.

Specified by:
setMouseAppearance in interface MiiCanvas
Parameters:
appearance - the cursor appearance

getMouseAppearance

public int getMouseAppearance()
Returns the appearance of the mouse cursor in this canvas.

Specified by:
getMouseAppearance in interface MiiCanvas
Returns:
the animation manager
See Also:
MiAnimationManager

setCanvasBounds

public void setCanvasBounds(MiBounds deviceBounds)
Sets the bounds of the canvas, in pixels.

Specified by:
setCanvasBounds in interface MiiCanvas
Parameters:
deviceBounds - the bounds of this canvas

getPreferredSize

public java.awt.Dimension getPreferredSize()
Returns the preferred size of this canvas. This routine is in support of the Component API.

Specified by:
getPreferredSize in interface MiiCanvas
Returns:
the preferred size

getMinimumSize

public java.awt.Dimension getMinimumSize()
Returns the minimum size of this canvas. This routine is in support of the Component API.

Specified by:
getMinimumSize in interface MiiCanvas
Returns:
the minimum size

requestRepaint

public void requestRepaint()
Specified by:
requestRepaint in interface MiiCanvas

getCanvasBounds

public java.awt.Rectangle getCanvasBounds()
Description copied from interface: MiiCanvas
Get the bounds of the canvas in pixels.

Specified by:
getCanvasBounds in interface MiiCanvas
Returns:
the bounds of this canvas

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)
Causes the canvas to be reshaped as per the awt.Component API.

Specified by:
setBounds in interface MiiCanvas
Parameters:
x - the x coordinate
y - the y coordinate
width - the width
height - the height

getContainerInsets

public java.awt.Insets getContainerInsets()
Specified by:
getContainerInsets in interface MiiCanvas