📄 linkactionlist.java
字号:
/** * The server method for writing a request to the client to * deselect all the graphics. * * @throws IOException. */ public void deselectGraphics() throws IOException { link.dos.write(Link.UPDATE_GRAPHICS.getBytes()); link.dos.writeInt(ACTION_GRAPHICS); link.dos.writeInt(MODIFY_DESELECTALL_GRAPHIC_MASK); LinkProperties.EMPTY_PROPERTIES.write(link.dos); // Write // empty } /** * Server can use this method to modify a graphic with an action * described by the MODIFY mask values. Assumes that you don't * want to update or add a graphic, because that requires the * graphic being added. * * @param maskDescription an integer with the applicable * MODIFY_MASKS set. * @param props property list containing the identifier used by * the client to know which graphic to modify. * @throws IOException */ public void modifyGraphic(int maskDescription, LinkProperties props) throws IOException { link.dos.write(Link.UPDATE_GRAPHICS.getBytes()); link.dos.writeInt(ACTION_GRAPHICS); link.dos.writeInt(maskDescription); props.write(link.dos); } /** * Used by the graphic methods to write the correct mask and * graphic header when a graphic is updated. Should not be called * directly unless you understand the protocol. * * @param graphicUpdateMask the masked integer to describe the * action on the graphic. * @throws IOException */ public void writeGraphicGestureHeader(int graphicUpdateMask) throws IOException { link.dos.write(Link.UPDATE_GRAPHICS.getBytes()); link.dos.writeInt(ACTION_GRAPHICS); link.dos.writeInt(graphicUpdateMask); } /** * Update an arc with lat/lon placement. * * @param latPoint latitude of center point, decimal degrees * @param lonPoint longitude of center point, decimal degrees * @param w horizontal diameter of arc, pixels * @param h vertical diameter of arc, pixels * @param s starting angle of arc, decimal degrees * @param e angular extent of arc, decimal degrees * @param properties attributes for the arc. * @throws IOException */ public void updateArc(float latPoint, float lonPoint, int w, int h, float s, float e, LinkProperties properties, int graphicUpdateMask) throws IOException { writeGraphicGestureHeader(graphicUpdateMask); LinkArc.write(latPoint, lonPoint, 0, 0, w, h, s, e, properties, link.dos); } /** * Update an arc with x/y placement. * * @param x1 window position of center point from left of window, * in pixels * @param y1 window position of center point from top of window, * in pixels * @param w horizontal diameter of arc, pixels * @param h vertical diameter of arc, pixels * @param s starting angle of arc, decimal degrees * @param e angular extent of arc, decimal degrees * @param properties attributes for the arc. * @throws IOException */ public void updateArc(int x1, int y1, int w, int h, float s, float e, LinkProperties properties, int graphicUpdateMask) throws IOException { writeGraphicGestureHeader(graphicUpdateMask); LinkArc.write(x1, y1, w, h, s, e, properties, link.dos); } /** * Writing an arc at a x, y, offset to a Lat/Lon location. * * @param latPoint latitude of center of arc. * @param lonPoint longitude of center of arc. * @param offset_x1 # pixels to the right the center will be moved * from lonPoint. * @param offset_y1 # pixels down that the center will be moved * from latPoint. * @param w horizontal diameter of arc, pixels. * @param h vertical diameter of arc, pixels. * @param s starting angle of arc, decimal degrees * @param e angular extent of arc, decimal degrees * @param properties attributes for the arc. * @throws IOException */ public void updateArc(float latPoint, float lonPoint, int offset_x1, int offset_y1, int w, int h, float s, float e, LinkProperties properties, int graphicUpdateMask) throws IOException { writeGraphicGestureHeader(graphicUpdateMask); LinkArc.write(latPoint, lonPoint, offset_x1, offset_y1, w, h, s, e, properties, link.dos); } /** * Update an arc with a certain radius at a Lat/Lon location. * Assumes the radius is in decimal degrees. * * @param latPoint latitude of center point, decimal degrees * @param lonPoint longitude of center point, decimal degrees * @param radius distance in decimal degrees * @param s starting angle of arc, decimal degrees * @param e angular extent of arc, decimal degrees * @param properties attributes for the arc. * @throws IOException */ public void updateArc(float latPoint, float lonPoint, float radius, float s, float e, LinkProperties properties, int graphicUpdateMask) throws IOException { writeGraphicGestureHeader(graphicUpdateMask); LinkArc.write(latPoint, lonPoint, radius, -1, -1, s, e, properties, link.dos); } /** * Update an arc with a certain radius at a Lat/Lon location, and * allows you to specify units of the radius. * * @param latPoint latitude of center of arc in decimal degrees * @param lonPoint longitude of center of arc in decimal degrees * @param radius distance * @param units integer value for units for distance - KM, MILES, * NMILES. If < 0, assume decimal degrees. * @param s starting angle of arc, decimal degrees * @param e angular extent of arc, decimal degrees * @param properties attributes for the arc. * @throws IOException */ public void updateArc(float latPoint, float lonPoint, float radius, int units, float s, float e, LinkProperties properties, int graphicUpdateMask) throws IOException { writeGraphicGestureHeader(graphicUpdateMask); LinkArc.write(latPoint, lonPoint, radius, units, -1, s, e, properties, link.dos); } /** * Update an arc with a certain radius at a Lat/Lon location, and * allows you to specify units of the radius, as well as the * number of verticies to use to approximate the arc. * * @param latPoint latitude of center of arc in decimal degrees * @param lonPoint longitude of center of arc in decimal degrees * @param radius distance * @param units integer value for units for distance - OMArc.KM, * OMArc.MILES, OMArc.NMILES. If < 0, assume decimal * degrees. * @param nverts number of vertices for the poly-arc (if < 3, * value is generated internally). * @param s starting angle of arc, decimal degrees * @param e angular extent of arc, decimal degrees * @param properties attributes for the arc. * @throws IOException */ public void updateArc(float latPoint, float lonPoint, float radius, int units, int nverts, float s, float e, LinkProperties properties, int graphicUpdateMask) throws IOException { writeGraphicGestureHeader(graphicUpdateMask); LinkArc.write(latPoint, lonPoint, radius, units, nverts, s, e, properties, link.dos); } /** * Update the bitmap. * * @param lt latitude of placement of upper left corner of bitmap. * @param ln longitude of placement of upper left corner of * bitmap. * @param w pixel width of bitmap. * @param h pixel height of bitmap. * @param bytes bitmap data. * @param properties description of drawing attributes. * @param graphicUpdateMask the mask describing the graphic * update. * @throws IOException * @see com.bbn.openmap.layer.link.LinkBitmap */ public void updateBitmap(float lt, float ln, int w, int h, byte[] bytes, LinkProperties properties, int graphicUpdateMask) throws IOException { writeGraphicGestureHeader(graphicUpdateMask); LinkBitmap.write(lt, ln, w, h, bytes, properties, link.dos); } /** * Update the bitmap. * * @param x1 horizontal placement of upper left corner of bitmap. * @param y1 vertical placement of upper left corner of bitmap. * @param w pixel width of bitmap. * @param h pixel height of bitmap. * @param bytes bitmap data. * @param properties description of drawing attributes. * @param graphicUpdateMask the mask describing the graphic * update. * @throws IOException * @see com.bbn.openmap.layer.link.LinkBitmap */ public void updateBitmap(int x1, int y1, int w, int h, byte[] bytes, LinkProperties properties, int graphicUpdateMask) throws IOException { writeGraphicGestureHeader(graphicUpdateMask); LinkBitmap.write(x1, y1, w, h, bytes, properties, link.dos); } /** * Write a bitmap in the response. * * @param lt latitude of placement of upper left corner of bitmap. * @param ln longitude of placement of upper left corner of * bitmap. * @param offset_x1 horizontal offset of upper left corner of * bitmap. * @param offset_y1 vertical offset of upper left corner of * bitmap. * @param w pixel width of bitmap. * @param h pixel height of bitmap. * @param bytes bitmap data. * @param properties description of drawing attributes. * @param graphicUpdateMask the mask describing the graphic * update. * @throws IOException * @see com.bbn.openmap.layer.link.LinkBitmap */ public void updateBitmap(float lt, float ln, int offset_x1, int offset_y1, int w, int h, byte[] bytes, LinkProperties properties, int graphicUpdateMask) throws IOException { writeGraphicGestureHeader(graphicUpdateMask); LinkBitmap.write(lt, ln, offset_x1, offset_y1, w, h, bytes, properties, link.dos); } /** * Write a circle in the response. * * @param latPoint latitude of placement of center of circle. * @param lonPoint longitude of placement of center of circle. * @param w pixel width of circle. * @param h pixel height of circle. * @param properties description of drawing attributes. * @param graphicUpdateMask the mask describing the graphic * update. * @throws IOException * @see com.bbn.openmap.layer.link.LinkCircle */ public void updateCircle(float latPoint, float lonPoint, int w, int h, LinkProperties properties, int graphicUpdateMask) throws IOException { writeGraphicGestureHeader(graphicUpdateMask); LinkCircle.write(latPoint, lonPoint, w, h, properties, link.dos); } /** * Write a circle in the response. * * @param x1 horizontal pixel placement of center of circle.. * @param y1 vertical pixel placement of center of circle.. * @param w pixel width of circle. * @param h pixel height of circle. * @param properties description of drawing attributes. * @param graphicUpdateMask the mask describing the graphic * update. * @throws IOException * @see com.bbn.openmap.layer.link.LinkCircle */ public void updateCircle(int x1, int y1, int w, int h, LinkProperties properties, int graphicUpdateMask) throws IOException { writeGraphicGestureHeader(graphicUpdateMask); LinkCircle.write(x1, y1, w, h, properties, link.dos); } /** * Write a circle in the response. * * @param latPoint latitude of placement of center of circle. * @param lonPoint longitude of placement of center of circle.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -