Package cz.vutbr.fit.layout.segm.op
Class SortByPositionOperator
- java.lang.Object
-
- cz.vutbr.fit.layout.impl.BaseService
-
- cz.vutbr.fit.layout.impl.BaseParametrizedOperation
-
- cz.vutbr.fit.layout.impl.BaseOperator
-
- cz.vutbr.fit.layout.segm.op.SortByPositionOperator
-
- All Implemented Interfaces:
AreaTreeOperator,ParametrizedOperation,Service
- Direct Known Subclasses:
SortByLinesOperator
public class SortByPositionOperator extends BaseOperator
- Author:
- burgetr
-
-
Field Summary
Fields Modifier and Type Field Description protected booleancolumnFirst
-
Constructor Summary
Constructors Constructor Description SortByPositionOperator()SortByPositionOperator(boolean columnFirst)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapply(AreaTree atree)Applies the operation to the given tree.voidapply(AreaTree atree, Area root)Applies the operation to the given subtree of the tree.List<Parameter>defineParams()Creates the parameter definition for this operation.StringgetCategory()A category that allows to group similar services.booleangetColumnFirst()StringgetDescription()Obtains a longer description of the service.StringgetId()Obtains a unique ID of the serviceStringgetName()Obtains a descriptive name of the service that may be presented to the user.protected voidrecursivelySortChildAreas(Area root, boolean columnFirst)voidsetColumnFirst(boolean columnFirst)-
Methods inherited from class cz.vutbr.fit.layout.impl.BaseOperator
toString
-
Methods inherited from class cz.vutbr.fit.layout.impl.BaseParametrizedOperation
getParam, getParams, getParamString, setParam
-
Methods inherited from class cz.vutbr.fit.layout.impl.BaseService
getServiceManager, setServiceManager
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface cz.vutbr.fit.layout.api.ParametrizedOperation
getParam, getParams, getParamString, setParam
-
Methods inherited from interface cz.vutbr.fit.layout.api.Service
setServiceManager
-
-
-
-
Method Detail
-
getId
public String getId()
Description copied from interface:ServiceObtains a unique ID of the service
-
getName
public String getName()
Description copied from interface:ServiceObtains a descriptive name of the service that may be presented to the user.- Returns:
- the operator name
-
getDescription
public String getDescription()
Description copied from interface:ServiceObtains a longer description of the service.- Returns:
- the description
-
getCategory
public String getCategory()
Description copied from interface:ServiceA category that allows to group similar services.- Returns:
- Category name or
nullwhen no category is assigned.
-
defineParams
public List<Parameter> defineParams()
Description copied from class:BaseParametrizedOperationCreates the parameter definition for this operation.- Overrides:
defineParamsin classBaseParametrizedOperation- Returns:
- The list of parameters.
-
getColumnFirst
public boolean getColumnFirst()
-
setColumnFirst
public void setColumnFirst(boolean columnFirst)
-
apply
public void apply(AreaTree atree)
Description copied from interface:AreaTreeOperatorApplies the operation to the given tree.- Parameters:
atree- the area tree to be modified.
-
apply
public void apply(AreaTree atree, Area root)
Description copied from interface:AreaTreeOperatorApplies the operation to the given subtree of the tree.- Parameters:
atree- the area tree to be modified.root- the root node of the affected subtree.
-
recursivelySortChildAreas
protected void recursivelySortChildAreas(Area root, boolean columnFirst)
-
-