Exemplo n.º 1
0
  public void initPlugin(PluginNode pNode, PluginConfig pConfig) throws Exception {
    con = (DMConnection) pNode.getSingleApi(DMConnection.class);
    timer = ((ApiSystem) pNode.getSingleApi(ApiSystem.class)).getTimer();
    node = pNode;

    initUI();

    node.addApi(ApiObjectChanged.class, this);

    try {
      ((ApiLayout) pNode.getSingleApi(ApiLayout.class)).setComponent(this, pConfig.getNode());
    } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }

    if (pConfig.getNode().getAttribute("listen").indexOf("_obj.hotselect_") >= 0) {
      initHotSelectMenu(pNode, pConfig, this);
      pNode.addApi(ApiObjectHotSelect.class, this);
    }
    if (pConfig.getNode().getAttribute("listen").indexOf("_obj.last_") >= 0) {
      IDfPersistentObject obj = con.getPersistentObject(pConfig.getProperty("objid"));
      show(con, (IDfSysObject) obj);
    }

    findCabinets();
  }
Exemplo n.º 2
0
  public void initPlugin(PluginNode pNode, PluginConfig pConfig) throws Exception {

    node = pNode;
    con = (DMConnection) pNode.getSingleApi(DMConnection.class);
    config = pConfig;

    initUI();

    ((ApiLayout) pNode.getSingleApi(ApiLayout.class)).setComponent(this, pConfig.getNode());

    if (pConfig.getNode().getAttribute("listen").indexOf("_obj.hotselect_") >= 0) {
      pNode.addApi(ApiObjectHotSelect.class, this);
    }
    if (pConfig.getNode().getAttribute("listen").indexOf("_obj.last_") >= 0) {
      IDfPersistentObject obj = con.getPersistentObject(pConfig.getProperty("objid"));
      actionShow(obj);
    }
  }