|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel org.fraid.graphics.GraphicsUser
public abstract class GraphicsUser
The abstract superclass of all classes responsible for generating 2D images in FrAid.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
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 | |
---|---|
protected PaintAlgorithmThread |
mAlgorithmThread
The thread responsible for generating images. |
protected java.awt.Dimension |
mImageSize
The size of the generated image. |
protected BehaviorBean |
mPlugIn
The plugin working with the thread. |
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 | |
---|---|
GraphicsUser()
|
Method Summary | |
---|---|
protected abstract void |
destroy()
Called by the owning containers to perform any meaningful clenup when leaving. |
PaintAlgorithmThread |
getAlgorithm()
Returns the paint thread. |
java.awt.Dimension |
getImageSize()
Returns the image size. |
BehaviorBean |
getPlugIn()
Returns the current plugin. |
abstract javax.swing.JPopupMenu |
getPopUp()
Returns the associated popup menu (if any). |
abstract void |
interruptWatchingThread()
Interrupts the watching thread (if there is any). |
abstract void |
notifyWatchingThread()
Notifyes the watching thread (if there is any). |
abstract void |
recalculateAndRepaint()
Similar to repaint() but with recalculation of the whole image. |
void |
setAlgorithm(PaintAlgorithmThread aAlgorithmThread)
Sets the pain thread (do not use directly). |
abstract void |
setOffscreenImage(java.awt.image.BufferedImage bi)
If the subclasses support offscreen image this method sets it. |
abstract void |
setOffscreenImage(int[] offscreenPixels)
If the subclasses support offscreen image this method sets it. |
abstract void |
setOffScreenOrigin(int x,
int y)
Implemented by subclasses which support scrolling the image. |
BehaviorBean |
setPlugIn(BehaviorBean aPlugIn)
The method used to set the plugin after BehaviourPlugInAdapter#clone() . |
BehaviorBean |
setPlugIn(java.lang.String aPlugInName)
The method used to initialize the tripple GraphicsPanel -
BehaviourPlugIn - PaintAlgorithmThread . |
abstract void |
setStop()
A method used by all subclasses which have a stop button. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, 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, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, 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 |
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 |
Methods inherited from interface java.awt.image.ImageObserver |
---|
imageUpdate |
Field Detail |
---|
protected PaintAlgorithmThread mAlgorithmThread
protected BehaviorBean mPlugIn
protected java.awt.Dimension mImageSize
Constructor Detail |
---|
public GraphicsUser()
Method Detail |
---|
public BehaviorBean setPlugIn(java.lang.String aPlugInName) throws PlugInException
GraphicsPanel
-
BehaviourPlugIn
- PaintAlgorithmThread
.
Do not use any other way for initialization.
aPlugInName
- a String
which could be: 1)String representation
of an XML serialized BehaviourPlugIn
, 2) PlugIn class name or
3)a file name of an XML serialized BehaviourPlugIn
(checked in this order).
BehaviourPlugInAdapter
value
PlugInException
- if the aPlugInName doesn't match anything.PlugInFactory
public BehaviorBean setPlugIn(BehaviorBean aPlugIn) throws PlugInException
BehaviourPlugInAdapter#clone()
.
Used when a SaveToFileUser is "cloned" from a GraphicsPanel
.
aPlugIn
- the cloned BehaviourPlugInAdapter
PlugInException
- if an error occurspublic PaintAlgorithmThread getAlgorithm()
PaintAlgorithmThread
valuepublic void setAlgorithm(PaintAlgorithmThread aAlgorithmThread)
PaintAlgorithmThread#constructor( GraphicsUser, BehaviourPlugInAdapter )
(not to be used
directly aswell).
aAlgorithmThread
- a PaintAlgorithmThread
valuesetPlugIn( String )
public BehaviorBean getPlugIn()
BehaviourPlugIn
valuepublic java.awt.Dimension getImageSize()
Dimension
valuepublic abstract void setStop()
public abstract void notifyWatchingThread()
PaintAlgorithmThread
.
public abstract void interruptWatchingThread()
PaintAlgorithmThread
.
public abstract void setOffScreenOrigin(int x, int y)
PaintAlgorithmThread
.
x
- an int
valuey
- an int
valuepublic abstract void setOffscreenImage(java.awt.image.BufferedImage bi)
bi
- a BufferedImage
valueGraphicsPanel.setOffscreenImage( BufferedImage )
public abstract void setOffscreenImage(int[] offscreenPixels)
offscreenPixels
- an int[]
valueGraphicsPanel.setOffscreenImage( int[] )
public abstract void recalculateAndRepaint()
public abstract javax.swing.JPopupMenu getPopUp()
JPopupMenu
valueprotected abstract void destroy()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |