Package jade.core

Examples of jade.core.AID


    String methodName = "getAll" + fieldName;
    try {
      Method sn = itsObj.getClass().getMethod(methodName, (Class[]) null);
      Iterator itor = (Iterator)sn.invoke(itsObj, new Object[]{});
      while (itor.hasNext()) {
        AID theAID = (AID)itor.next();
        listModel.addElement(theAID);
      }
    }
    catch (Exception ex) {
      ex.printStackTrace();
View Full Code Here


    String methodName = "getAll" + fieldName;
    try {
      Method sn = aid.getClass().getMethod(methodName, (Class[]) null);
      Iterator itor = (Iterator)sn.invoke(aid, new Object[]{});
      while (itor.hasNext()) {
        AID theAID = (AID)itor.next();
        listModel.addElement(theAID);
      }
    }
    catch (Exception ex) {
      ex.printStackTrace();
View Full Code Here

  void doView() {
    int index = this.contentList.getSelectedIndex();
    if (index < 0) {
      return;
    }
    AID currentAID = (AID)listModel.getElementAt(index);
    AID editAID = (AID)currentAID.clone();
    ACLAIDDialog theDialog = new ACLAIDDialog(agent);
    theDialog.setLocation((int)getLocationOnScreen().getX(), (int)getLocationOnScreen().getY());
    theDialog.setItsAID(editAID);
    theDialog.setEditable(editable);
    theDialog.setTitle(editable ? "Edit AID of: " + currentAID.getName() : "View AID of:" + currentAID.getName());
View Full Code Here

     * @param  cellHasFocus  Description of Parameter
     * @return               The ListCellRendererComponent value
     */
    public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
      if ((value != null) && (value instanceof AID)) {
        AID theAID = (AID)value;
        setText(theAID.getName());
      }
      setBackground(isSelected ? Color.blue : Color.white);
      setForeground(isSelected ? Color.white : Color.black);
      return this;
    }
View Full Code Here

     * @param  parm1  Description of Parameter
     */
    public void intervalAdded(ListDataEvent parm1) {
      DefaultListModel lm = (DefaultListModel)parm1.getSource();
      int index = parm1.getIndex0();
      AID newAID = (AID)lm.elementAt(index);
      String methodName = "add" + fieldName;
      String theType = "jade.core.AID";
      try {
        Method sn = itsObj.getClass().getMethod(methodName, new Class[]{Class.forName(theType)});
        Object os = newAID;
View Full Code Here

      }

      String removeMethodName = "remove" + fieldName;
      String addMethodName = "remove" + fieldName;

      AID currentAID = (AID)lm.get(index);

      String theType = "jade.core.AID";
      try {
        Method removeMethod = itsObj.getClass().getMethod(removeMethodName, new Class[]{Class.forName(theType)});
        removeMethod.invoke(itsObj, new Object[]{currentAID});
View Full Code Here

    eventQueue.put(er);
  }

  public void bornAgent(PlatformEvent ev) {
    ContainerID cid = ev.getContainer();
    AID agentID = ev.getAgent();
    String ownership = ev.getNewOwnership();

    BornAgent ba = new BornAgent();
    ba.setAgent(agentID);
    ba.setWhere(cid);
    ba.setState(AMSAgentDescription.ACTIVE);
    ba.setOwnership(ownership);
    ba.setClassName((String) agentID.getAllUserDefinedSlot().get(AID.AGENT_CLASSNAME));

    EventRecord er = new EventRecord(ba, localContainer);
    er.setWhen(ev.getTime());
    eventQueue.put(er);
  }
View Full Code Here

    eventQueue.put(er);
  }

  public void deadAgent(PlatformEvent ev) {
    ContainerID cid = ev.getContainer();
    AID agentID = ev.getAgent();

    DeadAgent da = new DeadAgent();
    da.setAgent(agentID);
    da.setWhere(cid);
    if (ev.getContainerRemoved()) {
View Full Code Here

    eventQueue.put(er);
  }

  public void suspendedAgent(PlatformEvent ev) {
    ContainerID cid = ev.getContainer();
    AID name = ev.getAgent();

    SuspendedAgent sa = new SuspendedAgent();
    sa.setAgent(name);
    sa.setWhere(cid);
View Full Code Here

    eventQueue.put(er);
  }

  public void resumedAgent(PlatformEvent ev) {
    ContainerID cid = ev.getContainer();
    AID name = ev.getAgent();

    ResumedAgent ra = new ResumedAgent();
    ra.setAgent(name);
    ra.setWhere(cid);
View Full Code Here

TOP

Related Classes of jade.core.AID

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.