⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 variant.java

📁 一个简单的visio程序。
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
      else
      return null;
	}

	public VArray popl(short dim) throws HpException
	{
     if(array!=null)  
	  return array.popl(dim);
     else
     {
       //throw new Exception("Run-time error 13:Type mismatch");
         return null;

     }
	}
    
	public VArray popl(int dim) throws HpException
	{
       
	 if(array!=null) 
         return array.popl(dim);
     else
      return null;
	}

	public VArray popl(float dim) throws HpException
	{
     if(array!=null) 
	  return array.popl(dim);
     else
      return null;
	}

	public VArray popl(double dim) throws HpException
	{
     if(array!=null) 
	  return array.popl(dim);
     else
      return null;
	}
	

	public VArray popl(Variant dim) throws HpException
	{
      if(array!=null)
        return array.popl(dim);
      else
      return null;
	}

	public void set(String src) throws HpException
	{
          
     array.set(src);
	}

	public void set(short i) throws HpException
	{
        array.set(i);  
     
	}

	public void set(int i) throws HpException
	{
               
      array.set(i); 
	}

	public void set(float f) throws HpException
	{
      
        array.set(f); 
     
	}

	public void set(double dbl) throws HpException
	{
        
       array.set(dbl); 
	}

	public void set(Variant var) throws HpException
	{
        
      array.set(var); 
	}

	public void set(Object obj) throws HpException
	{
       array.set(obj);

	}

	public void set(VArray ary) throws HpException
	{
       array.set(ary);

	}
  /**
   * 
   * return short Value.
   */
   public short getint() throws HpException
   {
     
       return array.getint(); 
    
   }
 
   public int getlng() throws HpException
   {
     
      return array.getlng();

   }

   public float getsgl() throws HpException
   {
     
       return array.getsgl();
   }


   public double getdbl() throws HpException
   {
     
       return array.getdbl();
   }

  public String getstr() throws HpException
   {
     
      return array.getstr();
   }


  public Variant getvar() throws HpException
   {
     
      return array.getvar();
   }

  public VArray getary() throws HpException
  {
    return array.getary();
  }
  /**
   * get array Heighter .
   * return java.uitl.Vector
   */
  public  Vector getHighdims()
  {
    if(array!=null)
	 return array.getHighdims();
    else
      return null;
  }
  /**
   * get array Lower .
   * return java.uitl.Vector.
   */
  public Vector getLowdims()
  {
     if(array!=null) 
      return array.getLowdims();
     else
      return null;
  }
  /**
   * get array dimension .
   * return int value.
   */
  
  public int getDims()
  {
	if(array!=null)
      return array.getDims();
    else
      return 0;
  }
  /**
   * return array length.
   *
   */
  public int getLength()
  {
    if(array!=null)
      return array.getLength();
    else
      return 0;
  }

  public Object clone()
     {
      try
       {
        Variant e = (Variant)super.clone();
     
        return e;
       } catch (CloneNotSupportedException e)
         {
        return null;
        }
    }
public boolean condiation(Variant right,Variant step)
{
            try{
			 if (step.dblValue()<0 )
			 { if(this.dblValue()>=right.dblValue())
			    return true;
				else return false;
			 }
			 if(this.dblValue()<=right.dblValue())
			    return true;
			 return false;
			 }catch(Exception e){e.printStackTrace();return false;}
			 
}
  
 /**
  * set  Beans's  Property. <br>
  * Param :<br>
  * property is this Beans's Property Name. <br> 
  * i is Beans Property's int value . <br>
  */
 public void setProperty(String property,int i) throws HpException
  {
     if(vobj==null)
		 throw new HpException(424,"Object Require"); 
	 vobj.push_parm(i);
      vobj.setProper(property,1); 
  }
 /**
  * set  Beans's  Property. <br>
  * Param :<br>
  * property is this Beans's Property Name. <br>
  * i is Beans Property's boolean value .<br> 
  */
 public void setProperty(String property,boolean i) throws HpException
  {
     if(vobj==null)
		 throw new HpException(424,"Object Require"); 
	 vobj.push_parm(i);
      vobj.setProper(property,1); 
  }
 /**
  * set  Beans's  Property. <br>
  * Param :<br>
  * property is this Beans's Property Name.<br> 
  * i is Beans Property's float value . <br>
  */
 public void setProperty(String property,float i) throws HpException
  {
     if(vobj==null)
		 throw new HpException(424,"Object Require"); 
	 vobj.push_parm(i);
      vobj.setProper(property,1); 
  }

 public void setProperty(String property,double db) throws HpException
  {
     if(vobj==null)
		 throw new HpException(424,"Object Require"); 
	 vobj.push_parm(db);
      vobj.setProper(property,1); 
  }
  public void setProperty(String property,String i) throws HpException
  {
     if(vobj==null)
		 throw new HpException(424,"Object Require");
	  vobj.push_parm(i);
      vobj.setProper(property,1); 
  }
 
    public void setProperty(String property,Object obj) throws HpException
  {
     if(vobj==null)
		 throw new HpException(424,"Object Require");
	  vobj.push_parm(obj);
      vobj.setProper(property,1); 
  }
 
 /**
  * set  Beans's  Property. <br>
  * Param :<br>
  * property is this Beans's Property Name.<br> 
  * i is Beans Property's Variant value . <br>
  */
 public void setProperty(String property,Variant i) throws HpException
  {
     if(vobj==null)
		 throw new HpException(424,"Object Require"); 
	 vobj.push_parm(i);
      vobj.setProper(property,1); 
  }

 public void setDefaultProperty(short i) throws HpException {
     if(vobj==null)
		 throw new HpException(424,"Object Require"); 
	 vobj.push_parm(i);
      vobj.setDefaultProper(1); 
     }

  /**
  * set  Beans's  Default Property. <br>
  * Param :<br>
  * i is property's value .
  */

 public void setDefaultProperty(int i) throws HpException
  {
    if(vobj==null)
		 throw new HpException(424,"Object Require");  
	 vobj.push_parm(i);
      vobj.setDefaultProper(1); 
  }
 
  /**
  *   
  * set  Beans's  Default Property. <br>
  * Param :<br>
  * i is property's value .
  */

 public void setDefaultProperty(boolean i) throws HpException {
    if(vobj==null)
		 throw new HpException(424,"Object Require");  
	 vobj.push_parm(i);
      vobj.setDefaultProper(1); 
     }

/**
  * set  Beans's  Default Property. <br>
  * Param :<br>
  * i is property's float value .
  */

 public void setDefaultProperty(float i) throws HpException {
    if(vobj==null)
		 throw new HpException(424,"Object Require");  
	 vobj.push_parm(i);
      vobj.setDefaultProper(1); 
  }

  /**
  *  
  * set  Beans's  Default Property. <br>
  * Param :<br>
  * i is property's double value .
  */
 public void setDefaultProperty(double i) throws HpException {
    if(vobj==null)
		 throw new HpException(424,"Object Require");  
	 vobj.push_parm(i);
      vobj.setDefaultProper(1); 
  }
 
 public void setDefaultProperty(Object obj) throws HpException {
    if(vobj==null)
		 throw new HpException(424,"Object Require");  
	 vobj.push_parm(obj);
      vobj.setDefaultProper(1); 
  }
  
  /**
  *   
  * set  Beans's  Default Property. <br>
  * Param :<br>
  * i is property's String value .
  */
 public void setDefaultProperty(String i) throws HpException {
    if(vobj==null)
		 throw new HpException(424,"Object Require");  
	 vobj.push_parm(i);
      vobj.setDefaultProper(1); 
  }

  /**
  * set  Beans's  Default Property. <br>
  * Param :<br>
  * i is property's Variant value .<br>
  */
 public void setDefaultProperty(Variant i) throws HpException
  {
    if(vobj==null)
		 throw new HpException(424,"Object Require");  
	 vobj.push_parm(i);
      vobj.setDefaultProper(1); 
  }
  
 public Variant  getProperty(String property) throws HpException
  {
    if(vobj==null)
		 throw new HpException(424,"Object Require"); 
	 return vobj.getProperty(property);
  }

 public Variant getDefaultProperty() throws HpException
 {
   if(vobj==null)
		 throw new HpException(424,"Object Require"); 
	 return vobj.getDefaultProperty();
 }

 public String getClassType() 
 {
      return vobj.getClassType();
 }

 public VObject getvobject()
 {

    return vobj;
   
 }

  public void Set(Object obj) throws HpException
  {
      if(obj==null)
		throw new HpException(13,"Type mismatch");   
	  vobj= new VObject(obj);
	  array=null;
  }

  public void Set(Variant obj) throws  HpException
  {
     if(obj instanceof HECore.stddata.VObject)   
	   vobj=  (VObject)obj;
	 else
		throw new HpException(13,"Type mismatch"); 
	 array=null;
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -