Package com.treemap.swing.tagcloud

# Class LegacySwingTagCloudAlgorithm

java.lang.Object
com.treemap.AbstractAlgorithm
com.treemap.swing.tagcloud.LegacySwingTagCloudAlgorithm

All Implemented Interfaces:
  `Algorithm`, `TagCloudAlgorithm`

public class LegacySwingTagCloudAlgorithm extends AbstractAlgorithm implements TagCloudAlgorithm

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface com.treemap.tagcloud.TagCloudAlgorithm

  `TagCloudAlgorithm.OrientationMode, TagCloudAlgorithm.Spiral`

- ## Field Summary

  ### Fields inherited from interface com.treemap.tagcloud.TagCloudAlgorithm

  `PROPERTY_FONT, PROPERTY_ORIENTATIONMODE, PROPERTY_SPIRAL`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LegacySwingTagCloudAlgorithm()`
  `LegacySwingTagCloudAlgorithm(TagCloudAlgorithm.OrientationMode orientationMode, TagCloudAlgorithm.Spiral spiral, Font font)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `breadthFirstLayout(com.macrofocus.geom.Shape shape, MutableTreeMapNode parent, MutableTreeMapNode[] children, double sumSizes, int horizontalVanishingPoint, int verticalVanishingPoint, TreeMapWorker worker)`
  Arrange the items in the given array to fill the given shape.
  `Font`
  `getFont()`
  `int`
  `getMaxTags()`
  `int`
  `getnSubdivisions()`
  `TagCloudAlgorithm.OrientationMode`
  `getOrientationMode()`
  `MutableProperties`
  `getProperties()`
  Properties for storing layout algorithm specific options.
  `com.macrofocus.geom.Shape`
  `getShape(Point2d offsetAbsolute, double scale, TextShape shape)`
  `TagCloudAlgorithm.Spiral`
  `getSpiral()`
  `boolean`
  `isCompatible(com.macrofocus.geom.Shape shape)`
  Indicates whether the layout algorithm can handle the given geometry of its parent
  `boolean`
  `isRenderingLeafLabelsSupported()`
  `boolean`
  `isRenderingParentLabelSupported()`
  `boolean`
  `isSpaceFilling()`
  `boolean`
  `newWordIntersectsPlacedWords(SwingWord word, List<SwingWord> placedWords)`
  `void`
  `setMaxTags(int maxTags)`
  `void`
  `setnSubdivisions(int nSubdivisions)`
  `String`
  `toString()`

  ### Methods inherited from class com.treemap.AbstractAlgorithm

  `depthFirstLayout, finishLayout, isChildContained, isColorParent, iterator, startLayout, sum`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface com.treemap.Algorithm

  `depthFirstLayout, finishLayout, isChildContained, isColorParent, iterator, startLayout`

- ## Constructor Details

  - ### LegacySwingTagCloudAlgorithm

    public LegacySwingTagCloudAlgorithm()

  - ### LegacySwingTagCloudAlgorithm

    public LegacySwingTagCloudAlgorithm(TagCloudAlgorithm.OrientationMode orientationMode, TagCloudAlgorithm.Spiral spiral, Font font)

- ## Method Details

  - ### getProperties

    public MutableProperties getProperties()
    Description copied from interface: `Algorithm`
    Properties for storing layout algorithm specific options.
    Specified by:
      `getProperties` in interface `Algorithm`
    Overrides:
      `getProperties` in class `AbstractAlgorithm`
    Returns:
      the specific properties of this algorithm

  - ### breadthFirstLayout

    public boolean breadthFirstLayout(com.macrofocus.geom.Shape shape, MutableTreeMapNode parent, MutableTreeMapNode[] children, double sumSizes, int horizontalVanishingPoint, int verticalVanishingPoint, TreeMapWorker worker)
    Description copied from interface: `Algorithm`
    Arrange the items in the given array to fill the given shape. This is called during the first pass, while traversing the tree top down.
    Specified by:
      `breadthFirstLayout` in interface `Algorithm`
    Parameters:
      `shape` - the current rectangle being divided.
      `parent` - the parent node.
      `children` - the items to map.
      `sumSizes` - the size of the parent.
      `horizontalVanishingPoint` -
      `verticalVanishingPoint` -
      `worker` - the worker thread
    Returns:
      true if the layout has been cancelled, false otherwise

  - ### getShape

    public com.macrofocus.geom.Shape getShape(Point2d offsetAbsolute, double scale, TextShape shape)

  - ### newWordIntersectsPlacedWords

    public boolean newWordIntersectsPlacedWords(SwingWord word, List<SwingWord> placedWords)

  - ### isCompatible

    public boolean isCompatible(com.macrofocus.geom.Shape shape)
    Description copied from interface: `Algorithm`
    Indicates whether the layout algorithm can handle the given geometry of its parent
    Specified by:
      `isCompatible` in interface `Algorithm`
    Parameters:
      `shape` - the geometry of its parent
    Returns:
      true if it can lay out the children using the specified geometrical shape

  - ### isRenderingLeafLabelsSupported

    public boolean isRenderingLeafLabelsSupported()
    Specified by:
      `isRenderingLeafLabelsSupported` in interface `Algorithm`
    Overrides:
      `isRenderingLeafLabelsSupported` in class `AbstractAlgorithm`

  - ### isRenderingParentLabelSupported

    public boolean isRenderingParentLabelSupported()
    Specified by:
      `isRenderingParentLabelSupported` in interface `Algorithm`
    Overrides:
      `isRenderingParentLabelSupported` in class `AbstractAlgorithm`

  - ### getMaxTags

    public int getMaxTags()
    Specified by:
      `getMaxTags` in interface `TagCloudAlgorithm`

  - ### setMaxTags

    public void setMaxTags(int maxTags)
    Specified by:
      `setMaxTags` in interface `TagCloudAlgorithm`

  - ### getnSubdivisions

    public int getnSubdivisions()
    Specified by:
      `getnSubdivisions` in interface `TagCloudAlgorithm`

  - ### setnSubdivisions

    public void setnSubdivisions(int nSubdivisions)
    Specified by:
      `setnSubdivisions` in interface `TagCloudAlgorithm`

  - ### getFont

    public Font getFont()
    Specified by:
      `getFont` in interface `TagCloudAlgorithm`

  - ### getSpiral

    public TagCloudAlgorithm.Spiral getSpiral()
    Specified by:
      `getSpiral` in interface `TagCloudAlgorithm`

  - ### getOrientationMode

    public TagCloudAlgorithm.OrientationMode getOrientationMode()
    Specified by:
      `getOrientationMode` in interface `TagCloudAlgorithm`

  - ### isSpaceFilling

    public boolean isSpaceFilling()
    Specified by:
      `isSpaceFilling` in interface `Algorithm`
    Overrides:
      `isSpaceFilling` in class `AbstractAlgorithm`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`