Package com.snowbound.common.transport
Class VirtualViewerSnowAnn
- java.lang.Object
-
- Snow.SnowAnn
-
- com.snowbound.common.transport.VirtualViewerSnowAnn
-
- All Implemented Interfaces:
AnnotationWrapper,java.io.Serializable
public class VirtualViewerSnowAnn extends Snow.SnowAnn implements java.io.Serializable, AnnotationWrapper
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static booleangUseExactPointsUse exact point sizes in calculating font sizes in Text objects.static java.lang.StringTIFF_TAG_LAYERPassing this constant as an annotation's layer ID marks that the annotation layer does not represent annotations loaded from the content handler, but instead WANG annotations extracted from the associated TIFF.-
Fields inherited from class Snow.SnowAnn
ann_alpha, ann_bblue, ann_bgreen, ann_bold, ann_bred, ANN_BUFF_SIZE, ann_crop_xe, ann_crop_xs, ann_crop_ye, ann_crop_ys, ann_cur_object_id, ann_dpi, ann_fblue, ann_fcs, ann_fgreen, ann_font_height, ann_font_name, ann_fred, ann_height, ann_history, ann_idmCreateTimestamp, ann_idmLastModifyTimestamp, ann_idmStatus, ann_idmSubpage_Number, ann_italic, ann_line_style, ann_line_width, ann_notes, ann_rc, ann_rotation_angle, ANN_SOLID, ann_tags, ann_use_exact_points, ann_width, annClassId, annCreateDate, annCreateUser, annDelete, annDeleteDate, annDeleteUser, annHeight, annID, annModifyDate, annModifyUser, annOrdinal, annotatedDocumentID, annotatedFileName, annStartX, annStartY, annTransparent, annType, annWidth, bitmapData, bTrack, CLOUD_BUMPS, createDate, createUser, DAEJA_DPI, DEFAULT_HIGHLIGHT_OPACITY, deleted, deleteDate, deleteUser, double_byte, EnableEditText, EnableProperties, fcs, fillColor, fontBold, fontColor, fontItalic, fontName, fontSize, fontStrike, fontUnderline, gCancelCommand, gCopyCommand, gCutCommand, gDeleteCommand, gEditTextCommand, gMoveCommand, gPermissionsCommand, gPropertiesCommand, graphic_id, graphic_num, gResizeCommand, gRotateCommand, IDM_DPI, IDM_MAX, IDM_SANN_DELETE, IDM_SANN_EDIT, IDM_SANN_EXIT, IDM_SANN_MOVE, IDM_SANN_OK, IDM_SANN_RESIZE, IDM_STATUS_DELETE, IDM_STATUS_MODIFIED, IDM_STATUS_NEW, IDM_STATUS_ORIGINAL, isAdobeXml, isDaeja, isFilenet, isIdm, isXfdf, lineColor, lineStyle, lineTransparent, lineWidth, modifyUser, Next, Org, p, pageHeight, pageNumber, pageWidth, pointArray, popup, Prev, rotationAngle, SANN_ARROW, SANN_BITMAP, SANN_BUBBLE, SANN_CIRCLE, SANN_CLOUD_EDIT, SANN_CUSTOM_STAMP, SANN_EDIT, SANN_ELLIPSE, SANN_FILLED_ELLIPSE, SANN_FILLED_POLYGON, SANN_FILLED_RECT, SANN_FREEHAND, SANN_HIGHLIGHT_RECT, SANN_LINE, SANN_POINT_SIZE, SANN_POLYGON, SANN_POSTIT, SANN_RECTANGLE, SANN_TRANSPARENT_BITMAP, swing_popup, textString, WM_LBUTTONDOWN, xmlannotations
-
-
Constructor Summary
Constructors Constructor Description VirtualViewerSnowAnn()Constructor.VirtualViewerSnowAnn(int width, int height, int dpi)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidadjustForDPI(int pageWidth, int pageHeight, int dpi)voidapplyFilteringOptions(com.snowbound.snapserv.transport.AssemblyOptions assemblyOptions, boolean isNamedRedactionLayer)VirtualViewerSnowAnnclone()static VirtualViewerSnowAnncreateFromByteArray(byte[] data)Deserialize a VirtualViewerSnowAnn from the provided byte array.static VirtualViewerSnowAnncreateFromXML(java.lang.String xml)Attempt to create and initialize a VirtualViewerSnowAnn object from an XML string.voidfixDaejaAnnotationDPI(int targetPageWidth, int targetPageHeight, int targetDpi)Daeja annotations may come to this point with accurate page dimensions but an inaccurate DPI.voidfixFilenetAnnotationDimensions(int pageWidth, int pageHeight, int dpi)intgetAction()Deprecated.java.lang.ObjectgetAnnotationData()java.lang.StringgetLayerName()Return annotation layer name.booleanhasAnnotation()booleanisModified()voidmerge(AnnotationWrapper sourceAnnWrapper)The destination of the merge is *this* object itself.voidrotate(int degrees)Rotate any annotations in this layer by the provided angle.intSANN_flipx()Horizontally flip the annotations on this layer.intSANN_flipy()Vertically flip the annotations on this layer.intSANN_rotate(int rotate)Rotate the annotations on this layer.voidsetLayerName(java.lang.String layerName)Set annotation layer name.voidsetModified(boolean isModified)byte[]toByteArray()Retrieve a byte array representation of the VirtualViewerSnowAnn object.java.lang.StringtoString()-
Methods inherited from class Snow.SnowAnn
ann_dblclick, annLinePainting, centerTagInRect, draw_object_pdf, GetClientRect, getGraphics, getVisibilityFlag, read_xml_file, remove_non_text_objects, remove_text_objects, resize_object, SANN_activate_all_objects, SANN_activate_object, SANN_add_object, SANN_add_object, SANN_count_objects, SANN_deactivate_all_objects, SANN_deactivate_object, SANN_delete_all_objects, SANN_delete_object, SANN_display_annotations, SANN_display_annotations, SANN_draw_object, SANN_get_croprect, SANN_get_graphic_struct, SANN_get_object_bounds, SANN_get_object_data, SANN_get_object_info, SANN_get_object_num, SANN_highlight_object, SANN_map_image_to_wnd, SANN_map_wnd_to_image, SANN_merge_annotations, SANN_move_object, SANN_output_pdf, SANN_print_annotations, SANN_print_annotations, SANN_read_ann, SANN_read_ann, SANN_read_ann, SANN_read_ann_stream, SANN_read_ann_stream, SANN_recalc_size, SANN_recalc_size, SANN_resize_object, SANN_rotate_object, SANN_set_bcolor, SANN_set_croprect, SANN_set_fcolor, SANN_set_fcolor, SANN_set_fnx_dpi, SANN_set_font, SANN_set_font, SANN_set_line_style, SANN_set_line_width, SANN_set_line_width, SANN_set_scrollbars, SANN_set_size, SANN_write_ann, SANN_write_ann, SANN_write_ann_fnx, SANN_write_ann_fnx, SANN_write_ann_idm, SANN_write_ann_idm, SANN_write_ann_pages, SANN_write_ann_pages, SANN_write_ann_xml, SANN_write_ann_xml, SANN_write_ann_xml_document, SANN_write_ann_xml_page, SANN_write_ann_xml_page, setAutoDetect, setPopupMenuStrings, setVisibilityFlag, setVisibilityFlags, setVisibilityFlagsEnabled, ui_delete, ui_exit, ui_rotate_object, ui_startmove, ui_startresize, ui_wm_lbuttondown, ui_wm_lbuttonup, ui_wm_mousemove, xml_boolean, xml_color, xml_convert, xml_find_page, xml_inches_pixels, xml_read
-
-
-
-
Field Detail
-
TIFF_TAG_LAYER
public static final java.lang.String TIFF_TAG_LAYER
Passing this constant as an annotation's layer ID marks that the annotation layer does not represent annotations loaded from the content handler, but instead WANG annotations extracted from the associated TIFF. If the annotation layer ID is set to this constant, the annotation layer's contents will be ignored in favor of annotations from the TIFF.- See Also:
- Constant Field Values
-
gUseExactPoints
public static boolean gUseExactPoints
Use exact point sizes in calculating font sizes in Text objects. All new annotation objects will default to this value.
-
-
Method Detail
-
getAction
public int getAction()
Deprecated.- Returns:
- Action code.
-
getAnnotationData
public java.lang.Object getAnnotationData()
- Specified by:
getAnnotationDatain interfaceAnnotationWrapper- Returns:
- the Object that represents this annotations data. For example, the xml or the SnowAnn object.
- See Also:
AnnotationWrapper.getAnnotationData()
-
hasAnnotation
public boolean hasAnnotation()
- Specified by:
hasAnnotationin interfaceAnnotationWrapper- Returns:
- Whether this layer contains any annotations.
- See Also:
AnnotationWrapper.hasAnnotation()
-
rotate
public void rotate(int degrees)
Description copied from interface:AnnotationWrapperRotate any annotations in this layer by the provided angle. Angle must be a value of 0, 90, 180, or 270 degrees.- Specified by:
rotatein interfaceAnnotationWrapper- Parameters:
degrees- A value of 0, 90, 180, or 270 degrees.- See Also:
AnnotationWrapper.rotate(int)
-
merge
public void merge(AnnotationWrapper sourceAnnWrapper)
The destination of the merge is *this* object itself. The source is the parameter.- Specified by:
mergein interfaceAnnotationWrapper- Parameters:
sourceAnnWrapper- Source object to merge.- See Also:
AnnotationWrapper.merge(com.snowbound.common.transport.AnnotationWrapper)
-
setModified
public void setModified(boolean isModified)
- Specified by:
setModifiedin interfaceAnnotationWrapper- Parameters:
isModified- True to mark this layer as modified; false to mark it unmodified.
-
isModified
public boolean isModified()
- Specified by:
isModifiedin interfaceAnnotationWrapper- Returns:
- Whether this annotation layer has been modified.
-
SANN_flipx
public int SANN_flipx()
Horizontally flip the annotations on this layer.- Overrides:
SANN_flipxin classSnow.SnowAnn- Returns:
- Zero for success; any value less than zero is a Snowbound error code.
- See Also:
SnowAnn.SANN_flipx()
-
SANN_flipy
public int SANN_flipy()
Vertically flip the annotations on this layer.- Overrides:
SANN_flipyin classSnow.SnowAnn- Returns:
- Zero for success; any value less than zero is a Snowbound error code.
- See Also:
SnowAnn.SANN_flipy()
-
SANN_rotate
public int SANN_rotate(int rotate)
Rotate the annotations on this layer.- Overrides:
SANN_rotatein classSnow.SnowAnn- Parameters:
rotate- A value of 0, 90, 180, or 270 degrees.- Returns:
- Integer. Any positive value (as well as 0) is a valid return.
- See Also:
SnowAnn.SANN_rotate(int)
-
toByteArray
public byte[] toByteArray()
Retrieve a byte array representation of the VirtualViewerSnowAnn object.- Returns:
- Byte array serialization of this object.
-
createFromByteArray
public static VirtualViewerSnowAnn createFromByteArray(byte[] data)
Deserialize a VirtualViewerSnowAnn from the provided byte array.- Parameters:
data- Byte array containing VirtualViewerSnowAnn data.- Returns:
- Deserialized VirtualViewerSnowAnn instance, null if deserialization failed.
-
createFromXML
public static VirtualViewerSnowAnn createFromXML(java.lang.String xml)
Attempt to create and initialize a VirtualViewerSnowAnn object from an XML string.- Parameters:
xml- XML string containing VirtualViewerSnowAnn data.- Returns:
- VirtualViewerSnowAnn instance; null if data could not be retrieved from XML string.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getLayerName
public java.lang.String getLayerName()
Description copied from interface:AnnotationWrapperReturn annotation layer name.- Specified by:
getLayerNamein interfaceAnnotationWrapper- Returns:
- Annotation layer name.
-
setLayerName
public void setLayerName(java.lang.String layerName)
Description copied from interface:AnnotationWrapperSet annotation layer name.- Specified by:
setLayerNamein interfaceAnnotationWrapper- Parameters:
layerName- Annotation layer name.
-
clone
public VirtualViewerSnowAnn clone()
-
applyFilteringOptions
public void applyFilteringOptions(com.snowbound.snapserv.transport.AssemblyOptions assemblyOptions, boolean isNamedRedactionLayer)
-
fixDaejaAnnotationDPI
public void fixDaejaAnnotationDPI(int targetPageWidth, int targetPageHeight, int targetDpi)Daeja annotations may come to this point with accurate page dimensions but an inaccurate DPI. Or, at least, inconsistent dimensions & DPI. With this function, ensure that the DPI is consistent with the page dimensions. If the page dimensions are half the size of the target page dimensions, then the DPI should be half the size of the target DPI. The target values aren't relevant--they could be the 'original' values, though it's best to use target here since eg JPEG doesn't have a DPI--they just need to be consistent with each other.- Parameters:
targetDPI- The DPI of the page.targetPageWidth- The width of the page.targetPageHeight- The height of the page.targetDpi- TODO
-
fixFilenetAnnotationDimensions
public void fixFilenetAnnotationDimensions(int pageWidth, int pageHeight, int dpi)
-
adjustForDPI
public void adjustForDPI(int pageWidth, int pageHeight, int dpi)
-
-