com.xj.anylogic.engine.presentation
Class Panel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.xj.anylogic.engine.presentation.Panel
All Implemented Interfaces:
java.awt.event.ComponentListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible

public class Panel
extends javax.swing.JPanel
implements java.awt.event.MouseWheelListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.ComponentListener

The class is responsible for displaying the experiment or active object presentation. The animation may be drawn frame by frame, each frame is a snapshot of the experiment state taken at a particular moment. Regular frames mode is started when during a refresh the panel discovers that the experiment state is RUNNING, and stops when, during a frame paining the experiment state is not RUNNING. The frame painting may be quite time consuming, so presentation drawing and the simulation itself may compete for the CPU. There are two modes frames can be painted: fixed frame rate when the panel tries to display a particular number of frames per second regardless how long does it take, and adaptive frame management when the panel tries to maintain a certain CPU time balance between the presentation and simulation. You can control the frame management as well as zoom, offsets and rendering options of the picture using the panel API.

Author:
XJ Technologies Company Ltd. www.anylogic.com
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.BaselineResizeBehavior
 
Field Summary
static int ANIM_ANTIALIASING
          The anti-aliasing painting option
static int ANIM_BOUNDS_CLIPPING_COMPLEX_XJAL
          increase performance by skipping drawing of shapes which are outside of visible area - for shapes with complex bounds computation (like polylines)
This constant is an internal AnyLogic option and is a subject to change in any further release.
static int ANIM_BOUNDS_CLIPPING_XJAL
          increase performance by skipping drawing of shapes which are outside of visible area.
static int ANIM_ENHANCED_MODEL_ELEMENTS_DRAWING
          The enhanced model elements drawing mode for the presentation panel
static int INSPECT_GENERAL_xjal
           
static int INSPECT_READ_ONLY_xjal
           
 com.xj.anylogic.engine.internal.PanelInternals internals
          This field shouldn't be accessed by user
is public due to technical reasons
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, 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
 
Method Summary
 void addInspect_xjal(double x, double y, Presentable p, java.lang.String name, int mode)
          Creates an inspect window at a particular location for an element of a Presentable object.
 void addInspect(double x, double y, Presentable p, java.lang.String name)
          Creates an inspect window at a particular location for an element of a Presentable object.
 void addNotify()
           
 void browseEmbeddedObject(double x, double y, ActiveObject ao, java.lang.String name)
          Sets the embedded object to be displayed by the presentation panel.
 void componentHidden(java.awt.event.ComponentEvent e)
          A method of ComponentListener interface.
 void componentMoved(java.awt.event.ComponentEvent e)
          A method of ComponentListener interface.
 void componentResized(java.awt.event.ComponentEvent e)
          A method of ComponentListener interface.
 void componentShown(java.awt.event.ComponentEvent e)
          A method of ComponentListener interface.
 java.awt.image.BufferedImage getBufferedImage()
          Returns the buffered image used by the panel to do off-screen painting.
 double getFrameManagementBalance()
          Returns the currently set balance between the CPU time available to presentation frame painting and the simulation (applies only in adaptive mode).
 double getFrameRate()
          Returns the number of frames to be painted per second in fixed mode, regardless of what mode is set.
 ImageCache getImageCache()
          Returns the image cache associated with this panel.
 double getOffsetX()
          Returns the current x offset (in the model coordinates) of the presentation origin (0,0) from the top left corner of the panel.
 double getOffsetY()
          Returns the current y offset (in the model coordinates) of the presentation origin (0,0) from the top left corner of the panel.
 Presentable getPresentable()
          Returns the object currently displayed by the panel.
 ShapeControlManager getShapeControlManager()
          Returns the control manager responsible for displaying the controls within the panel.
 double getZoom()
          Returns the current zoom (top-level scale of the presentation, same for x and y axes).
 void goHome()
          Resets scale and offsets to their default values: 1 for scale and 0 for both offsets.
 boolean isAnimationParameterEnabled(int parameter)
          Tests if the given animation parameter enabled for this panel
 boolean isAntiAliasingEnabled()
          Tests if anti-aliasing is on.
 boolean isEnhancedModelElementsAnimationEnabled()
          Deprecated. may be removed in the next release. Please use isAnimationParameterEnabled(Panel.ANIM_ENHANCED_MODEL_ELEMENTS_DRAWING) instead
 boolean isFrameManagementAdaptive()
          Returns the mode of the frame management
 boolean isPanningEnabled()
          Tests if mouse panning is enabled.
 boolean isZoomEnabled()
          Tests if zoom from the GUI is enabled.
 void mouseClicked(java.awt.event.MouseEvent e)
          A method of MouseListener interface.
 void mouseDragged(java.awt.event.MouseEvent e)
          A method of MouseMotionListener interface.
 void mouseEntered(java.awt.event.MouseEvent e)
          A method of MouseListener interface.
 void mouseExited(java.awt.event.MouseEvent e)
          A method of MouseListener interface.
 void mouseMoved(java.awt.event.MouseEvent e)
          A method of MouseMotionListener interface.
 void mousePressed(java.awt.event.MouseEvent e)
          A method of MouseListener interface.
 void mouseReleased(java.awt.event.MouseEvent e)
          A method of MouseListener interface.
 void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
          A method of MouseWheelListener interface.
 void navigateTo(ViewArea viewpoint)
          Shows the given viewpoint in the model animation panel
 void paintComponent(java.awt.Graphics g)
          Is called by Swing to paint the panel.
 void remove(java.awt.Component comp)
           
 void remove(int index)
           
 void removeNotify()
           
 void restore(java.util.List<?> storedInspects, java.util.List<?> openInspects)
          This method should not be called by user
 void setAnimationParameterEnabled(int parameter, boolean enabled)
          Sets animation drawing parameter for this panel
 void setAntiAliasingEnabled(boolean yes)
          Sets the anti-aliasing painting option.
 void setEnhancedModelElementsAnimationEnabled(boolean yes)
          Deprecated. may be removed in the next release. Please use setAnimationParameterEnabled(Panel.ANIM_ENHANCED_MODEL_ELEMENTS_DRAWING, enabled) instead
 void setFrameManagementAdaptive(boolean yes)
          Sets the mode of presentation frame painting management.
 void setFrameManagementBalance(double balance)
          Sets the balance between the CPU time available to presentation frame painting and the simulation (applies only in adaptive mode).
 void setFrameRate(double rate)
          Sets the frame rate.
 void setOffsets(double offx, double offy)
          Sets the x and y offsets (in the model coordinates) of the presentation origin (0,0) from the top left corner of the panel.
 void setOffsetX(int offx)
          Sets the x offset (in the model coordinates) of the presentation origin (0,0) from the top left corner of the panel.
 void setOffsetY(int offy)
          Sets the y offset (in the model coordinates) of the presentation origin (0,0) from the top left corner of the panel.
 void setPanningEnabled(boolean yes)
          Enables or disables panning with mouse right+drag, but does not affect programmatic changes of offsets that are always possible.
 void setPopupMenu_xjal(javax.swing.JMenuItem... additionalItems)
          This method shouldn't be called by user and may be removed in future releases.
 void setZoom(double z)
          Zooms the presentation in or out.
 void setZoomEnabled(boolean yes)
          Enables or disables zoom initiated from the GUI (button. mouse, or keyboard), but does not affect programmatic changes of zoom that are always possible.
 void write(java.io.ObjectOutputStream os)
          This method should not be called by user
 double xFromScreen(int x)
          Converts a given screen (panel) x coordinate to presentable x coordinate
 int xToScreen(double x)
          Converts a given presentable x coordinate to screen (panel) x coordinate
 double yFromScreen(int y)
          Converts a given screen (panel) y coordinate to presentable x coordinate
 int yToScreen(double y)
          Converts a given presentable y coordinate to screen (panel) y coordinate
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, 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, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, 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, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, 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, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, 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, 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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INSPECT_GENERAL_xjal

public static final int INSPECT_GENERAL_xjal
See Also:
Constant Field Values

INSPECT_READ_ONLY_xjal

public static final int INSPECT_READ_ONLY_xjal
See Also:
Constant Field Values

ANIM_ANTIALIASING

public static final int ANIM_ANTIALIASING
The anti-aliasing painting option

See Also:
setAnimationParameterEnabled(int, boolean), Constant Field Values

ANIM_ENHANCED_MODEL_ELEMENTS_DRAWING

public static final int ANIM_ENHANCED_MODEL_ELEMENTS_DRAWING
The enhanced model elements drawing mode for the presentation panel

See Also:
setAnimationParameterEnabled(int, boolean), Constant Field Values

ANIM_BOUNDS_CLIPPING_XJAL

public static final int ANIM_BOUNDS_CLIPPING_XJAL
increase performance by skipping drawing of shapes which are outside of visible area.
This constant is an internal AnyLogic option and is a subject to change in any further release.

See Also:
setAnimationParameterEnabled(int, boolean), Constant Field Values

ANIM_BOUNDS_CLIPPING_COMPLEX_XJAL

public static final int ANIM_BOUNDS_CLIPPING_COMPLEX_XJAL
increase performance by skipping drawing of shapes which are outside of visible area - for shapes with complex bounds computation (like polylines)
This constant is an internal AnyLogic option and is a subject to change in any further release.

See Also:
setAnimationParameterEnabled(int, boolean), Constant Field Values

internals

public final com.xj.anylogic.engine.internal.PanelInternals internals
This field shouldn't be accessed by user
is public due to technical reasons

Method Detail

getPresentable

public Presentable getPresentable()
Returns the object currently displayed by the panel.

Returns:
the object currently displayed by the panel

setFrameManagementAdaptive

public void setFrameManagementAdaptive(boolean yes)
Sets the mode of presentation frame painting management.
In case of adaptive frame management the frame rate is adjusted according to the time it takes to paint a frame so that the simulation thread gets chances to progress. In non-adaptive (fixed FPS) mode the manager tries to paint a fixed number of frames no matter what.

Parameters:
yes - if true, the frame rate is adjusted automatically

isFrameManagementAdaptive

public boolean isFrameManagementAdaptive()
Returns the mode of the frame management

Returns:
true is the frame management is adaptive, false if fixed frame rate

setFrameRate

public void setFrameRate(double rate)
Sets the frame rate. Applies only in fixed frame management mode.

Parameters:
rate - the number of frames to be painted per second

getFrameRate

public double getFrameRate()
Returns the number of frames to be painted per second in fixed mode, regardless of what mode is set.

Returns:
the number of frames to be painted per second in fixed mode

setFrameManagementBalance

public void setFrameManagementBalance(double balance)
Sets the balance between the CPU time available to presentation frame painting and the simulation (applies only in adaptive mode). The balance is the balance between the CPU time available to presentation frame painting and the simulation itself. 1 (default) means split time 50/50, 2 means simulation gets twice more CPU time between frames, 0.5 - twice less, etc. Values close to 0 are not recommended as simulation may not get a chance to progress.

Parameters:
balance - the new value for balance

getFrameManagementBalance

public double getFrameManagementBalance()
Returns the currently set balance between the CPU time available to presentation frame painting and the simulation (applies only in adaptive mode).

Returns:
the current simulation to presentation CPU balance

setZoomEnabled

public void setZoomEnabled(boolean yes)
Enables or disables zoom initiated from the GUI (button. mouse, or keyboard), but does not affect programmatic changes of zoom that are always possible.

Parameters:
yes - if true, zoom is enabled, if false - disabled

isZoomEnabled

public boolean isZoomEnabled()
Tests if zoom from the GUI is enabled.

Returns:
true if zoom is enabled, false if not.

setZoom

public void setZoom(double z)
Zooms the presentation in or out.

Parameters:
z - the new zoom value

getZoom

public double getZoom()
Returns the current zoom (top-level scale of the presentation, same for x and y axes). Zoom is applied on top of object presentation scales.

Returns:
the current scale of the presentation

setOffsets

public void setOffsets(double offx,
                       double offy)
Sets the x and y offsets (in the model coordinates) of the presentation origin (0,0) from the top left corner of the panel.

Parameters:
offx - the new x offset value
offy - the new y offset value

setOffsetX

public void setOffsetX(int offx)
Sets the x offset (in the model coordinates) of the presentation origin (0,0) from the top left corner of the panel.

Parameters:
offx - the new x offset value

getOffsetX

public double getOffsetX()
Returns the current x offset (in the model coordinates) of the presentation origin (0,0) from the top left corner of the panel.

Returns:
the x offset of the presentation origin

setOffsetY

public void setOffsetY(int offy)
Sets the y offset (in the model coordinates) of the presentation origin (0,0) from the top left corner of the panel.

Parameters:
offy - the new y offset value

getOffsetY

public double getOffsetY()
Returns the current y offset (in the model coordinates) of the presentation origin (0,0) from the top left corner of the panel.

Returns:
the x offset of the presentation origin

goHome

public void goHome()
Resets scale and offsets to their default values: 1 for scale and 0 for both offsets.


xToScreen

public int xToScreen(double x)
Converts a given presentable x coordinate to screen (panel) x coordinate

Parameters:
x - the presentable x coordinate
Returns:
the panel x coordinate

yToScreen

public int yToScreen(double y)
Converts a given presentable y coordinate to screen (panel) y coordinate

Parameters:
y - the presentable y coordinate
Returns:
the panel y coordinate

xFromScreen

public double xFromScreen(int x)
Converts a given screen (panel) x coordinate to presentable x coordinate

Parameters:
x - the panel x coordinate
Returns:
the presentable x coordinate

yFromScreen

public double yFromScreen(int y)
Converts a given screen (panel) y coordinate to presentable x coordinate

Parameters:
y - the panel y coordinate
Returns:
the presentable y coordinate

setPanningEnabled

public void setPanningEnabled(boolean yes)
Enables or disables panning with mouse right+drag, but does not affect programmatic changes of offsets that are always possible.

Parameters:
yes - if true, panning is enabled, if false - disabled

isPanningEnabled

public boolean isPanningEnabled()
Tests if mouse panning is enabled.

Returns:
true if panning is enabled, false if not.

setAntiAliasingEnabled

public void setAntiAliasingEnabled(boolean yes)
Sets the anti-aliasing painting option.

Parameters:
yes - if true, anti-aliasing is turned on, if false - off

isAntiAliasingEnabled

public boolean isAntiAliasingEnabled()
Tests if anti-aliasing is on.

Returns:
true if anti-aliasing is on, false if it is off

setEnhancedModelElementsAnimationEnabled

@Deprecated
public void setEnhancedModelElementsAnimationEnabled(boolean yes)
Deprecated. may be removed in the next release. Please use setAnimationParameterEnabled(Panel.ANIM_ENHANCED_MODEL_ELEMENTS_DRAWING, enabled) instead


isEnhancedModelElementsAnimationEnabled

@Deprecated
public boolean isEnhancedModelElementsAnimationEnabled()
Deprecated. may be removed in the next release. Please use isAnimationParameterEnabled(Panel.ANIM_ENHANCED_MODEL_ELEMENTS_DRAWING) instead


setAnimationParameterEnabled

public void setAnimationParameterEnabled(int parameter,
                                         boolean enabled)
Sets animation drawing parameter for this panel

Parameters:
parameter - one of Panel.ANIM_* constants
enabled - true to turn on, false to turn off

isAnimationParameterEnabled

public boolean isAnimationParameterEnabled(int parameter)
Tests if the given animation parameter enabled for this panel

Parameters:
parameter - one of Panel.ANIM_* constants
Returns:
true if the given animation parameter is enabled for this panel. false otherwise

getBufferedImage

public java.awt.image.BufferedImage getBufferedImage()
Returns the buffered image used by the panel to do off-screen painting. The image is re-created on each panel resize.

Returns:
the current buffered image or null if not yet allocated

getShapeControlManager

public ShapeControlManager getShapeControlManager()
Returns the control manager responsible for displaying the controls within the panel.

Returns:
the control manager of the panel

getImageCache

public ImageCache getImageCache()
Returns the image cache associated with this panel.

Returns:
the image cache associated with this panel

addInspect

public void addInspect(double x,
                       double y,
                       Presentable p,
                       java.lang.String name)
Creates an inspect window at a particular location for an element of a Presentable object. If there is another inspect with the same Presentable and same element name, it is brought to front and a new inspect is not created. The initial size of the window is adjusted to fit the initial contents.

Parameters:
x - the x coordinate in the presentable object system
y - the y coordinate in the presentable object system
p - the Presentable object whose element is being inspected
name - the name of the element being inspected

addInspect_xjal

public void addInspect_xjal(double x,
                            double y,
                            Presentable p,
                            java.lang.String name,
                            int mode)
Creates an inspect window at a particular location for an element of a Presentable object. If there is another inspect with the same Presentable and same element name, it is brought to front and a new inspect is not created. The initial size of the window is adjusted to fit the initial contents.

Parameters:
x - the x coordinate in the presentable object system
y - the y coordinate in the presentable object system
p - the Presentable object whose element is being inspected
name - the name of the element being inspected
mode - may be set to Panel.INSPECT_READ_ONLY_xjal for the editing to be prohibited for this inspect

browseEmbeddedObject

public void browseEmbeddedObject(double x,
                                 double y,
                                 ActiveObject ao,
                                 java.lang.String name)
Sets the embedded object to be displayed by the presentation panel.
This method should be called as a reaction on double-click (the click location should be given)
Embedded object is searched by given field name in the ActiveObject object. If the embedded object is replicated, first element (if any exists) is shown
This method hides inspect if any is shown by the first click of this double-click

Parameters:
x - the x coordinate in the active object object system
y - the y coordinate in the active object object system
ao - the ActiveObject object whose embeddedObject is being browsed
name - the name of the embedded object being browsed

write

public void write(java.io.ObjectOutputStream os)
           throws java.io.IOException
This method should not be called by user

Throws:
java.io.IOException

restore

public void restore(java.util.List<?> storedInspects,
                    java.util.List<?> openInspects)
             throws java.io.IOException,
                    java.lang.ClassNotFoundException
This method should not be called by user

Throws:
java.io.IOException
java.lang.ClassNotFoundException

addNotify

public void addNotify()
Overrides:
addNotify in class javax.swing.JComponent

removeNotify

public void removeNotify()
Overrides:
removeNotify in class javax.swing.JComponent

paintComponent

public void paintComponent(java.awt.Graphics g)
Is called by Swing to paint the panel. Paints the prepared off-screen buffer directly to the screen.
NB we can only override paintComponent - overriding paint does not allow child components to draw!

Overrides:
paintComponent in class javax.swing.JComponent

navigateTo

public void navigateTo(ViewArea viewpoint)
Shows the given viewpoint in the model animation panel

Parameters:
viewpoint - the viewpoint to show

remove

public void remove(java.awt.Component comp)
Overrides:
remove in class java.awt.Container

remove

public void remove(int index)
Overrides:
remove in class java.awt.Container

componentResized

public void componentResized(java.awt.event.ComponentEvent e)
A method of ComponentListener interface. Reacts on component resize.

Specified by:
componentResized in interface java.awt.event.ComponentListener

componentMoved

public void componentMoved(java.awt.event.ComponentEvent e)
A method of ComponentListener interface. Reacts on component move. Does nothing so far.

Specified by:
componentMoved in interface java.awt.event.ComponentListener

componentHidden

public void componentHidden(java.awt.event.ComponentEvent e)
A method of ComponentListener interface. Reacts on component hidden. Does nothing so far.

Specified by:
componentHidden in interface java.awt.event.ComponentListener

componentShown

public void componentShown(java.awt.event.ComponentEvent e)
A method of ComponentListener interface. Reacts on component shown. Does nothing so far.

Specified by:
componentShown in interface java.awt.event.ComponentListener

mouseWheelMoved

public void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
A method of MouseWheelListener interface. Handles mouse wheel rotated while Ctrl is pressed - zoom action.

Specified by:
mouseWheelMoved in interface java.awt.event.MouseWheelListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
A method of MouseListener interface. Handles mouse pressed and remembers where it happened.

Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
A method of MouseListener interface. Handles mouse released.

Specified by:
mouseReleased in interface java.awt.event.MouseListener

setPopupMenu_xjal

public void setPopupMenu_xjal(javax.swing.JMenuItem... additionalItems)
This method shouldn't be called by user and may be removed in future releases.
It is public due to technical reasons.


mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
A method of MouseListener interface. Handles mouse clicked.

Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
A method of MouseListener interface. Handles mouse entered. Does nothing so far.

Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
A method of MouseListener interface. Handles mouse exited. Does nothing so far.

Specified by:
mouseExited in interface java.awt.event.MouseListener

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
A method of MouseMotionListener interface. Implements panel panning on right+drag.

Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
A method of MouseMotionListener interface. Handles mouse moved. Does nothing so far.

Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener


Copyright © 1991-2008 XJ Technlogies. All Rights Reserved.