com.intellij.formatting
Class Indent

java.lang.Object
  extended by com.intellij.formatting.Indent

public abstract class Indent
extends java.lang.Object

The indent setting for a formatting model block. Indicates how the block is indented relative to its parent block.

See Also:
Block.getIndent(), ChildAttributes.getChildIndent()

Constructor Summary
Indent()
           
 
Method Summary
static Indent getAbsoluteLabelIndent()
          Returns the "absolute label" indent instance, indicating that the block will be indented by the number of spaces indicated in the "Project Code Style | General | Label indent" setting from the leftmost column in the document.
static Indent getAbsoluteNoneIndent()
          Returns the "absolute none" indent instance, indicating that the block will be placed at the leftmost column in the document.
static Indent getContinuationIndent()
          Returns the "continuation" indent instance, indicating that the block will be indented by the number of spaces indicated in the "Project Code Style | General | Continuation indent" setting relative to its parent block.
static Indent getContinuationWithoutFirstIndent()
          Returns the "continuation without first" indent instance, indicating that the block will be indented by the number of spaces indicated in the "Project Code Style | General | Continuation indent" setting relative to its parent block, unless this block is the first of the children of its parent having the same indent type.
static Indent getLabelIndent()
          Returns the "label" indent instance, indicating that the block will be indented by the number of spaces indicated in the "Project Code Style | General | Label indent" setting relative to its parent block.
static Indent getNoneIndent()
          Returns the standard "empty indent" instance, indicating that the block is not indented relative to its parent block.
static Indent getNormalIndent()
          Returns an instance of a regular indent, with the width specified in "Project Code Style | General | Indent".
static Indent getSpaceIndent(int spaces)
          Returns an indent with the specified width.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Indent

public Indent()
Method Detail

getNormalIndent

public static Indent getNormalIndent()
Returns an instance of a regular indent, with the width specified in "Project Code Style | General | Indent".

Returns:
the indent instance.

getNoneIndent

public static Indent getNoneIndent()
Returns the standard "empty indent" instance, indicating that the block is not indented relative to its parent block.

Returns:
the empty indent instance.

getAbsoluteNoneIndent

public static Indent getAbsoluteNoneIndent()
Returns the "absolute none" indent instance, indicating that the block will be placed at the leftmost column in the document.

Returns:
the indent instance.

getAbsoluteLabelIndent

public static Indent getAbsoluteLabelIndent()
Returns the "absolute label" indent instance, indicating that the block will be indented by the number of spaces indicated in the "Project Code Style | General | Label indent" setting from the leftmost column in the document.

Returns:
the indent instance.

getLabelIndent

public static Indent getLabelIndent()
Returns the "label" indent instance, indicating that the block will be indented by the number of spaces indicated in the "Project Code Style | General | Label indent" setting relative to its parent block.

Returns:
the indent instance.

getContinuationIndent

public static Indent getContinuationIndent()
Returns the "continuation" indent instance, indicating that the block will be indented by the number of spaces indicated in the "Project Code Style | General | Continuation indent" setting relative to its parent block.

Returns:
the indent instance.

getContinuationWithoutFirstIndent

public static Indent getContinuationWithoutFirstIndent()
Returns the "continuation without first" indent instance, indicating that the block will be indented by the number of spaces indicated in the "Project Code Style | General | Continuation indent" setting relative to its parent block, unless this block is the first of the children of its parent having the same indent type. This is used for things like parameter lists, where the first parameter does not have any indent and the remaining parameters are indented by the continuation indent.

Returns:
the indent instance.

getSpaceIndent

public static Indent getSpaceIndent(int spaces)
Returns an indent with the specified width.

Parameters:
spaces - the number of spaces in the indent.
Returns:
the indent instance.