org.eclipse.zest.layouts.algorithms

## Class HorizontalShift

- java.lang.Object
- - org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm
  - - org.eclipse.zest.layouts.algorithms.HorizontalShift

All Implemented Interfaces:
  LayoutAlgorithm, Stoppable

    public class HorizontalShift
    extends AbstractLayoutAlgorithm

This layout shifts overlapping nodes to the right.

### Field Summary

### Fields inherited from class org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm

`comparator, filter, internalAsynchronous, internalContinuous, layout_styles, layoutStopped, MIN_ENTITY_SIZE, resizeEntitiesAfterLayout`

### Constructor Summary

Constructors
Constructor and Description
`HorizontalShift(int styles)`

### Method Summary

Methods
`protected void` `applyLayoutInternal(org.eclipse.zest.layouts.dataStructures.InternalNode[] entitiesToLayout, org.eclipse.zest.layouts.dataStructures.InternalRelationship[] relationshipsToConsider, double boundsX, double boundsY, double boundsWidth, double boundsHeight)` Apply the layout to the given entities.
`protected int` `getCurrentLayoutStep()` Gets the current layout step
`protected int` `getTotalNumberOfLayoutSteps()` Gets the total number of steps in this layout
`protected boolean` `isValidConfiguration(boolean asynchronous, boolean continuous)` Determines if the configuration is valid for this layout
`protected void` `postLayoutAlgorithm(org.eclipse.zest.layouts.dataStructures.InternalNode[] entitiesToLayout, org.eclipse.zest.layouts.dataStructures.InternalRelationship[] relationshipsToConsider)` Code called after the layout algorithm ends
`protected void` `preLayoutAlgorithm(org.eclipse.zest.layouts.dataStructures.InternalNode[] entitiesToLayout, org.eclipse.zest.layouts.dataStructures.InternalRelationship[] relationshipsToConsider, double x, double y, double width, double height)` Code called before the layout algorithm starts
`void` `setLayoutArea(double x, double y, double width, double height)`

### Methods inherited from class org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm

`addEntity, addProgressListener, addRelationship, applyLayout, defaultFitWithinBounds, defaultFitWithinBounds, fireProgressEnded, fireProgressEvent, fireProgressStarted, getEntityAspectRatio, getLayoutBounds, getLocalLocation, getNumberOfProgressListeners, getStyle, isRunning, removeEntity, removeProgressListener, removeRelationship, removeRelationships, removeRelationships, setComparator, setEntityAspectRatio, setFilter, setStyle, stop, updateBendPoints, updateEntities, updateLayoutLocations, updateRelationships, verifyInput`

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

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

### Constructor Detail

#### HorizontalShift

    public HorizontalShift(int styles)

### Method Detail

#### applyLayoutInternal

    protected void applyLayoutInternal(org.eclipse.zest.layouts.dataStructures.InternalNode[] entitiesToLayout,
                           org.eclipse.zest.layouts.dataStructures.InternalRelationship[] relationshipsToConsider,
                           double boundsX,
                           double boundsY,
                           double boundsWidth,
                           double boundsHeight)

Description copied from class: `AbstractLayoutAlgorithm`
Apply the layout to the given entities. The entities will be moved and resized based on the algorithm.

Specified by:
  `applyLayoutInternal` in class `AbstractLayoutAlgorithm`
Parameters:
  `entitiesToLayout` - Apply the algorithm to these entities
  `relationshipsToConsider` - Only consider these relationships when applying the algorithm.

#### getCurrentLayoutStep

    protected int getCurrentLayoutStep()

Description copied from class: `AbstractLayoutAlgorithm`
Gets the current layout step

Specified by:
  `getCurrentLayoutStep` in class `AbstractLayoutAlgorithm`
Returns:

#### getTotalNumberOfLayoutSteps

    protected int getTotalNumberOfLayoutSteps()

Description copied from class: `AbstractLayoutAlgorithm`
Gets the total number of steps in this layout

Specified by:
  `getTotalNumberOfLayoutSteps` in class `AbstractLayoutAlgorithm`

#### isValidConfiguration

    protected boolean isValidConfiguration(boolean asynchronous,
                               boolean continuous)

Description copied from class: `AbstractLayoutAlgorithm`
Determines if the configuration is valid for this layout

Specified by:
  `isValidConfiguration` in class `AbstractLayoutAlgorithm`

#### postLayoutAlgorithm

    protected void postLayoutAlgorithm(org.eclipse.zest.layouts.dataStructures.InternalNode[] entitiesToLayout,
                           org.eclipse.zest.layouts.dataStructures.InternalRelationship[] relationshipsToConsider)

Description copied from class: `AbstractLayoutAlgorithm`
Code called after the layout algorithm ends

Specified by:
  `postLayoutAlgorithm` in class `AbstractLayoutAlgorithm`

#### preLayoutAlgorithm

    protected void preLayoutAlgorithm(org.eclipse.zest.layouts.dataStructures.InternalNode[] entitiesToLayout,
                          org.eclipse.zest.layouts.dataStructures.InternalRelationship[] relationshipsToConsider,
                          double x,
                          double y,
                          double width,
                          double height)

Description copied from class: `AbstractLayoutAlgorithm`
Code called before the layout algorithm starts

Specified by:
  `preLayoutAlgorithm` in class `AbstractLayoutAlgorithm`

#### setLayoutArea

    public void setLayoutArea(double x,
                     double y,
                     double width,
                     double height)

Specified by:
  `setLayoutArea` in class `AbstractLayoutAlgorithm`