Package prezoom.model
Class GAttributes
- java.lang.Object
-
- prezoom.model.AttributeMap
-
- prezoom.model.GAttributes
-
- All Implemented Interfaces:
Serializable,Cloneable,AttributeMapI,GAttributesI
public class GAttributes extends AttributeMap implements GAttributesI
The base attribute class that holds all the attribute an object has- Author:
- Zhijie Lan
create date: 2020/11/2
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Colorcolorprotected Booleanfilledprotected StringfontNameprotected DoublefontSizeprotected IntegerfontStyleprotected Doubleheightprotected IntegerlineWidthprotected BasicStrokestrokeprotected StringtextStringprotected Booleanvisibleprotected Doublewidthprotected Doublexprotected Doublex2protected Doubleyprotected Doubley2
-
Constructor Summary
Constructors Constructor Description GAttributes()the default value constructorGAttributes(Double x, Double y, Color color, Boolean filled, Integer lineWidth, Double width, Double height, Double x2, Double y2, Boolean visible, String fontName, Integer fontStyle, Double fontSize, String textString)the constructor with parameters
-
Method Summary
Modifier and Type Method Description GAttributesclone()The attributes can be cloneColorgetColor()BooleangetFilled()StringgetFontName()DoublegetFontSize()IntegergetFontStyle()DoublegetHeight()IntegergetLineWidth()BasicStrokegetStroke()StringgetTextString()BooleangetVisible()DoublegetWidth()DoublegetX()DoublegetX2()DoublegetY()DoublegetY2()voidsetColor(Color color)voidsetFilled(Boolean filled)voidsetFontName(String fontName)voidsetFontSize(Double fontSize)voidsetFontStyle(Integer fontStyle)voidsetHeight(Double height)voidsetLineWidth(Integer lineWidth)voidsetStroke(BasicStroke stroke)voidsetTextString(String textString)voidsetVisible(Boolean visible)when the objects are set to be invisible, change their color's alpha value in order to get a visual aid to identify invisible objectsvoidsetWidth(Double width)voidsetX(Double x)voidsetX2(Double x2)voidsetY(Double y)voidsetY2(Double y2)-
Methods inherited from class prezoom.model.AttributeMap
validAttributeMap, validGetterMap, validSetterMap
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface prezoom.model.AttributeMapI
validAttributeMap, validGetterMap, validSetterMap
-
-
-
-
Field Detail
-
textString
protected String textString
-
x
protected Double x
-
y
protected Double y
-
x2
protected Double x2
-
y2
protected Double y2
-
width
protected Double width
-
height
protected Double height
-
lineWidth
protected Integer lineWidth
-
color
protected Color color
-
filled
protected Boolean filled
-
visible
protected Boolean visible
-
stroke
protected BasicStroke stroke
-
fontName
protected String fontName
-
fontStyle
protected Integer fontStyle
-
fontSize
protected Double fontSize
-
-
Constructor Detail
-
GAttributes
public GAttributes()
the default value constructor
-
GAttributes
public GAttributes(Double x, Double y, Color color, Boolean filled, Integer lineWidth, Double width, Double height, Double x2, Double y2, Boolean visible, String fontName, Integer fontStyle, Double fontSize, String textString)
the constructor with parameters- Parameters:
x- location, xy- location, ycolor- paint colorfilled- whether filledlineWidth- width of lineswidth- width of the object, if applicableheight- height of the object, if applicablex2- x2 of the object, if applicabley2- y2 of the object, if applicablevisible- whether visiblefontName- font namefontSize- font sizefontStyle- plain, bold, or italictextString- the text content
-
-
Method Detail
-
clone
public GAttributes clone() throws CloneNotSupportedException
The attributes can be clone- Specified by:
clonein interfaceGAttributesI- Overrides:
clonein classObject- Returns:
- the cloned attributes
- Throws:
CloneNotSupportedException- nothing
-
getTextString
public String getTextString()
- Specified by:
getTextStringin interfaceGAttributesI
-
setTextString
public void setTextString(String textString)
- Specified by:
setTextStringin interfaceGAttributesI
-
getX
public Double getX()
- Specified by:
getXin interfaceGAttributesI
-
setX
public void setX(Double x)
- Specified by:
setXin interfaceGAttributesI
-
getY
public Double getY()
- Specified by:
getYin interfaceGAttributesI
-
setY
public void setY(Double y)
- Specified by:
setYin interfaceGAttributesI
-
getColor
public Color getColor()
- Specified by:
getColorin interfaceGAttributesI
-
setColor
public void setColor(Color color)
- Specified by:
setColorin interfaceGAttributesI
-
getFilled
public Boolean getFilled()
- Specified by:
getFilledin interfaceGAttributesI
-
setFilled
public void setFilled(Boolean filled)
- Specified by:
setFilledin interfaceGAttributesI
-
getLineWidth
public Integer getLineWidth()
- Specified by:
getLineWidthin interfaceGAttributesI
-
setLineWidth
public void setLineWidth(Integer lineWidth)
- Specified by:
setLineWidthin interfaceGAttributesI
-
getWidth
public Double getWidth()
- Specified by:
getWidthin interfaceGAttributesI
-
setWidth
public void setWidth(Double width)
- Specified by:
setWidthin interfaceGAttributesI
-
getHeight
public Double getHeight()
- Specified by:
getHeightin interfaceGAttributesI
-
setHeight
public void setHeight(Double height)
- Specified by:
setHeightin interfaceGAttributesI
-
getX2
public Double getX2()
- Specified by:
getX2in interfaceGAttributesI
-
setX2
public void setX2(Double x2)
- Specified by:
setX2in interfaceGAttributesI
-
getY2
public Double getY2()
- Specified by:
getY2in interfaceGAttributesI
-
setY2
public void setY2(Double y2)
- Specified by:
setY2in interfaceGAttributesI
-
getStroke
public BasicStroke getStroke()
- Specified by:
getStrokein interfaceGAttributesI
-
setStroke
public void setStroke(BasicStroke stroke)
- Specified by:
setStrokein interfaceGAttributesI
-
getVisible
public Boolean getVisible()
- Specified by:
getVisiblein interfaceGAttributesI
-
setVisible
public void setVisible(Boolean visible)
when the objects are set to be invisible, change their color's alpha value in order to get a visual aid to identify invisible objects- Specified by:
setVisiblein interfaceGAttributesI- Parameters:
visible- whether to be visible
-
getFontName
public String getFontName()
- Specified by:
getFontNamein interfaceGAttributesI
-
setFontName
public void setFontName(String fontName)
- Specified by:
setFontNamein interfaceGAttributesI
-
getFontStyle
public Integer getFontStyle()
- Specified by:
getFontStylein interfaceGAttributesI
-
setFontStyle
public void setFontStyle(Integer fontStyle)
- Specified by:
setFontStylein interfaceGAttributesI
-
getFontSize
public Double getFontSize()
- Specified by:
getFontSizein interfaceGAttributesI
-
setFontSize
public void setFontSize(Double fontSize)
- Specified by:
setFontSizein interfaceGAttributesI
-
-