亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? combobox.java

?? java開發(fā)文檔之excel:jexcelapi_2_6_3.tar
?? JAVA
字號:
/*********************************************************************
*
*      Copyright (C) 2006 Andrew Khan
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/

package jxl.biff.drawing;

import java.io.IOException;

import common.Assert;
import common.Logger;

import jxl.WorkbookSettings;
import jxl.write.biff.File;

/**
 * Contains the various biff records used to copy a ComboBox (from the
 * Form toolbox) between workbook
 */
public class ComboBox implements DrawingGroupObject
{
  /**
   * The logger
   */
  private static Logger logger = Logger.getLogger(ComboBox.class);

  /**
   * The spContainer that was read in
   */
  private EscherContainer readSpContainer;

  /**
   * The spContainer that was generated
   */
  private EscherContainer spContainer;

  /**
   * The MsoDrawingRecord associated with the drawing
   */
  private MsoDrawingRecord msoDrawingRecord;

  /**
   * The ObjRecord associated with the drawing
   */
  private ObjRecord objRecord;

  /**
   * Initialized flag
   */
  private boolean initialized = false;

  /**
   * The object id, assigned by the drawing group
   */
  private int objectId;

  /**
   * The blip id
   */
  private int blipId;

  /**
   * The shape id
   */
  private int shapeId;

  /**
   * The column
   */
  private int column;

  /**
   * The row position of the image
   */
  private int row;

  /**
   * The width of the image in cells
   */
  private double width;

  /**
   * The height of the image in cells
   */
  private double height;

  /**
   * The number of places this drawing is referenced
   */
  private int referenceCount;

  /**
   * The top level escher container
   */
  private EscherContainer escherData;

  /**
   * Where this image came from (read, written or a copy)
   */
  private Origin origin;

  /**
   * The drawing group for all the images
   */
  private DrawingGroup drawingGroup;

  /**
   * The drawing data
   */
  private DrawingData drawingData;

  /**
   * The type of this drawing object
   */
  private ShapeType type;

  /**
   * The drawing position on the sheet
   */
  private int drawingNumber;

  /**
   * The workbook settings
   */
  private WorkbookSettings workbookSettings;

  /**
   * Constructor used when reading images
   *
   * @param mso the drawing record
   * @param obj the object record
   * @param dd the drawing data for all drawings on this sheet
   * @param dg the drawing group
   * @param ws the workbook settings
   */
  public ComboBox(MsoDrawingRecord mso, ObjRecord obj, DrawingData dd,
                  DrawingGroup dg, WorkbookSettings ws)
  {
    drawingGroup = dg;
    msoDrawingRecord = mso;
    drawingData = dd;
    objRecord = obj;
    initialized = false;
    workbookSettings = ws;
    origin = Origin.READ;
    drawingData.addData(msoDrawingRecord.getData());
    drawingNumber = drawingData.getNumDrawings() - 1;
    drawingGroup.addDrawing(this);

    Assert.verify(mso != null && obj != null);

    initialize();
  }

  /**
   * Copy constructor used to copy drawings from read to write
   *
   * @param dgo the drawing group object
   * @param dg the drawing group
   * @param ws the workbook settings
   */
  public ComboBox(DrawingGroupObject dgo,
                  DrawingGroup dg,
                  WorkbookSettings ws)
  {
    ComboBox d = (ComboBox) dgo;
    Assert.verify(d.origin == Origin.READ);
    msoDrawingRecord = d.msoDrawingRecord;
    objRecord = d.objRecord;
    initialized = false;
    origin = Origin.READ;
    drawingData = d.drawingData;
    drawingGroup = dg;
    drawingNumber = d.drawingNumber;
    drawingGroup.addDrawing(this);
    workbookSettings = ws;
  }

  /**
   * Constructor invoked when writing images
   */
  public ComboBox()
  {
    initialized = true;
    origin = Origin.WRITE;
    referenceCount = 1;
    type = ShapeType.HOST_CONTROL;
  }

  /**
   * Initializes the member variables from the Escher stream data
   */
  private void initialize()
  {
    readSpContainer = drawingData.getSpContainer(drawingNumber);
    Assert.verify(readSpContainer != null);

    EscherRecord[] children = readSpContainer.getChildren();

    Sp sp = (Sp) readSpContainer.getChildren()[0];
    objectId = objRecord.getObjectId();
    shapeId = sp.getShapeId();
    type = ShapeType.getType(sp.getShapeType());

    if (type == ShapeType.UNKNOWN)
    {
      logger.warn("Unknown shape type");
    }

    ClientAnchor clientAnchor = null;
    for (int i = 0; i < children.length && clientAnchor == null; i++)
    {
      if (children[i].getType() == EscherRecordType.CLIENT_ANCHOR)
      {
        clientAnchor = (ClientAnchor) children[i];
      }
    }

    if (clientAnchor == null)
    {
      logger.warn("Client anchor not found");
    }
    else
    {
      column = (int) clientAnchor.getX1();
      row = (int) clientAnchor.getY1();
    }

    initialized = true;
  }


  /**
   * Sets the object id.  Invoked by the drawing group when the object is
   * added to id
   *
   * @param objid the object id
   * @param bip the blip id
   * @param sid the shape id
   */
  public final void setObjectId(int objid, int bip, int sid)
  {
    objectId = objid;
    blipId = bip;
    shapeId = sid;

    if (origin == Origin.READ)
    {
      origin = Origin.READ_WRITE;
    }
  }

  /**
   * Accessor for the object id
   *
   * @return the object id
   */
  public final int getObjectId()
  {
    if (!initialized)
    {
      initialize();
    }

    return objectId;
  }

  /**
   * Accessor for the shape id
   *
   * @return the object id
   */
  public final int getShapeId()
  {
    if (!initialized)
    {
      initialize();
    }

    return shapeId;
  }

  /**
   * Accessor for the blip id
   *
   * @return the blip id
   */
  public final int getBlipId()
  {
    if (!initialized)
    {
      initialize();
    }

    return blipId;
  }

  /**
   * Gets the drawing record which was read in
   *
   * @return the drawing record
   */
  public MsoDrawingRecord  getMsoDrawingRecord()
  {
    return msoDrawingRecord;
  }

  /**
   * Creates the main Sp container for the drawing
   *
   * @return the SP container
   */
  public EscherContainer getSpContainer()
  {
    if (!initialized)
    {
      initialize();
    }

    if (origin == Origin.READ)
    {
      return getReadSpContainer();
    }

    SpContainer spc = new SpContainer();
    Sp sp = new Sp(type, shapeId, 2560);
    spc.add(sp);
    Opt opt = new Opt();
    opt.addProperty(127, false, false, 17039620);
    opt.addProperty(191, false, false, 524296);
    opt.addProperty(511, false, false, 524288);
    opt.addProperty(959, false, false, 131072);
    //    opt.addProperty(260, true, false, blipId);
    //    opt.addProperty(261, false, false, 36);
    spc.add(opt);

    ClientAnchor clientAnchor = new ClientAnchor(column,
                                                 row,
                                                 column + 1,
                                                 row + 1, 
                                                 0x1);
    spc.add(clientAnchor);
    ClientData clientData = new ClientData();
    spc.add(clientData);

    return spc;
  }

  /**
   * Sets the drawing group for this drawing.  Called by the drawing group
   * when this drawing is added to it
   *
   * @param dg the drawing group
   */
  public void setDrawingGroup(DrawingGroup dg)
  {
    drawingGroup = dg;
  }

  /**
   * Accessor for the drawing group
   *
   * @return the drawing group
   */
  public DrawingGroup getDrawingGroup()
  {
    return drawingGroup;
  }

  /**
   * Gets the origin of this drawing
   *
   * @return where this drawing came from
   */
  public Origin getOrigin()
  {
    return origin;
  }

  /**
   * Accessor for the reference count on this drawing
   *
   * @return the reference count
   */
  public int getReferenceCount()
  {
    return referenceCount;
  }

  /**
   * Sets the new reference count on the drawing
   *
   * @param r the new reference count
   */
  public void setReferenceCount(int r)
  {
    referenceCount = r;
  }

  /**
   * Accessor for the column of this drawing
   *
   * @return the column
   */
  public double getX()
  {
    if (!initialized)
    {
      initialize();
    }
    return column;
  }

  /**
   * Sets the column position of this drawing.  Used when inserting/removing
   * columns from the spreadsheet
   *
   * @param x the column
   */
  public void setX(double x)
  {
    if (origin == Origin.READ)
    {
      if (!initialized)
      {
        initialize();
      }
      origin = Origin.READ_WRITE;
    }

    column = (int) x;
  }

  /**
   * Accessor for the row of this drawing
   *
   * @return the row
   */
  public double getY()
  {
    if (!initialized)
    {
      initialize();
    }

    return row;
  }

  /**
   * Accessor for the row of the drawing
   *
   * @param y the row
   */
  public void setY(double y)
  {
    if (origin == Origin.READ)
    {
      if (!initialized)
      {
        initialize();
      }
      origin = Origin.READ_WRITE;
    }

    row = (int) y;
  }


  /**
   * Accessor for the width of this drawing
   *
   * @return the number of columns spanned by this image
   */
  public double getWidth()
  {
    if (!initialized)
    {
      initialize();
    }

    return width;
  }

  /**
   * Accessor for the width
   *
   * @param w the number of columns to span
   */
  public void setWidth(double w)
  {
    if (origin == Origin.READ)
    {
      if (!initialized)
      {
        initialize();
      }
      origin = Origin.READ_WRITE;
    }

    width = w;
  }

  /**
   * Accessor for the height of this drawing
   *
   * @return the number of rows spanned by this image
   */
  public double getHeight()
  {
    if (!initialized)
    {
      initialize();
    }

    return height;
  }

  /**
   * Accessor for the height of this drawing
   *
   * @param h the number of rows spanned by this image
   */
  public void setHeight(double h)
  {
    if (origin == Origin.READ)
    {
      if (!initialized)
      {
        initialize();
      }
      origin = Origin.READ_WRITE;
    }

    height = h;
  }


  /**
   * Gets the SpContainer that was read in
   *
   * @return the read sp container
   */
  private EscherContainer getReadSpContainer()
  {
    if (!initialized)
    {
      initialize();
    }

    return readSpContainer;
  }

  /**
   * Accessor for the image data
   *
   * @return the image data
   */
  public byte[] getImageData()
  {
    Assert.verify(origin == Origin.READ || origin == Origin.READ_WRITE);

    if (!initialized)
    {
      initialize();
    }

    return drawingGroup.getImageData(blipId);
  }

  /**
   * Accessor for the type
   *
   * @return the type
   */
  public ShapeType getType()
  {
    return type;
  }

  /**
   * Accessor for the image data
   *
   * @return the image data
   */
  public byte[] getImageBytes()
  {
    Assert.verify(false);
    return null;
  }

  /**
   * Accessor for the image file path.  Normally this is the absolute path
   * of a file on the directory system, but if this drawing was constructed
   * using an byte[] then the blip id is returned
   *
   * @return the image file path, or the blip id
   */
  public String getImageFilePath()
  {
    Assert.verify(false);
    return null;
  }

  /**
   * Writes out the additional records for a combo box
   *
   * @param outputFile the output file
   * @exception IOException
   */
  public void writeAdditionalRecords(File outputFile) throws IOException
  {
    if (origin == Origin.READ)
    {
      outputFile.write(objRecord);
      return;
    }

    // Create the obj record
    ObjRecord objrec = new ObjRecord(objectId,
                                     ObjRecord.COMBOBOX);

    outputFile.write(objrec);
  }

  /**
   * Writes any records that need to be written after all the drawing group
   * objects have been written
   * Writes out all the note records
   *
   * @param outputFile the output file
   */
  public void writeTailRecords(File outputFile)
  {
  }

  /**
   * Accessor for the row
   *
   * @return  the row
   */
  public int getRow()
  {
    return 0;
  }

  /**
   * Accessor for the column
   *
   * @return the column
   */
  public int getColumn()
  {
    return 0;
  }

  /**
   * Hashing algorithm
   *
   * @return  the hash code
   */
  public int hashCode()
  {
    return getClass().getName().hashCode();
  }

  /**
   * Accessor for the first drawing on the sheet.  This is used when
   * copying unmodified sheets to indicate that this drawing contains
   * the first time Escher gubbins
   *
   * @return TRUE if this MSORecord is the first drawing on the sheet
   */
  public boolean isFirst()
  {
    return msoDrawingRecord.isFirst();
  }

  /**
   * Queries whether this object is a form object.  Form objects have their
   * drawings records spread over TXO and CONTINUE records and
   * require special handling
   *
   * @return TRUE if this is a form object, FALSE otherwise
   */
  public boolean isFormObject()
  {
    return false;
  }
}



?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
a美女胸又www黄视频久久| 亚洲欧美电影院| 精品午夜久久福利影院 | 国产91在线观看丝袜| 久久人人97超碰com| 国产精品系列在线播放| 亚洲国产成人一区二区三区| 92国产精品观看| 亚洲午夜久久久| 欧美二区在线观看| 麻豆免费精品视频| 精品国产乱码久久久久久牛牛 | 日韩精品一区二区三区蜜臀| 热久久免费视频| 3atv一区二区三区| 亚洲午夜成aⅴ人片| 欧美午夜电影网| 性欧美大战久久久久久久久| 在线观看91视频| 日韩成人免费电影| 日韩一级片网站| 成人一区二区三区| 亚洲精品久久久蜜桃| 欧美日本在线看| 国产91精品一区二区| 亚洲女同一区二区| 欧美精品18+| 国产成人av自拍| 亚洲一二三四在线| 久久看人人爽人人| 色欧美乱欧美15图片| 久久精品免费观看| 国产精品九色蝌蚪自拍| 欧美另类z0zxhd电影| 国产成人免费xxxxxxxx| 亚洲综合视频在线观看| 久久综合色婷婷| 在线视频国内自拍亚洲视频| 久久国产精品99精品国产| 国产精品久久毛片| 欧美一级专区免费大片| 成人精品免费看| 日本不卡免费在线视频| 中文字幕中文字幕一区二区| 日韩欧美在线一区二区三区| 99国产麻豆精品| 精品影视av免费| 亚洲国产美国国产综合一区二区| 国产欧美日韩在线视频| 欧美电视剧在线观看完整版| 日本高清成人免费播放| 国产精品99久久久久久似苏梦涵| 三级久久三级久久久| 亚洲人成网站影音先锋播放| 久久久久久久久伊人| 制服视频三区第一页精品| 欧洲一区二区av| 成人成人成人在线视频| 国内精品免费**视频| 婷婷六月综合亚洲| 亚洲精品第1页| 亚洲欧洲av在线| 日本一区二区动态图| 精品国产一区久久| 日韩欧美视频在线| 日韩一区二区精品葵司在线| 欧美性受xxxx| 欧美色图激情小说| 色猫猫国产区一区二在线视频| 国产成人啪免费观看软件| 国产在线视频不卡二| 老汉av免费一区二区三区| 美女久久久精品| 亚洲不卡在线观看| 午夜视频一区二区| 日韩福利电影在线| 婷婷中文字幕综合| 日本在线不卡视频| 日本女人一区二区三区| 日本亚洲视频在线| 美腿丝袜在线亚洲一区| 蜜桃91丨九色丨蝌蚪91桃色| 美国十次了思思久久精品导航| 婷婷六月综合亚洲| 奇米色777欧美一区二区| 久久www免费人成看片高清| 日日嗨av一区二区三区四区| 天堂精品中文字幕在线| 麻豆精品在线视频| 狠狠色丁香婷综合久久| 国产一区二区久久| 久久 天天综合| 国产成都精品91一区二区三| 国产成人精品一区二 | eeuss鲁片一区二区三区在线观看| 国精产品一区一区三区mba桃花| 老司机午夜精品| 粉嫩av一区二区三区粉嫩| 99精品国产视频| 欧美另类videos死尸| 欧美大片顶级少妇| 国产香蕉久久精品综合网| 国产精品久久久久久久午夜片| 国产精品免费aⅴ片在线观看| 亚洲欧美偷拍卡通变态| 亚洲成年人网站在线观看| 精品一区二区三区免费播放| 国产成人精品三级麻豆| 色综合色狠狠天天综合色| 欧美性videosxxxxx| 精品国产乱码久久| 国产精品久久99| 婷婷一区二区三区| 高清国产午夜精品久久久久久| 91麻豆文化传媒在线观看| 欧美老女人第四色| 久久午夜老司机| 一个色妞综合视频在线观看| 久久超碰97人人做人人爱| av一区二区久久| 337p亚洲精品色噜噜| 国产精品久久久久7777按摩| 亚洲第一激情av| 成人三级伦理片| 欧美丰满一区二区免费视频| 国产亚洲欧洲997久久综合| 亚洲一区视频在线| 国产高清在线观看免费不卡| 欧洲精品一区二区| 国产欧美日韩亚州综合| 日韩精品电影一区亚洲| 99久久亚洲一区二区三区青草| 日韩三级av在线播放| 亚洲精品欧美二区三区中文字幕| 精品一区二区日韩| 欧美日韩中字一区| 国产清纯白嫩初高生在线观看91| 亚洲成人av一区二区| 99v久久综合狠狠综合久久| 日韩精品专区在线影院观看 | 亚洲国产激情av| 捆绑变态av一区二区三区| 91黄色小视频| 欧美国产一区在线| 久久99久久久久| 欧美妇女性影城| 亚洲国产视频一区| 99国内精品久久| 日本一区二区高清| 国产精品888| 日韩精品在线一区二区| 亚洲午夜久久久久中文字幕久| gogo大胆日本视频一区| 亚洲精品一线二线三线无人区| 男女男精品网站| 欧美乱妇23p| 艳妇臀荡乳欲伦亚洲一区| 99麻豆久久久国产精品免费| 国产亚洲精品免费| 国产精品亚洲一区二区三区妖精 | 国产高清精品在线| 日韩女优视频免费观看| 日本成人在线电影网| 欧美日韩国产三级| 亚洲成人免费影院| 欧美精品xxxxbbbb| 视频一区欧美日韩| 欧美一级爆毛片| 全部av―极品视觉盛宴亚洲| 在线综合+亚洲+欧美中文字幕| 亚洲成在线观看| 欧美高清激情brazzers| 欧美a级一区二区| 精品国产亚洲在线| 麻豆成人在线观看| 色婷婷精品久久二区二区蜜臀av | 亚洲一区二区精品视频| 国产大片一区二区| 欧美激情一区在线观看| 成人教育av在线| 亚洲天堂av老司机| 亚洲成人在线网站| 国产91色综合久久免费分享| 欧美性猛片xxxx免费看久爱| 亚洲一区二区欧美激情| 欧美久久一区二区| 麻豆精品久久久| 国产日韩成人精品| 91视频国产观看| 一区二区三区色| 欧美疯狂做受xxxx富婆| 国产一区视频在线看| 欧美国产精品久久| 欧美性受xxxx黑人xyx性爽| 麻豆国产91在线播放| 国产免费久久精品| 欧美影院午夜播放| 毛片av中文字幕一区二区| 久久精品亚洲麻豆av一区二区| 成人国产精品免费|