Package cz.vutbr.fit.layout.segm.op
Class Separator
- java.lang.Object
-
- cz.vutbr.fit.layout.model.Rectangular
-
- cz.vutbr.fit.layout.segm.op.Separator
-
- All Implemented Interfaces:
Rect,Comparable<Separator>
public class Separator extends Rectangular implements Comparable<Separator>
- Author:
- radek A horizontal or vertical visual separator.
-
-
Field Summary
Fields Modifier and Type Field Description protected Areaarea1Left (top) separated area node (if any)protected Areaarea2Bottom (right) separated area node (if any)static shortBOXHstatic shortBOXVstatic shortHORIZONTALprotected shorttypeSeparator type -- either HORIZONTAL, VERTICAL or BOXstatic shortVERTICAL-
Fields inherited from class cz.vutbr.fit.layout.model.Rectangular
x1, x2, y1, y2
-
-
Constructor Summary
Constructors Constructor Description Separator(short type, int x1, int y1, int x2, int y2)Separator(short type, Rectangular rect)Separator(Separator orig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Separator other)AreagetArea1()AreagetArea2()shortgetType()intgetWeight()Separatorhsplit(Separator other)booleanisBoxSep()booleanisHorizontal()booleanisVertical()voidsetArea1(Area area1)voidsetArea2(Area area2)voidsetType(short type)StringtoString()Separatorvsplit(Separator other)-
Methods inherited from class cz.vutbr.fit.layout.model.Rectangular
contains, copy, encloses, enclosesX, enclosesY, equals, expandToEnclose, getArea, getHeight, getWidth, getX1, getX2, getY1, getY2, hsplit, intersection, intersects, intersectsX, intersectsY, isEmpty, midX, midY, move, replaceX, replaceY, setX1, setX2, setY1, setY2, union, vsplit
-
-
-
-
Field Detail
-
HORIZONTAL
public static final short HORIZONTAL
- See Also:
- Constant Field Values
-
VERTICAL
public static final short VERTICAL
- See Also:
- Constant Field Values
-
BOXH
public static final short BOXH
- See Also:
- Constant Field Values
-
BOXV
public static final short BOXV
- See Also:
- Constant Field Values
-
type
protected short type
Separator type -- either HORIZONTAL, VERTICAL or BOX
-
area1
protected Area area1
Left (top) separated area node (if any)
-
area2
protected Area area2
Bottom (right) separated area node (if any)
-
-
Constructor Detail
-
Separator
public Separator(short type, int x1, int y1, int x2, int y2)
-
Separator
public Separator(Separator orig)
-
Separator
public Separator(short type, Rectangular rect)
-
-
Method Detail
-
getType
public short getType()
-
setType
public void setType(short type)
-
isBoxSep
public boolean isBoxSep()
-
getArea1
public Area getArea1()
-
setArea1
public void setArea1(Area area1)
-
getArea2
public Area getArea2()
-
setArea2
public void setArea2(Area area2)
-
toString
public String toString()
- Overrides:
toStringin classRectangular
-
compareTo
public int compareTo(Separator other)
- Specified by:
compareToin interfaceComparable<Separator>
-
isHorizontal
public boolean isHorizontal()
-
isVertical
public boolean isVertical()
-
getWeight
public int getWeight()
-
-