GrxBaseViewPart.java
Go to the documentation of this file.
1 package com.generalrobotix.ui;
2 
3 import java.lang.reflect.Constructor;
4 import org.eclipse.swt.widgets.Composite;
5 import org.eclipse.ui.part.ViewPart;
7 
8 public class GrxBaseViewPart extends ViewPart {
9 
10  protected GrxBaseView v=null;
11 
12  //public GrxBaseViewPart(){System.out.println(this);}
13 
15  return v;
16  }
17 
18  public void createPartControl(Composite parent) {
19  createView( GrxBaseView.class, "Base View", this, parent );
20  }
21 
22  public void createView(Class <?extends GrxBaseView> cls, String name, GrxBaseViewPart vp, Composite p ){
23  Constructor<? extends GrxBaseView> c = null;
25  if(act != null){
26  try {
27  c = cls.getConstructor(new Class[] { String.class, GrxPluginManager.class, GrxBaseViewPart.class, Composite.class });
28  v = (GrxBaseView) c.newInstance(new Object[] { name, act.manager_, vp, p });
29  if(v!=null)
31  } catch (Exception e) {
32  e.printStackTrace();
33  }
34  }
35  }
36 
37  @Override
38  public void setFocus() {}
39 
40  public void dispose(){
41  if(v!=null)
42  v.shutdown();
43  }
44 }
int c
Definition: autoplay.py:16
void createView(Class<?extends GrxBaseView > cls, String name, GrxBaseViewPart vp, Composite p)
#define null
our own NULL pointer
Definition: IceTypes.h:57
png_infop png_charpp name
Definition: png.h:2382
def act(evt)
Definition: swingTest.py:3
プラグイン管理クラス GrxUIの核になるクラス。プラグインのロード等の、初期化を実行する。 プラグインとそ...
org
void createPartControl(Composite parent)


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Thu Sep 8 2022 02:24:03