org.openbp.cockpit.modeler.drawing
Class WorkspaceDrawingView

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 CH.ifa.draw.standard.StandardDrawingView
                      extended by org.openbp.cockpit.modeler.drawing.WorkspaceDrawingView
All Implemented Interfaces:
CH.ifa.draw.framework.DrawingChangeListener, CH.ifa.draw.framework.DrawingView, java.awt.dnd.Autoscroll, java.awt.event.KeyListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, Scalable

public class WorkspaceDrawingView
extends CH.ifa.draw.standard.StandardDrawingView
implements CH.ifa.draw.framework.DrawingChangeListener, Scalable

This is the standard drawing view of the modeler.

Author:
Jens Ferchland
See Also:
Serialized Form

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.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static int GRIDTYPE_HEX
          Grid type: Hexadecimal grid
static int GRIDTYPE_LINE
          Grid type: Line
static int GRIDTYPE_POINT
          Grid type: Point
protected  boolean mouseInView
          Indicates that the mouse moves within the view
 
Fields inherited from class CH.ifa.draw.standard.StandardDrawingView
MINIMUM_HEIGHT, MINIMUM_WIDTH, SCROLL_INCR, SCROLL_OFFSET
 
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
WorkspaceDrawingView(DrawingEditorPlugin editor)
          Constructor.
 
Method Summary
protected  void addBreakoutSupport(java.lang.String actionName, int keyCode)
          Adds breakout support for the specified key.
 void addToSelection(CH.ifa.draw.framework.Figure figure)
          Adds a figure to the current selection.
 int applyScale(int coordinate, boolean scaleToDoc)
          Applies the current scale factor of the view to a coordinate.
 java.awt.Point applyScale(java.awt.Point p, boolean scaleToDoc)
          Applies the current scale factor of the view to a point.
 java.awt.Rectangle applyScale(java.awt.Rectangle r, boolean scaleToDoc)
          Applies the current scale factor of the view to a rectangle.
 void clearSelection()
          Clears the current selection.
 void displayPopupMenu(CH.ifa.draw.framework.Figure figure, java.awt.event.MouseEvent me)
          Displays the popup menu for the given figure.
 void draw(java.awt.Graphics g, CH.ifa.draw.framework.FigureEnumeration fe)
          Override for adding scale effect.
 void drawAll(java.awt.Graphics g)
          Overrides StandardDrawingView for adding scale effect.
 void drawBackground(java.awt.Graphics g)
          Draws the background.
 void drawHandles(java.awt.Graphics g)
          Draws the currently active handles.
 void drawingInvalidated(CH.ifa.draw.framework.DrawingChangeEvent e)
          Adds a rectangle to the damage section after transforming it using the shadow layouter.
 void drawingRequestUpdate(CH.ifa.draw.framework.DrawingChangeEvent e)
           
 void drawShadow(java.awt.Graphics g)
          Paints the Shadow of the process view.
 CH.ifa.draw.framework.Handle findHandle(int x, int y)
          Finds a handle at the given coordinates.
 void fireSelectionChanged()
          In addition to the super method, we fire an modeler.view.selectionchanged event.
 CH.ifa.draw.framework.Figure getFigureUnderCursor()
          Gets the figure currently under the cursor or null.
 int getGridSpacing()
          Gets the grid spacing.
 int getGridType()
          Gets the grid layout type.
 java.awt.Dimension getMinimumSize()
           
 java.awt.Dimension getPreferredSize()
          Links the preferred size of the component to the size of the drawing.
 double getScaleFactor()
          Gets the scaling factor.
 ShadowLayouter getShadowLayouter()
          Gets the shadow layouter.
 java.lang.String getToolTipText(java.awt.event.MouseEvent e)
          Returns the tool tip for the given mouse event (i\.e\. the given position).
 boolean isFigureSelected(CH.ifa.draw.framework.Figure checkFigure)
          Tests whether a given figure is selected.
 boolean isGridDisplayed()
          Gets the grid visibility.
 void keyPressed(java.awt.event.KeyEvent e)
          Handles key down events.
 void keyReleased(java.awt.event.KeyEvent e)
          Handles key up events.
 void prepareGraphics(java.awt.Graphics2D g2)
          Prepares a graphics context for rendering.
 void redraw()
          Redraws the view.
 void removeFromSelection(CH.ifa.draw.framework.Figure figure)
          Removes a figure from the selection.
 void scrollIntoView(CH.ifa.draw.framework.Figure figure, boolean addEnlargement)
          Scrolls a figure container into view.
 void scrollRectToVisible(java.awt.Rectangle rect)
           
 java.util.Vector selection()
           
 int selectionCount()
          Gets the number of selected figures.
 java.util.Vector selectionZOrdered()
           
 void setCursor(java.awt.Cursor cursor)
          Sets the current cursor.
 void setDrawing(CH.ifa.draw.framework.Drawing drawing)
           
 void setFigureUnderCursor(CH.ifa.draw.framework.Figure figureUnderCursor)
          Sets the figure currently under the cursor or null.
 void setGridDisplayed(boolean gridDisplayed)
          Sets the grid visibility.
 void setGridSpacing(int gridSpacing)
          Sets the grid spacing.
 void setGridType(int gridType)
          Sets the grid layout type.
 void setPreferredSize(java.awt.Dimension d)
           
 void setScaleFactor(double scaleFactor)
          Sets the scaling factor.
 void setShadowLayouter(ShadowLayouter shadowLayouter)
          Sets the shadow layouter.
 void setSizeOffset(int sizeOffset)
          Sets the size offset for workspace view enlargement.
 void setVisibleRect(java.awt.Rectangle r)
          Adjusts the scaling factor and view position according to the given rectangle.
 void singleSelect(CH.ifa.draw.framework.Figure figure)
           
 void unregister()
          Performs necessary cleanup-work when the view is not needed anymore - should allow the view to be processed by the garbage-collection.
 void updateSelection()
          Notifies the property browser of selection changes.
 
Methods inherited from class CH.ifa.draw.standard.StandardDrawingView
add, addAll, addBackground, addFigureSelectionListener, addForeground, addToSelectionAll, addToSelectionAll, autoscroll, checkDamage, constrainPoint, drawDrawing, drawing, editor, figureExists, freezeView, getAutoscrollInsets, getConnectionFigures, getConstrainer, getDefaultDNDActions, getDisplayUpdate, getFigureSelection, handleCursorKey, insertFigures, isFocusTraversable, isInteractive, keyTyped, lastClick, paintComponent, remove, removeBackground, removeFigureSelectionListener, removeForeground, repairDamage, selectionElements, setConstrainer, setDisplayUpdate, setEditor, toggleSelection, tool, toString, unfreezeView
 
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, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, 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, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, 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, 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, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface CH.ifa.draw.framework.DrawingView
createImage, getBackground, getGraphics, getSize, paint, setBackground
 
Methods inherited from interface java.awt.image.ImageObserver
imageUpdate
 

Field Detail

GRIDTYPE_POINT

public static final int GRIDTYPE_POINT
Grid type: Point

See Also:
Constant Field Values

GRIDTYPE_LINE

public static final int GRIDTYPE_LINE
Grid type: Line

See Also:
Constant Field Values

GRIDTYPE_HEX

public static final int GRIDTYPE_HEX
Grid type: Hexadecimal grid

See Also:
Constant Field Values

mouseInView

protected boolean mouseInView
Indicates that the mouse moves within the view

Constructor Detail

WorkspaceDrawingView

public WorkspaceDrawingView(DrawingEditorPlugin editor)
Constructor.

Parameters:
editor - Editor that uses the view
Method Detail

unregister

public void unregister()
Performs necessary cleanup-work when the view is not needed anymore - should allow the view to be processed by the garbage-collection.


setDrawing

public void setDrawing(CH.ifa.draw.framework.Drawing drawing)
Specified by:
setDrawing in interface CH.ifa.draw.framework.DrawingView
Overrides:
setDrawing in class CH.ifa.draw.standard.StandardDrawingView

getPreferredSize

public java.awt.Dimension getPreferredSize()
Links the preferred size of the component to the size of the drawing.

Specified by:
getPreferredSize in interface CH.ifa.draw.framework.DrawingView
Overrides:
getPreferredSize in class CH.ifa.draw.standard.StandardDrawingView
Returns:
The size of the drawing + sizeOffset per axis

getMinimumSize

public java.awt.Dimension getMinimumSize()
Specified by:
getMinimumSize in interface CH.ifa.draw.framework.DrawingView
Overrides:
getMinimumSize in class CH.ifa.draw.standard.StandardDrawingView

setPreferredSize

public void setPreferredSize(java.awt.Dimension d)
Overrides:
setPreferredSize in class javax.swing.JComponent

setCursor

public void setCursor(java.awt.Cursor cursor)
Sets the current cursor.

Specified by:
setCursor in interface CH.ifa.draw.framework.DrawingView
Overrides:
setCursor in class java.awt.Component

getToolTipText

public java.lang.String getToolTipText(java.awt.event.MouseEvent e)
Returns the tool tip for the given mouse event (i\.e\. the given position). This is derived from an underlying process element.

Overrides:
getToolTipText in class javax.swing.JComponent
Parameters:
e - Current mouse event specifying the position of the cursor
Returns:
The text or null if there is no process element at this position

redraw

public void redraw()
Redraws the view.


drawBackground

public void drawBackground(java.awt.Graphics g)
Draws the background. If a background pattern is set it is used to fill the background. Otherwise the background is filled in the background color.

Specified by:
drawBackground in interface CH.ifa.draw.framework.DrawingView
Overrides:
drawBackground in class CH.ifa.draw.standard.StandardDrawingView
Parameters:
g - Graphics object to draw to

drawShadow

public void drawShadow(java.awt.Graphics g)
Paints the Shadow of the process view.

Parameters:
g - the graphics object where the shadow has to paint

drawAll

public void drawAll(java.awt.Graphics g)
Overrides StandardDrawingView for adding scale effect.

Specified by:
drawAll in interface CH.ifa.draw.framework.DrawingView
Overrides:
drawAll in class CH.ifa.draw.standard.StandardDrawingView
Parameters:
g - Graphics object to draw to

draw

public void draw(java.awt.Graphics g,
                 CH.ifa.draw.framework.FigureEnumeration fe)
Override for adding scale effect.

Specified by:
draw in interface CH.ifa.draw.framework.DrawingView
Overrides:
draw in class CH.ifa.draw.standard.StandardDrawingView

prepareGraphics

public void prepareGraphics(java.awt.Graphics2D g2)
Prepares a graphics context for rendering. Sets scaling and rendering hints.

Parameters:
g2 - Graphics to preprare

drawHandles

public void drawHandles(java.awt.Graphics g)
Draws the currently active handles.

Specified by:
drawHandles in interface CH.ifa.draw.framework.DrawingView
Overrides:
drawHandles in class CH.ifa.draw.standard.StandardDrawingView
Parameters:
g - Graphics object to draw to

scrollIntoView

public void scrollIntoView(CH.ifa.draw.framework.Figure figure,
                           boolean addEnlargement)
Scrolls a figure container into view.

Parameters:
figure - Figure to show
addEnlargement - true: Adds an offset of 50 px to the display box of the element.
false: Does not add an enlargement offset

scrollRectToVisible

public void scrollRectToVisible(java.awt.Rectangle rect)
Overrides:
scrollRectToVisible in class javax.swing.JComponent

drawingRequestUpdate

public void drawingRequestUpdate(CH.ifa.draw.framework.DrawingChangeEvent e)
Specified by:
drawingRequestUpdate in interface CH.ifa.draw.framework.DrawingChangeListener
Overrides:
drawingRequestUpdate in class CH.ifa.draw.standard.StandardDrawingView

drawingInvalidated

public void drawingInvalidated(CH.ifa.draw.framework.DrawingChangeEvent e)
Adds a rectangle to the damage section after transforming it using the shadow layouter.

Specified by:
drawingInvalidated in interface CH.ifa.draw.framework.DrawingChangeListener
Overrides:
drawingInvalidated in class CH.ifa.draw.standard.StandardDrawingView
Parameters:
e - The DrawingChangeEvent that describes the invalidation

applyScale

public java.awt.Rectangle applyScale(java.awt.Rectangle r,
                                     boolean scaleToDoc)
Applies the current scale factor of the view to a rectangle.

Parameters:
r - rectangle to be scaled
scaleToDoc - true: Assumes that the coordinates are component coordinates that should be translated to document coordinates.
false: Assumes that the coordinates are document coordinates that should be translated to component coordinates.
Returns:
The scaled rectangle

applyScale

public java.awt.Point applyScale(java.awt.Point p,
                                 boolean scaleToDoc)
Applies the current scale factor of the view to a point.

Parameters:
p - Point to be scaled
scaleToDoc - true: Assumes that the coordinates are component coordinates that should be translated to document coordinates.
false: Assumes that the coordinates are document coordinates that should be translated to component coordinates.
Returns:
The scaled point

applyScale

public int applyScale(int coordinate,
                      boolean scaleToDoc)
Applies the current scale factor of the view to a coordinate.

Parameters:
coordinate - X or Y coordinate to be scaled
scaleToDoc - true: Assumes that the coordinates are component coordinates that should be translated to document coordinates.
false: Assumes that the coordinates are document coordinates that should be translated to component coordinates.
Returns:
The resulting coordinate

setVisibleRect

public void setVisibleRect(java.awt.Rectangle r)
Adjusts the scaling factor and view position according to the given rectangle.

Parameters:
r - Rectangle to scroll into view

getScaleFactor

public double getScaleFactor()
Gets the scaling factor.

Specified by:
getScaleFactor in interface Scalable

setScaleFactor

public void setScaleFactor(double scaleFactor)
Sets the scaling factor.

Specified by:
setScaleFactor in interface Scalable

selectionCount

public int selectionCount()
Gets the number of selected figures.

Specified by:
selectionCount in interface CH.ifa.draw.framework.DrawingView
Overrides:
selectionCount in class CH.ifa.draw.standard.StandardDrawingView

isFigureSelected

public boolean isFigureSelected(CH.ifa.draw.framework.Figure checkFigure)
Tests whether a given figure is selected.

Specified by:
isFigureSelected in interface CH.ifa.draw.framework.DrawingView
Overrides:
isFigureSelected in class CH.ifa.draw.standard.StandardDrawingView

selection

public java.util.Vector selection()
Specified by:
selection in interface CH.ifa.draw.framework.DrawingView
Overrides:
selection in class CH.ifa.draw.standard.StandardDrawingView

selectionZOrdered

public java.util.Vector selectionZOrdered()
Specified by:
selectionZOrdered in interface CH.ifa.draw.framework.DrawingView
Overrides:
selectionZOrdered in class CH.ifa.draw.standard.StandardDrawingView

addToSelection

public void addToSelection(CH.ifa.draw.framework.Figure figure)
Adds a figure to the current selection. The figure is only selected if it is also contained in the drawing associated with this drawing view.

Specified by:
addToSelection in interface CH.ifa.draw.framework.DrawingView
Overrides:
addToSelection in class CH.ifa.draw.standard.StandardDrawingView

removeFromSelection

public void removeFromSelection(CH.ifa.draw.framework.Figure figure)
Removes a figure from the selection.

Specified by:
removeFromSelection in interface CH.ifa.draw.framework.DrawingView
Overrides:
removeFromSelection in class CH.ifa.draw.standard.StandardDrawingView

singleSelect

public void singleSelect(CH.ifa.draw.framework.Figure figure)

clearSelection

public void clearSelection()
Clears the current selection.

Specified by:
clearSelection in interface CH.ifa.draw.framework.DrawingView
Overrides:
clearSelection in class CH.ifa.draw.standard.StandardDrawingView

fireSelectionChanged

public void fireSelectionChanged()
In addition to the super method, we fire an modeler.view.selectionchanged event.

Overrides:
fireSelectionChanged in class CH.ifa.draw.standard.StandardDrawingView

updateSelection

public void updateSelection()
Notifies the property browser of selection changes. If none or more than one element is selected, clear the property browser, else show the single element.


findHandle

public CH.ifa.draw.framework.Handle findHandle(int x,
                                               int y)
Finds a handle at the given coordinates.

Specified by:
findHandle in interface CH.ifa.draw.framework.DrawingView
Overrides:
findHandle in class CH.ifa.draw.standard.StandardDrawingView
Parameters:
x - Document coordinates
y - Document coordinates
Returns:
The hit handle or null if no handle is found

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
Handles key down events. All other keys are passed to the currently active tool.

Specified by:
keyPressed in interface java.awt.event.KeyListener
Overrides:
keyPressed in class CH.ifa.draw.standard.StandardDrawingView

keyReleased

public void keyReleased(java.awt.event.KeyEvent e)
Handles key up events. All keys are passed to the currently active tool.

Specified by:
keyReleased in interface java.awt.event.KeyListener
Overrides:
keyReleased in class CH.ifa.draw.standard.StandardDrawingView

displayPopupMenu

public void displayPopupMenu(CH.ifa.draw.framework.Figure figure,
                             java.awt.event.MouseEvent me)
Displays the popup menu for the given figure.

Parameters:
figure - Figure to display the menu for
me - Mouse event that caused the popup display or null if the popup has been initiated by a key

addBreakoutSupport

protected void addBreakoutSupport(java.lang.String actionName,
                                  int keyCode)
Adds breakout support for the specified key.

Parameters:
actionName - Arbitrary name of the breakout support action
keyCode - Key code that will initiate the breakout mode

getShadowLayouter

public ShadowLayouter getShadowLayouter()
Gets the shadow layouter.


setShadowLayouter

public void setShadowLayouter(ShadowLayouter shadowLayouter)
Sets the shadow layouter.


getFigureUnderCursor

public CH.ifa.draw.framework.Figure getFigureUnderCursor()
Gets the figure currently under the cursor or null.


setFigureUnderCursor

public void setFigureUnderCursor(CH.ifa.draw.framework.Figure figureUnderCursor)
Sets the figure currently under the cursor or null.


isGridDisplayed

public boolean isGridDisplayed()
Gets the grid visibility.


setGridDisplayed

public void setGridDisplayed(boolean gridDisplayed)
Sets the grid visibility.


getGridType

public int getGridType()
Gets the grid layout type.


setGridType

public void setGridType(int gridType)
Sets the grid layout type.


getGridSpacing

public int getGridSpacing()
Gets the grid spacing.


setGridSpacing

public void setGridSpacing(int gridSpacing)
Sets the grid spacing.


setSizeOffset

public void setSizeOffset(int sizeOffset)
Sets the size offset for workspace view enlargement.



Copyright © 2011. All Rights Reserved.