Package omero.gateway.model
Class ShapeSettingsData
- java.lang.Object
-
- omero.gateway.model.DataObject
-
- omero.gateway.model.ShapeSettingsData
-
public class ShapeSettingsData extends DataObject
Stores the settings related to a given shape.- Since:
- 3.0-Beta4
-
-
Field Summary
Fields Modifier and Type Field Description static java.awt.ColorDEFAULT_FILL_COLOURThe default fill color.static java.awt.ColorDEFAULT_FILL_COLOUR_ALPHAThe default fill color.static java.lang.StringDEFAULT_FONT_FAMILYThe default font family.static intDEFAULT_FONT_SIZEThe default font size in "pt".static java.awt.ColorDEFAULT_STROKE_COLOURThe default stroke color.static doubleDEFAULT_STROKE_WIDTHThe default stroke width.static java.lang.StringFONT_BOLDSet if font bold.static java.lang.StringFONT_BOLD_ITALICSet if font bold.static java.lang.StringFONT_ITALICSet if font italic.static java.lang.StringFONT_REGULARSet if font bold.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.awt.ColorgetColor(int rgba)Creates aColorobject from an RGBA integer valuejava.awt.ColorgetFill()Returns the fill color.java.lang.StringgetFillRule()Returns the fill rule.java.awt.FontgetFont()Get the style of the font for Shape.java.lang.StringgetFontFamily()Returns the stroke.omero.model.LengthgetFontSize(omero.model.enums.UnitsLength unit)Returns the stroke.java.lang.StringgetFontStyle()Returns the font style.java.lang.StringgetMarkerEnd()Returns the marker end.java.lang.StringgetMarkerStart()Returns the marker start.static intgetRGBA(java.awt.Color c)Returns the Color's RGBA value as integerjava.awt.ColorgetStroke()Returns the color of the stroke.double[]getStrokeDashArray()Returns the stroke dashes.omero.model.LengthgetStrokeWidth(omero.model.enums.UnitsLength unit)Returns the stroke's width (or 1 px if it's not set or less than or equals to 0)booleanisFontBold()Returnstrueif it is bold,falseotherwise.booleanisFontItalic()Returnstrueif it is italic,falseotherwise.voidsetFill(java.awt.Color fillColour)Set the fill color.voidsetFillRule(java.lang.String fillRule)Set the fill rule.voidsetFontFamily(java.lang.String fontFamily)Returns the stroke.voidsetFontSize(omero.model.Length fontSize)Set the size of the font.voidsetFontStyle(java.lang.String fontStyle)Sets the style of the font.voidsetMarkerEnd(java.lang.String end)Sets the marker end.voidsetMarkerStart(java.lang.String start)Sets the marker start.voidsetStroke(java.awt.Color strokeColour)Set the stroke color.voidsetStrokeDashArray(double[] dashArray)Set the stroke dashes.voidsetStrokeWidth(omero.model.Length strokeWidth)Set the stroke width.-
Methods inherited from class omero.gateway.model.DataObject
asAnnotation, asChannel, asDataset, asExperimenter, asFolder, asGroup, asIAnnotated, asImage, asIObject, asPixels, asPlaneInfo, asPlate, asPojo, asPojos, asPojos, asProject, asScreen, asWell, asWellSample, canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, getCreated, getDetails, getGroupId, getId, getOwner, getPermissions, getUpdated, getVersion, isDirty, isLoaded, nullDetails, nullSafe, nullSafe, nullSafe, nullSafe, nullSafe, nullSafe, nullSafe, nullSafe, setDirty, setId, setValue, setVersion, timeOfEvent, toString
-
-
-
-
Field Detail
-
DEFAULT_FILL_COLOUR
public static final java.awt.Color DEFAULT_FILL_COLOUR
The default fill color.
-
DEFAULT_FILL_COLOUR_ALPHA
public static final java.awt.Color DEFAULT_FILL_COLOUR_ALPHA
The default fill color.
-
DEFAULT_STROKE_COLOUR
public static final java.awt.Color DEFAULT_STROKE_COLOUR
The default stroke color.
-
DEFAULT_FONT_SIZE
public static final int DEFAULT_FONT_SIZE
The default font size in "pt".- See Also:
- Constant Field Values
-
DEFAULT_FONT_FAMILY
public static final java.lang.String DEFAULT_FONT_FAMILY
The default font family.- See Also:
- Constant Field Values
-
DEFAULT_STROKE_WIDTH
public static final double DEFAULT_STROKE_WIDTH
The default stroke width.- See Also:
- Constant Field Values
-
FONT_ITALIC
public static final java.lang.String FONT_ITALIC
Set if font italic.- See Also:
- Constant Field Values
-
FONT_BOLD
public static final java.lang.String FONT_BOLD
Set if font bold.- See Also:
- Constant Field Values
-
FONT_BOLD_ITALIC
public static final java.lang.String FONT_BOLD_ITALIC
Set if font bold.- See Also:
- Constant Field Values
-
FONT_REGULAR
public static final java.lang.String FONT_REGULAR
Set if font bold.- See Also:
- Constant Field Values
-
-
Method Detail
-
getRGBA
public static int getRGBA(java.awt.Color c)
Returns the Color's RGBA value as integer- Parameters:
c- TheColor- Returns:
- See above.
-
getColor
public static java.awt.Color getColor(int rgba)
Creates aColorobject from an RGBA integer value- Parameters:
rgba- The RGBA value- Returns:
- See above.
-
getFillRule
public java.lang.String getFillRule()
Returns the fill rule.- Returns:
- See above.
-
setFillRule
public void setFillRule(java.lang.String fillRule)
Set the fill rule.- Parameters:
fillRule- See above.
-
getFill
public java.awt.Color getFill()
Returns the fill color.- Returns:
- See above.
-
setFill
public void setFill(java.awt.Color fillColour)
Set the fill color.- Parameters:
fillColour- See above.
-
getStroke
public java.awt.Color getStroke()
Returns the color of the stroke.- Returns:
- See above.
-
setStroke
public void setStroke(java.awt.Color strokeColour)
Set the stroke color.- Parameters:
strokeColour- See above.
-
getStrokeWidth
public omero.model.Length getStrokeWidth(omero.model.enums.UnitsLength unit) throws ome.model.units.BigResultReturns the stroke's width (or 1 px if it's not set or less than or equals to 0)- Parameters:
unit- The unit (may be null, in which case no conversion will be performed)- Returns:
- See above.
- Throws:
ome.model.units.BigResult- If an arithmetic under-/overflow occurred
-
setStrokeWidth
public void setStrokeWidth(omero.model.Length strokeWidth)
Set the stroke width.- Parameters:
strokeWidth- See above.
-
getStrokeDashArray
public double[] getStrokeDashArray()
Returns the stroke dashes.- Returns:
- See above.
-
setStrokeDashArray
public void setStrokeDashArray(double[] dashArray)
Set the stroke dashes.- Parameters:
dashArray- See above.
-
getFont
public java.awt.Font getFont()
Get the style of the font for Shape.- Returns:
- See above.
-
getFontFamily
public java.lang.String getFontFamily()
Returns the stroke.- Returns:
- See above.
-
setFontFamily
public void setFontFamily(java.lang.String fontFamily)
Returns the stroke.
-
getFontSize
public omero.model.Length getFontSize(omero.model.enums.UnitsLength unit) throws ome.model.units.BigResultReturns the stroke.- Parameters:
unit- The unit (may be null, in which case no conversion will be performed)- Returns:
- See above.
- Throws:
ome.model.units.BigResult- If an arithmetic under-/overflow occurred
-
setFontSize
public void setFontSize(omero.model.Length fontSize)
Set the size of the font.
-
getFontStyle
public java.lang.String getFontStyle()
Returns the font style.- Returns:
- See above.
-
setFontStyle
public void setFontStyle(java.lang.String fontStyle)
Sets the style of the font.
-
getMarkerStart
public java.lang.String getMarkerStart()
Returns the marker start.- Returns:
- See above.
-
getMarkerEnd
public java.lang.String getMarkerEnd()
Returns the marker end.- Returns:
- See above.
-
setMarkerStart
public void setMarkerStart(java.lang.String start)
Sets the marker start.- Parameters:
start- The value to set.
-
setMarkerEnd
public void setMarkerEnd(java.lang.String end)
Sets the marker end.- Parameters:
end- The value to set.
-
isFontItalic
public boolean isFontItalic()
Returnstrueif it is italic,falseotherwise.- Returns:
- See above.
-
isFontBold
public boolean isFontBold()
Returnstrueif it is bold,falseotherwise.- Returns:
- See above.
-
-