Search this API

y.view.hierarchy
Class ProxyAutoBoundsNodeRealizer

java.lang.Object
  extended by y.view.NodeRealizer
      extended by y.view.ShapeNodeRealizer
          extended by y.view.ProxyShapeNodeRealizer
              extended by y.view.hierarchy.ProxyAutoBoundsNodeRealizer
All Implemented Interfaces:
NodeLayout, AutoBoundsFeature, SizeConstraintProvider

public class ProxyAutoBoundsNodeRealizer
extends ProxyShapeNodeRealizer
implements AutoBoundsFeature, SizeConstraintProvider

A proxy node realizer that implements the auto bounds feature. If the realizer delegate of this class implements auto bounds feature as well, the corresponding interface calls will be delegated to that realizer. This realizer can be used to maintain different realizer each of which represents a different state of a group node. Typically this realizer will maintain two realizers of type GroupNodeRealizer. One realizer will be used to represent an open group the other to represent a closed group.

 

Nested Class Summary
 
Nested classes/interfaces inherited from interface y.view.SizeConstraintProvider
SizeConstraintProvider.Default
 
Field Summary
 
Fields inherited from class y.view.ShapeNodeRealizer
DIAMOND, ELLIPSE, FAT_ARROW, FAT_ARROW_2, HEXAGON, KEY_SLOPPY_RECT_PAINTING, OCTAGON, PARALLELOGRAM, PARALLELOGRAM_2, RECT, RECT_3D, ROUND_RECT, shape, STAR5, STAR6, STAR8, TRAPEZOID, TRAPEZOID_2, TRIANGLE, TRIANGLE_2, VALUE_SLOPPY_RECT_PAINTING_OFF
 
Fields inherited from class y.view.NodeRealizer
height, HOTSPOT_E, HOTSPOT_N, HOTSPOT_NE, HOTSPOT_NONE, HOTSPOT_NW, HOTSPOT_S, HOTSPOT_SE, HOTSPOT_SW, HOTSPOT_W, width, x, y
 
Constructor Summary
ProxyAutoBoundsNodeRealizer()
           
ProxyAutoBoundsNodeRealizer(NodeRealizer arg)
           
 
Method Summary
 NodeRealizer createCopy(NodeRealizer nr)
          Creates a copy of this realizer type that will be initialized with the values found in the given realizer.
 YInsets getAutoBoundsInsets()
          This call will be delegated to the internal realizer, if that realizer implements the AutoBoundsFeature interface.
 YDimension getMaximumSize()
          Returns the maximum size the realizer that implements this interface can have.
 java.awt.geom.Rectangle2D getMinimalAutoBounds()
          This call will be delegated to the internal realizer, if that realizer implements the AutoBoundsFeature interface.
 YDimension getMinimumSize()
          Returns the minimum size the realizer that implements this interface must have.
 boolean isAutoBoundsEnabled()
          This call will be delegated to the internal realizer, if that realizer implements the AutoBoundsFeature interface.
 void setAutoBoundsEnabled(boolean auto)
          This call will be delegated to the internal realizer, if that realizer implements the AutoBoundsFeature interface.
 void setAutoBoundsInsets(java.awt.Insets insets)
          Deprecated. Use setAutoBoundsInsets(y.geom.YInsets) instead.
 void setAutoBoundsInsets(YInsets insets)
          This call will be delegated to the internal realizer, if that realizer implements the AutoBoundsFeature interface.
 
Methods inherited from class y.view.ProxyShapeNodeRealizer
addLabel, addPort, addRealizer, calcUnionRect, calcUnionRect, contains, createNodeLabel, findBBIntersection, findIntersection, getBoundingBox, getCenterX, getCenterY, getFillColor, getFillColor2, getHeight, getLabel, getLabel, getLabelText, getLayer, getLineColor, getLineType, getMouseInputEditorProvider, getPort, getPortCandidates, getRealizer, getRealizerDelegate, getShapeType, getWidth, getX, getY, hotSpotHit, intersects, invalidatePortPositions, isInBox, isSelected, isTransparent, isVisible, labelCount, moveBy, paint, paintHotSpots, paintLayer, paintLayerSloppy, paintNode, paintSloppy, paintText, portCount, ports, read, realizerCount, removeLabel, removeLabel, removePort, removePort, removeRealizer, setCenter, setCenterX, setCenterY, setEdgesDirty, setFillColor, setFillColor2, setFrame, setFrame, setHeight, setLabel, setLabelText, setLayer, setLayer, setLineColor, setLineType, setLocation, setRealizer, setRealizerDelegate, setSelected, setShapeType, setSize, setTransparent, setVisible, setWidth, setX, setY, write
 
Methods inherited from class y.view.ShapeNodeRealizer
createSelectionColor, getDropShadowColor, getDropShadowOffsetX, getDropShadowOffsetY, isDropShadowVisible, isRaisedBorderEnabled, paint3DBorder, paintFilledShape, paintShadow, paintShapeBorder, setDropShadowColor, setDropShadowOffsetX, setDropShadowOffsetY, setRaisedBorderEnabled, shapeTypeToStringMap
 
Methods inherited from class y.view.NodeRealizer
boundsChanged, calcUnionRectImpl, calcUnionRectLabels, calcUnionRectPorts, createCopy, getAutoBoundsFeature, getHotSpotColor, getNode, getSizeConstraintProvider, getSloppySelectionColor, labelBoundsChanged, paintPorts, repaint, setHotSpotColor, setSloppySelectionColor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyAutoBoundsNodeRealizer

public ProxyAutoBoundsNodeRealizer()

ProxyAutoBoundsNodeRealizer

public ProxyAutoBoundsNodeRealizer(NodeRealizer arg)
Method Detail

createCopy

public NodeRealizer createCopy(NodeRealizer nr)
Description copied from class: ShapeNodeRealizer
Creates a copy of this realizer type that will be initialized with the values found in the given realizer.

Overrides:
createCopy in class ProxyShapeNodeRealizer
Parameters:
nr - the prototype realizer whose attributes will be copied.

getAutoBoundsInsets

public YInsets getAutoBoundsInsets()
This call will be delegated to the internal realizer, if that realizer implements the AutoBoundsFeature interface. Otherwise empty Insets will be returned.

Specified by:
getAutoBoundsInsets in interface AutoBoundsFeature

setAutoBoundsInsets

public void setAutoBoundsInsets(java.awt.Insets insets)
Deprecated. Use setAutoBoundsInsets(y.geom.YInsets) instead.

This call will be delegated to the internal realizer, if that realizer implements the AutoBoundsFeature interface. Otherwise calling this method has no effect.

Parameters:
insets - the insets to add to the minimal auto bounds.

setAutoBoundsInsets

public void setAutoBoundsInsets(YInsets insets)
This call will be delegated to the internal realizer, if that realizer implements the AutoBoundsFeature interface. Otherwise calling this method has no effect.

Specified by:
setAutoBoundsInsets in interface AutoBoundsFeature
Parameters:
insets - the insets to add to the minimal auto bounds.

isAutoBoundsEnabled

public boolean isAutoBoundsEnabled()
This call will be delegated to the internal realizer, if that realizer implements the AutoBoundsFeature interface. Otherwise false will be returned.

Specified by:
isAutoBoundsEnabled in interface AutoBoundsFeature

setAutoBoundsEnabled

public void setAutoBoundsEnabled(boolean auto)
This call will be delegated to the internal realizer, if that realizer implements the AutoBoundsFeature interface. Otherwise calling this method has no effect.

Specified by:
setAutoBoundsEnabled in interface AutoBoundsFeature

getMinimalAutoBounds

public java.awt.geom.Rectangle2D getMinimalAutoBounds()
This call will be delegated to the internal realizer, if that realizer implements the AutoBoundsFeature interface. Otherwise bounds with negative size be returned.

Specified by:
getMinimalAutoBounds in interface AutoBoundsFeature

getMinimumSize

public YDimension getMinimumSize()
Description copied from interface: SizeConstraintProvider
Returns the minimum size the realizer that implements this interface must have.

Specified by:
getMinimumSize in interface SizeConstraintProvider
Returns:
the minimum size the realizer that implements this interface must have.

getMaximumSize

public YDimension getMaximumSize()
Description copied from interface: SizeConstraintProvider
Returns the maximum size the realizer that implements this interface can have.

Specified by:
getMaximumSize in interface SizeConstraintProvider
Returns:
the maximum size the realizer that implements this interface can have.

© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.