ItemPropertyDoubleSpinForSWT.java
Go to the documentation of this file.
00001 
00002 package com.generalrobotix.ui.util;
00003 
00004 import org.eclipse.swt.widgets.Composite;
00005 
00006 import com.generalrobotix.ui.GrxBaseItem;
00007 import com.generalrobotix.ui.view.graph.SEDoubleTextWithSpinForSWT;
00008 
00009 
00010 //SEDouble型の値を設定するSWT用スピナーを提供するクラス
00011 
00012 public class ItemPropertyDoubleSpinForSWT extends SEDoubleTextWithSpinForSWT{
00013 
00014     private GrxBaseItem item_;
00015     private String key_;
00016 
00017     public ItemPropertyDoubleSpinForSWT(Composite parent,int style,double min,double max,double step){
00018         super(parent, style, min, max, step);
00019     }
00020     
00021     protected void updateValue()
00022     {
00023         updateProperty(text2value());
00024     }
00025     
00026     public void updateProperty(double v) {
00027         if (isOk(v)) {
00028             if (item_ != null && key_ != null){
00029                 item_.setDbl(key_, v);
00030             }
00031         }
00032     }
00033     
00034     public void setItem(GrxBaseItem item) {
00035         item_ = item;
00036     }
00037     
00038     public void setKey(String key){
00039         key_ = key;
00040     }
00041 }


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Thu Apr 11 2019 03:30:17