📄 multiresimgdataadapter.java
字号:
* current tile. * * * */ public int getCompHeight(int n, int rl) { return mressrc.getCompHeight(n,rl); } /** * Returns the width in pixels of the specified component * in the overall image, for the given resolution level. * * <P>This default implementation returns the value of the source. * * @param n The index of the component, from 0 to N-1. * * @param rl The resolution level, from 0 to L. * * @return The width in pixels of component <tt>n</tt> in the * overall image. * * * */ public int getCompImgWidth(int n, int rl) { return mressrc.getCompImgWidth(n,rl); } /** * Returns the height in pixels of the specified component * in the overall image, for the given resolution level. * * <P>This default implementation returns the value of the source. * * @param n The index of the component, from 0 to N-1. * * @param rl The resolution level, from 0 to L. * * @return The height in pixels of component <tt>n</tt> in the * overall image. * * * */ public int getCompImgHeight(int n, int rl) { return mressrc.getCompImgHeight(n,rl); } /** * Changes the current tile, given the new indexes. An * IllegalArgumentException is thrown if the indexes do not * correspond to a valid tile. * * <P>This default implementation just changes the tile in the * source. * * @param x The horizontal indexes the tile. * * @param y The vertical indexes of the new tile. * * * */ public void setTile(int x, int y) { mressrc.setTile(x,y); tIdx = getTileIdx(); } /** * Advances to the next tile, in standard scan-line order (by rows * then columns). An NoNextElementException is thrown if the * current tile is the last one (i.e. there is no next tile). * * <P>This default implementation just changes the tile in the * source. * * * */ public void nextTile() { mressrc.nextTile(); tIdx = getTileIdx(); } /** * Returns the indexes of the current tile. These are the * horizontal and vertical indexes of the current tile. * * <P>This default implementation returns the value of the source. * * @param co If not null this object is used to return the * information. If null a new one is created and returned. * * @return The current tile's indexes (vertical and horizontal * indexes). * * * */ public Coord getTile(Coord co) { return mressrc.getTile(co); } /** * Returns the index of the current tile, relative to a standard * scan-line order. * * <P>This default implementation returns the value of the source. * * @return The current tile's index (starts at 0). * * * */ public int getTileIdx() { return mressrc.getTileIdx(); } /** * Returns the horizontal and vertical offset of the upper-left corner of * the current tile, in the specified component, relative to the canvas * origin, for the specified resolution level. This is returned in the * component coordinates (not in the reference grid coordinates) reduced * to the specified resolution. These are the coordinates of the current * tile's (not active tile) upper-left corner relative to the canvas, in * the specified component, at the specified resolution. * * <P>This default implementation returns the value of the source. * * @param co If not null the object is used to return the values, * if null a new one is created and returned. * * @param n The index of the component (between 0 and N-1) * * @param rl The resolution level, from 0 to L. * * @return The horizontal and vertical offsets of the upper-left * corner of the current tile, for the specified component and * resolution level, relative to the canvas origin, in the component * coordinates. * * * */ public Coord getTileOff(Coord co, int n, int rl) { return mressrc.getTileOff(co,n,rl); } /** * Returns the horizontal coordinate of the upper-left corner of the * active tile, with respect to the canvas origin, in the component * coordinates, for the specified component and resolution level. This is * actually the horizontal coordinate of the top-left corner of the image * data within the current tile. * * <P>This default implementation returns the value of the source. * * @param n The index of the component (between 0 and N-1) * * @param rl The resolution level, from 0 to L. * * @return The horizontal coordinate of the upper-left corner of the active * tile, with respect to the canvas origin, for component 'n', in the * component coordinates, at resolution level 'rl'. * * * */ public int getULX(int n, int rl) { return mressrc.getULX(n,rl); } /** * Returns the vertical coordinate of the upper-left corner of the * active tile, with respect to the canvas origin, in the component * coordinates, for the specified component and resolution level. This is * actually the vertical coordinate of the top-left corner of the image * data within the current tile. * * <P>This default implementation returns the value of the source. * * @param n The index of the component (between 0 and N-1) * * @param rl The resolution level, from 0 to L. * * @return The vertical coordinate of the upper-left corner of the active * tile, with respect to the canvas origin, for component 'n', in the * component coordinates, at resolution level 'rl'. * * * */ public int getULY(int n, int rl) { return mressrc.getULY(n,rl); } /** * Returns the horizontal coordinate of the image origin, the top-left * corner, in the canvas system, on the reference grid at the specified * resolution level. * * <P>This default implementation returns the value of the source. * * @param rl The resolution level, from 0 to L. * * @return The horizontal coordinate of the image origin in the canvas * system, on the reference grid. * * * */ public int getImgULX(int rl) { return mressrc.getImgULX(rl); } /** * Returns the vertical coordinate of the image origin, the top-left * corner, in the canvas system, on the reference grid at the specified * resolution level. * * <P>This default implementation returns the value of the source. * * @param rl The resolution level, from 0 to L. * * @return The vertical coordinate of the image origin in the canvas * system, on the reference grid. * * * */ public int getImgULY(int rl) { return mressrc.getImgULY(rl); } /** * Returns the number of tiles in the horizontal and vertical directions. * * <P>This default implementation returns the value of the source. * * @param co If not null this object is used to return the * information. If null a new one is created and returned. * * @return The number of tiles in the horizontal (Coord.x) and * vertical (Coord.y) directions. * * * */ public Coord getNumTiles(Coord co) { return mressrc.getNumTiles(co); } /** * Returns the total number of tiles in the image. * * <P>This default implementation returns the value of the source. * * @return The total number of tiles in the image. * * * */ public int getNumTiles() { return mressrc.getNumTiles(); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -