1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249
|
/*
*
* Copyright (C) 1999-2003, Institute for MicroTherapy
*
* This software and supporting documentation were developed by
*
* University of Witten/Herdecke
* Department of Radiology and MicroTherapy
* Institute for MicroTherapy
* Medical computer science
*
* Universitaetsstrasse 142
* 44799 Bochum, Germany
*
* http://www.microtherapy.de/go/cs
* mailto:computer.science@microtherapy.de
*
* THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND THE INSTITUTE MAKES NO
* WARRANTY REGARDING THE SOFTWARE, ITS PERFORMANCE, ITS MERCHANTABILITY
* OR FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES
* OR ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY
* AND PERFORMANCE OF THE SOFTWARE IS WITH THE USER.
*
* Author : $Author: kleber $
* Last update : $Date: 2001/06/06 10:32:30 $
* Revision : $Revision: 1.1.1.1 $
* State: $State: Exp $
*/
package J2Ci;
/**
* A <em>jDVPSTextObject</em> is the Java-sided class for the C++-Class
* DVPSTextObject.
*
* @author Andreas Schrter
*/
public class jDVPSTextObject
{
/**
* Constructor - not allowed!
*/
protected jDVPSTextObject()
{
createObjOfDVPSTextObject ();
}
/**
* Constructor for attaching an existing C++-Object. FOR INTERNAL USE ONLY!
* @param attachAdr Address of C++-Object
*/
public jDVPSTextObject (long attachAdr)
{
cppClassAddress = attachAdr;
}
// -------------------------------- Methods for C++-Class Binding
/**
* Address of C++-Object for access in the DLL. Never change manually!!
*/
private long cppClassAddress = (long) 0; // never change!
/**
* Creates a C++-Object of class DVPSTextObject and attached it to this
* current object. The address of the C++-object will be put into field
* cppClassAddress.
*
* @see J2Ci.jDVPSTextObject#cppClassAddress
*/
private native void createObjOfDVPSTextObject ();
// ----------------------------------- Methods of Class jDVPSTextObject
/**
* Copy-Constructor
* @param copy TextObject-Object to copy
*/
public jDVPSTextObject (jDVPSTextObject copy)
{
CopyConstructor (copy.cppClassAddress);
}
private native void CopyConstructor (long fromCppObj);
// ------------------------------------------------------------
/**
* Checks if this text object contains an anchor point.
* @return true if anchor point present.
*/
public native boolean haveAnchorPoint();
/**
* Checks if this text object contains bounding box.
* @return true if bounding box present.
*/
public native boolean haveBoundingBox();
/**
* Sets an anchor point for this text object.
* @param x anchor point X value
* @param y anchor point Y value
* @param unit anchor point annotation units (pixel/display) (from jDVPSannotationUnit).
* @param isVisible anchor point visibility
* @return EC_Normal if successful, an error code otherwise (from jE_Condition).
*/
public native int setAnchorPoint(double x, double y, int unit, boolean isVisible);
/**
* Sets bounding box for this text object.
* @param TLHC_x bounding box top-lefthand corner X value
* @param TLHC_y bounding box top-lefthand corner Y value
* @param BRHC_x bounding box bottom-righthand corner X value
* @param BRHC_y bounding box bottom-righthand corner Y value
* @param unit bounding box annotation units (pixel/display) (from jDVPSannotationUnit)
* @param justification bounding box horizontal justification (left/right/center) (from jDVPSTextJustification)
* @return EC_Normal if successful, an error code otherwise (from jE_Condition).
*/
public native int setBoundingBox(double TLHC_x, double TLHC_y, double BRHC_x, double BRHC_y, int unit, int justification);
/**
* Assigns a new "unformatted text value" for this text object.
* @param text unformatted text value. Must not be NULL or empty string.
* @return EC_Normal if successful, an error code otherwise (from jE_Condition).
*/
public native int setText(String text);
/**
* Removes any anchor point from the text object.
* Attention: A text object must always contain either anchor point, bounding box
* or both. This property is not asserted by the text object itself.
*/
public native void removeAnchorPoint();
/**
* Removes any bounding box from the text object.
* Attention: A text object must always contain either anchor point, bounding box
* or both. This property is not asserted by the text object itself.
*/
public native void removeBoundingBox();
/**
* Gets the unformatted text value for this text object.
* @return unformatted text value
*/
public native String getText();
/**
* Gets the bounding box TLHC x value.
* May only be called when a bounding box is present (haveBoundingBox()==OFTrue)
* @return bounding box TLHC x value
*/
public native double getBoundingBoxTLHC_x();
/**
* Gets the bounding box TLHC y value.
* May only be called when a bounding box is present (haveBoundingBox()==OFTrue)
* @return bounding box TLHC y value
*/
public native double getBoundingBoxTLHC_y();
/**
* Gets the bounding box BRHC x value.
* May only be called when a bounding box is present (haveBoundingBox()==OFTrue)
* @return bounding box BRHC x value
*/
public native double getBoundingBoxBRHC_x();
/**
* Gets the bounding box BRHC y value.
* May only be called when a bounding box is present (haveBoundingBox()==OFTrue)
* @return bounding box BRHC y value
*/
public native double getBoundingBoxBRHC_y();
/**
* Gets the bounding box annotation units.
* May only be called when a bounding box is present (haveBoundingBox()==OFTrue)
* @return bounding box annotation units (from jDVPSannotationUnit).
*/
public native int getBoundingBoxAnnotationUnits();
/**
* Gets the anchor point x value.
* May only be called when an anchor point is present (haveAnchorPoint()==OFTrue)
* @return anchor point x value
*/
public native double getAnchorPoint_x();
/**
* Gets the anchor point y value.
* May only be called when an anchor point is present (haveAnchorPoint()==OFTrue)
* @return anchor point y value
*/
public native double getAnchorPoint_y();
/**
* Gets the anchor point visibility
* May only be called when an anchor point is present (haveAnchorPoint()==OFTrue)
* @return true if anchor point is visible
*/
public native boolean anchorPointIsVisible();
/**
* Gets the anchor point annotation units.
* May only be called when an anchor point is present (haveAnchorPoint()==OFTrue)
* @return anchor point annotation units (from jDVPSannotationUnit).
*/
public native int getAnchorPointAnnotationUnits();
/**
* Gets the bounding box horizontal justification.
* May only be called when a bounding box is present (haveBoundingBox()==OFTrue)
* @return bounding box horizontal justification (from jDVPSTextJustification)
*/
public native int getBoundingBoxHorizontalJustification();
}
/*
* CVS Log
* $Log: jDVPSTextObject.java,v $
* Revision 1.1.1.1 2001/06/06 10:32:30 kleber
* Init commit for DICOMscope 3.5
* Create new CVS
*
*/
|