pojos
Class ShapeData

java.lang.Object
  extended by pojos.DataObject
      extended by pojos.ShapeData
Direct Known Subclasses:
EllipseData, LineData, MaskData, PointData, PolygonData, PolylineData, RectangleData, TextData

public abstract class ShapeData
extends DataObject

Hosts a shape.

Since:
3.0-Beta4
Version:
3.0 (Internal version: $Revision: $Date: $)
Author:
Jean-Marie Burel      j.burel@dundee.ac.uk, Donald MacDonald      donald@lifesci.dundee.ac.uk

Field Summary
static boolean READONLY_FLAG
          Flag stating that the ROI is read only.
protected  ShapeSettingsData settings
          The representation of the shape.
 
Constructor Summary
protected ShapeData(omero.model.Shape shape)
          Creates a new instance.
protected ShapeData(omero.model.Shape shape, boolean clientObject)
          Creates a new instance.
 
Method Summary
protected  String fromPoints(String type)
          Parses out the type from the points string.
 int getC()
          Returns the channel.
 ROICoordinate getROICoordinate()
          Returns the ROICoordinate for the ShapeData.
 ShapeSettingsData getShapeSettings()
          Returns the settings associated to the shape.
 int getT()
          Returns the time-point.
 String getTransform()
          Returns the transformation.
 int getZ()
          Returns the z-section.
 boolean isClientObject()
          Returns true if the object one that has been created client side.
 boolean isReadOnly()
          Returns true if the object a read-only object, false otherwise.
 boolean isVisible()
          Returns true if the shape is visible, false otherwise.
protected  List<Integer> parsePointsToIntegerList(String str)
          Parses the points list from the string to a list of integer objects.
protected  List<Point2D.Double> parsePointsToPoint2DList(String str)
          Parses the points list from the string to a list of point2d objects.
 void setC(int c)
          Sets the channel.
 void setClientObject(boolean clientObject)
          Sets to true if the object one that has been created client side, false otherwise.
 void setDirty(boolean dirty)
          Sets to true if the figure been changed from the server side version, false otherwise.
 void setReadOnly(boolean readOnly)
          Sets to true if the object is a read-only object, false otherwise.
 void setROICoordinate(ROICoordinate coord)
          Sets the ROICoordinate for the ShapeData
protected  void setShapeSettings(omero.model.Shape shape)
          Set the settings associated to the shape.
 void setT(int t)
          Sets the time-point.
 void setTransform(String transform)
          Sets the Affine transform of the shape.
 void setVisible(boolean visible)
          Sets to true if the shape is visible, false otherwise.
 void setZ(int z)
          Sets the z-section.
protected static String toNumber(double number)
          Returns a double array as a number attribute value.
protected static String toPoints(Point2D.Double[] points)
          Returns a Point2D.Double array as a Points attribute value. as specified in http://www.w3.org/TR/SVGMobile12/shapes.html#PointsBNF
 
Methods inherited from class pojos.DataObject
asAnnotation, asChannel, asDataset, asExperimenter, asGroup, asIAnnotated, asImage, asIObject, asPixels, asPlate, asPojo, asPojos, asPojos, asProject, asScreen, asWell, asWellSample, getCreated, getDetails, getId, getOwner, getPermissions, getUpdated, getVersion, isDirty, isLoaded, nullDetails, nullSafe, nullSafe, nullSafe, nullSafe, nullSafe, nullSafe, nullSafe, setId, setValue, setVersion, timeOfEvent, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

READONLY_FLAG

public static boolean READONLY_FLAG
Flag stating that the ROI is read only.


settings

protected ShapeSettingsData settings
The representation of the shape.

Constructor Detail

ShapeData

protected ShapeData(omero.model.Shape shape,
                    boolean clientObject)
Creates a new instance.

Parameters:
shape - The shape to host.
clientObject - Pass true if it is a client object, false otherwise.

ShapeData

protected ShapeData(omero.model.Shape shape)
Creates a new instance.

Parameters:
shape - The shape to host.
Method Detail

fromPoints

protected String fromPoints(String type)
Parses out the type from the points string.

Parameters:
type - The value in the list to parse.
Returns:
See above.

parsePointsToPoint2DList

protected List<Point2D.Double> parsePointsToPoint2DList(String str)
Parses the points list from the string to a list of point2d objects.

Parameters:
str - the string to convert to points.

parsePointsToIntegerList

protected List<Integer> parsePointsToIntegerList(String str)
Parses the points list from the string to a list of integer objects.

Parameters:
str - the string to convert to points.

toPoints

protected static String toPoints(Point2D.Double[] points)
Returns a Point2D.Double array as a Points attribute value. as specified in http://www.w3.org/TR/SVGMobile12/shapes.html#PointsBNF


toNumber

protected static String toNumber(double number)
Returns a double array as a number attribute value.


getShapeSettings

public ShapeSettingsData getShapeSettings()
Returns the settings associated to the shape.

Returns:
See above.

setShapeSettings

protected void setShapeSettings(omero.model.Shape shape)
Set the settings associated to the shape.

Parameters:
shape - See above.

isReadOnly

public boolean isReadOnly()
Returns true if the object a read-only object, false otherwise.

Returns:
See above.

setReadOnly

public void setReadOnly(boolean readOnly)
Sets to true if the object is a read-only object, false otherwise.

Parameters:
readOnly - The value to set.

isClientObject

public boolean isClientObject()
Returns true if the object one that has been created client side. If so the id will be null, or invalid.

Returns:
See above.

setClientObject

public void setClientObject(boolean clientObject)
Sets to true if the object one that has been created client side, false otherwise.

Parameters:
clientObject - The value to set..

getZ

public int getZ()
Returns the z-section.

Returns:
See above.

setZ

public void setZ(int z)
Sets the z-section.

Parameters:
z - The value to set.

getC

public int getC()
Returns the channel.

Returns:
See above.

setC

public void setC(int c)
Sets the channel.

Parameters:
c - The value to set.

getT

public int getT()
Returns the time-point.

Returns:
See above.

setT

public void setT(int t)
Sets the time-point.

Parameters:
t - The value to set.

setROICoordinate

public void setROICoordinate(ROICoordinate coord)
Sets the ROICoordinate for the ShapeData

Parameters:
roiCoordinate - The value to set.

getROICoordinate

public ROICoordinate getROICoordinate()
Returns the ROICoordinate for the ShapeData.

Returns:
See above.

getTransform

public String getTransform()
Returns the transformation.

Returns:
See above.

setTransform

public void setTransform(String transform)
Sets the Affine transform of the shape.

Parameters:
See - above.

setDirty

public void setDirty(boolean dirty)
Sets to true if the figure been changed from the server side version, false otherwise.

Overrides:
setDirty in class DataObject
Parameters:
dirty - The value to set.

isVisible

public boolean isVisible()
Returns true if the shape is visible, false otherwise.

Returns:
See above.

setVisible

public void setVisible(boolean visible)
Sets to true if the shape is visible, false otherwise.

Parameters:
visible - The value to set.


OmeroJava Api

Version: 4.3.4-dbcbce5a-b4

Copyright © 2009 The University of Dundee. All Rights Reserved.