Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Runtime

org.eclipse.gmf.runtime.gef.ui.figures
Class WrapperNodeFigure

java.lang.Object
  extended by 

org.eclipse.draw2d.Figure
      extended by 

org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure
          extended by 
org.eclipse.gmf.runtime.gef.ui.figures.WrapperNodeFigure
All Implemented Interfaces:
IFigure, HandleBounds, IAnchorableFigure, IPolygonAnchorableFigure

public class WrapperNodeFigure
extends NodeFigure

Wrapper NodeFigure figure to contain other figures, which may have different borders.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.draw2d. Figure
Figure.FigureIterator, Figure.IdentitySearch
 
Nested classes/interfaces inherited from interface org.eclipse.draw2d. IFigure
IFigure.NoInsets
 
Field Summary
 
Fields inherited from class org.eclipse.gmf.runtime.gef.ui.figures. NodeFigure
szAnchor
 
Fields inherited from class org.eclipse.draw2d. Figure
bgColor, border, bounds, fgColor, flags, font, MAX_FLAG, maxSize, minSize, NO_MANAGER, prefSize, toolTip
 
Fields inherited from interface org.eclipse.draw2d. IFigure
MAX_DIMENSION, MIN_DIMENSION, NO_INSETS
 
Constructor Summary
WrapperNodeFigure ( IFigure subFigure)
          Composite pattern for wrapping a template list compartment around any potential figure.
 
Method Summary
 boolean containsPoint (int x, int y)
           
  Border getBorder ()
          This will return null since we have override the setBorder(Border) api.
  ConnectionAnchor getConnectionAnchor (java.lang.String terminal)
          Given a string identifier, return the associated anchor for that identifier
 java.lang.String getConnectionAnchorTerminal ( ConnectionAnchor c)
          Dynamically allocates a new anchor if needed.
  Rectangle getHandleBounds ()
           
  ConnectionAnchor getSourceConnectionAnchorAt ( Point p)
          Gets the source connection anchor at a given point on the figure.
  ConnectionAnchor getTargetConnectionAnchorAt ( Point p)
          Gets the target connection anchor at a given point on the figure.
protected  void paintFigure ( Graphics graphics)
           
 void setBorder ( Border border)
          Sets the subfigure border.
 
Methods inherited from class org.eclipse.gmf.runtime.gef.ui.figures. NodeFigure
applyTransparency, createAnchor, createConnectionAnchor, createDefaultAnchor, fillGradient, fillGradient, fillGradient, fillGradient, getConnectionAnchors, getDefaultAnchorID, getGradientColor1, getGradientColor2, getGradientStyle, getLineStyle, getLineWidth, getPath, getPolygonPoints, getSlidableAnchorArea, getTransparency, isDefaultAnchorArea, isUsingGradient, setGradientData, setIsUsingGradient, setLineStyle, setLineWidth, setTransparency
 
Methods inherited from class org.eclipse.draw2d. Figure
add, add, add, add, addAncestorListener, addCoordinateListener, addFigureListener, addFocusListener, addKeyListener, addLayoutListener, addListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, containsPoint, erase, findDescendantAtExcluding, findFigureAt, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, findMouseEventTargetInDescendantsAt, fireCoordinateSystemChanged, fireFigureMoved, fireMoved, firePropertyChange, firePropertyChange, firePropertyChange, getBackgroundColor, getBounds, getChildren, getClientArea, getClientArea, getCursor, getFlag, getFont, getForegroundColor, getInsets, getLayoutManager, getListeners, getLocalBackgroundColor, getLocalFont, getLocalForegroundColor, getLocation, getMaximumSize, getMinimumSize, getMinimumSize, getParent, getPreferredSize, getPreferredSize, getSize, getToolTip, getUpdateManager, handleFocusGained, handleFocusLost, handleKeyPressed, handleKeyReleased, handleMouseDoubleClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseHover, handleMouseMoved, handleMousePressed, handleMouseReleased, hasFocus, internalGetEventDispatcher, intersects, invalidate, invalidateTree, isCoordinateSystem, isEnabled, isFocusTraversable, isMirrored, isMouseEventTarget, isOpaque, isRequestFocusEnabled, isShowing, isValid, isValidationRoot, isVisible, layout, paint, paintBorder, paintChildren, paintClientArea, primTranslate, remove, removeAll, removeAncestorListener, removeCoordinateListener, removeFigureListener, removeFocusListener, removeKeyListener, removeLayoutListener, removeListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, revalidate, setBackgroundColor, setBounds, setChildrenDirection, setChildrenEnabled, setChildrenOrientation, setConstraint, setCursor, setEnabled, setFlag, setFocusTraversable, setFont, setForegroundColor, setLayoutManager, setLocation, setMaximumSize, setMinimumSize, setOpaque, setParent, setPreferredSize, setPreferredSize, setRequestFocusEnabled, setSize, setSize, setToolTip, setValid, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, useLocalCoordinates, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.draw2d. IFigure
add, add, add, add, addAncestorListener, addCoordinateListener, addFigureListener, addFocusListener, addKeyListener, addLayoutListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, containsPoint, erase, findFigureAt, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, getBackgroundColor, getBounds, getChildren, getClientArea, getClientArea, getCursor, getFont, getForegroundColor, getInsets, getLayoutManager, getLocalBackgroundColor, getLocalForegroundColor, getMaximumSize, getMinimumSize, getMinimumSize, getParent, getPreferredSize, getPreferredSize, getSize, getToolTip, getUpdateManager, handleFocusGained, handleFocusLost, handleKeyPressed, handleKeyReleased, handleMouseDoubleClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseHover, handleMouseMoved, handleMousePressed, handleMouseReleased, hasFocus, internalGetEventDispatcher, intersects, invalidate, invalidateTree, isCoordinateSystem, isEnabled, isFocusTraversable, isMirrored, isOpaque, isRequestFocusEnabled, isShowing, isVisible, paint, remove, removeAncestorListener, removeCoordinateListener, removeFigureListener, removeFocusListener, removeKeyListener, removeLayoutListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, revalidate, setBackgroundColor, setBounds, setConstraint, setCursor, setEnabled, setFocusTraversable, setFont, setForegroundColor, setLayoutManager, setLocation, setMaximumSize, setMinimumSize, setOpaque, setParent, setPreferredSize, setRequestFocusEnabled, setSize, setSize, setToolTip, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, validate
 

Constructor Detail

WrapperNodeFigure

public WrapperNodeFigure(
IFigure subFigure)
Composite pattern for wrapping a template list compartment around any potential figure.

Parameters:
subFigure - the IFigure that is being wrapped.
Method Detail

containsPoint

public boolean containsPoint(int x,
                             int y)
Specified by:
containsPoint in interface IFigure
Overrides:
containsPoint in class Figure

getHandleBounds

public 
Rectangle getHandleBounds()
Specified by:
getHandleBounds in interface HandleBounds
Overrides:
getHandleBounds in class NodeFigure

paintFigure

protected void paintFigure(
Graphics graphics)
Overrides:
paintFigure in class NodeFigure

getBorder

public 
Border getBorder()
This will return null since we have override the setBorder(Border) api.

Specified by:
getBorder in interface IFigure
Overrides:
getBorder in class Figure

setBorder

public void setBorder(
Border border)
Sets the subfigure border. We are not permitting them to update the wrapper border. We intepret it as setting the border of the subFigure instead.

Specified by:
setBorder in interface IFigure
Overrides:
setBorder in class Figure

getSourceConnectionAnchorAt

public 
ConnectionAnchor getSourceConnectionAnchorAt(
Point p)
Description copied from interface: IAnchorableFigure
Gets the source connection anchor at a given point on the figure.

Specified by:
getSourceConnectionAnchorAt in interface IAnchorableFigure
Overrides:
getSourceConnectionAnchorAt in class NodeFigure
Parameters:
p - Point on the figure that gives a hint which anchor to return.
Returns:
a ConnectionAnchor reference to an anchor associated with the given point on the figure.

getTargetConnectionAnchorAt

public 
ConnectionAnchor getTargetConnectionAnchorAt(
Point p)
Description copied from interface: IAnchorableFigure
Gets the target connection anchor at a given point on the figure.

Specified by:
getTargetConnectionAnchorAt in interface IAnchorableFigure
Overrides:
getTargetConnectionAnchorAt in class NodeFigure
Parameters:
p - Point on the figure that gives a hint which anchor to return.
Returns:
ConnectionAnchor reference to an anchor associated with the given point on the figure.

getConnectionAnchor

public 
ConnectionAnchor getConnectionAnchor(java.lang.String terminal)
Description copied from interface: IAnchorableFigure
Given a string identifier, return the associated anchor for that identifier

Specified by:
getConnectionAnchor in interface IAnchorableFigure
Overrides:
getConnectionAnchor in class NodeFigure
Parameters:
terminal - String identifier associated with the anchor
Returns:
ConnectionAnchor that is associated with the given string.

getConnectionAnchorTerminal

public java.lang.String getConnectionAnchorTerminal(
ConnectionAnchor c)
Description copied from interface: IAnchorableFigure
Dynamically allocates a new anchor if needed. Otherwise, recycles old anchors no longer in use.

Specified by:
getConnectionAnchorTerminal in interface IAnchorableFigure
Overrides:
getConnectionAnchorTerminal in class NodeFigure
Parameters:
c - the ConnectionAnchor reference to an anchor associated with the given point on the figure
Returns:
a String that represents the anchor identifier.

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire