Esempio n. 1
0
  public static void setEntity(ConcreteAgent ent, Map attributes) {
    Map currentMap =
        (Map)
            RenderComponentManager.retrieveIDs("ConcreteAgent", ent.getPrefs(attributes).getView());
    current = ent.getPrefs(attributes).getView();
    if (ent != null
        && currentMap.get("_attributes_") != null
        && currentMap.get("_attributes_") instanceof ingenias.editor.rendererxml.AttributesPanel) {

      ((ingenias.editor.rendererxml.AttributesPanel) currentMap.get("_attributes_")).setEntity(ent);
    }

    if (currentMap.get("Id") != null) {
      if (ent != null && ent.getId() != null) {
        if (currentMap.get("Id") instanceof javax.swing.JLabel) {
          ((javax.swing.JLabel) (currentMap).get("Id")).setText(ent.getId().toString());
        } else {
          if (currentMap.get("Id") instanceof javax.swing.text.JTextComponent)
            ((javax.swing.text.JTextComponent) (currentMap).get("Id"))
                .setText(ent.getId().toString());
        }
      } else {
        if (currentMap.get("Id") instanceof javax.swing.JLabel)
          ((javax.swing.JLabel) (currentMap).get("Id")).setText("");
        else {
          if (!(currentMap.get("Id") instanceof ingenias.editor.rendererxml.CollectionPanel))
            ((javax.swing.text.JTextComponent) (currentMap).get("Id")).setText("");
        }
      }
    }
  }
Esempio n. 2
0
  public static void setEntity(WFResponsable ent) {
    Map currentMap =
        (Map) RenderComponentManager.retrieveIDs("WFResponsable", ent.getPrefs().getView());

    if (currentMap.get("Label") != null) {
      if (ent != null && ent.getLabel() != null) {
        if (currentMap.get("Label") instanceof javax.swing.JLabel) {
          ((javax.swing.JLabel) (currentMap).get("Label")).setText(ent.getLabel().toString());
        } else {
          if (currentMap.get("Label") instanceof javax.swing.text.JTextComponent)
            ((javax.swing.text.JTextComponent) (currentMap).get("Label"))
                .setText(ent.getLabel().toString());
        }
      } else {
        if (currentMap.get("Label") instanceof javax.swing.JLabel)
          ((javax.swing.JLabel) (currentMap).get("Label")).setText("");
        else {
          if (!(currentMap.get("Label") instanceof ingenias.editor.rendererxml.CollectionPanel))
            ((javax.swing.text.JTextComponent) (currentMap).get("Label")).setText("");
        }
      }
    }
  }
Esempio n. 3
0
  public static void setEntity(Plan ent, Map attributes) {
    Map currentMap =
        (Map) RenderComponentManager.retrieveIDs("Plan", ent.getPrefs(attributes).getView());
    current = ent.getPrefs(attributes).getView();
    if (ent != null
        && currentMap.get("_attributes_") != null
        && currentMap.get("_attributes_") instanceof ingenias.editor.rendererxml.AttributesPanel) {

      ((ingenias.editor.rendererxml.AttributesPanel) currentMap.get("_attributes_")).setEntity(ent);
    }

    if (currentMap.get("Tasks") != null
        && currentMap.get("Tasks") instanceof ingenias.editor.rendererxml.CollectionPanel) {
      try {
        ((ingenias.editor.rendererxml.CollectionPanel) currentMap.get("Tasks"))
            .setCollection("Tasks", ent.Tasks, ent.Tasks.getType());
      } catch (IllegalArgumentException ex) {
        ex.printStackTrace();
      } catch (IllegalAccessException ex) {
        ex.printStackTrace();
      }
    }

    if (currentMap.get("Tasks") != null
        && currentMap.get("Tasks") instanceof ingenias.editor.rendererxml.CollectionPanel) {
      try {
        ((ingenias.editor.rendererxml.CollectionPanel) currentMap.get("Tasks"))
            .setCollection("Tasks", ent.Tasks, ent.Tasks.getType());
      } catch (IllegalArgumentException ex) {
        ex.printStackTrace();
      } catch (IllegalAccessException ex) {
        ex.printStackTrace();
      }
    }

    if (currentMap.get("Tasks") != null) {
      if (ent != null && ent.getTasks() != null) {
        if (currentMap.get("Tasks") instanceof javax.swing.JLabel) {
          ((javax.swing.JLabel) (currentMap).get("Tasks")).setText(ent.getTasks().toString());
        } else {
          if (currentMap.get("Tasks") instanceof javax.swing.text.JTextComponent)
            ((javax.swing.text.JTextComponent) (currentMap).get("Tasks"))
                .setText(ent.getTasks().toString());
        }
      } else {
        if (currentMap.get("Tasks") instanceof javax.swing.JLabel)
          ((javax.swing.JLabel) (currentMap).get("Tasks")).setText("");
        else {
          if (!(currentMap.get("Tasks") instanceof ingenias.editor.rendererxml.CollectionPanel))
            ((javax.swing.text.JTextComponent) (currentMap).get("Tasks")).setText("");
        }
      }
    }

    if (currentMap.get("Id") != null) {
      if (ent != null && ent.getId() != null) {
        if (currentMap.get("Id") instanceof javax.swing.JLabel) {
          ((javax.swing.JLabel) (currentMap).get("Id")).setText(ent.getId().toString());
        } else {
          if (currentMap.get("Id") instanceof javax.swing.text.JTextComponent)
            ((javax.swing.text.JTextComponent) (currentMap).get("Id"))
                .setText(ent.getId().toString());
        }
      } else {
        if (currentMap.get("Id") instanceof javax.swing.JLabel)
          ((javax.swing.JLabel) (currentMap).get("Id")).setText("");
        else {
          if (!(currentMap.get("Id") instanceof ingenias.editor.rendererxml.CollectionPanel))
            ((javax.swing.text.JTextComponent) (currentMap).get("Id")).setText("");
        }
      }
    }
  }
Esempio n. 4
0
 public JComponent getConcreteSubComponent(String fieldname, Entity ent, Map map) {
   Map<String, JComponent> currentMap =
       (Map) RenderComponentManager.retrieveIDs("Plan", ent.getPrefs(map).getView());
   return currentMap.get(fieldname);
 }
  public static void setEntity(DeploymentUnitByTypeMSEntity ent) {
    Map currentMap =
        (Map)
            RenderComponentManager.retrieveIDs(
                "DeploymentUnitByTypeMSEntity", ent.getPrefs().getView());

    if (ent != null
        && currentMap.get("_attributes_") != null
        && currentMap.get("_attributes_") instanceof ingenias.editor.rendererxml.AttributesPanel) {

      ((ingenias.editor.rendererxml.AttributesPanel) currentMap.get("_attributes_")).setEntity(ent);
    }

    if (currentMap.get("InitialState") != null) {
      if (ent != null && ent.getInitialState() != null) {
        if (currentMap.get("InitialState") instanceof javax.swing.JLabel) {
          ((javax.swing.JLabel) (currentMap).get("InitialState"))
              .setText(ent.getInitialState().toString());
        } else {
          if (currentMap.get("InitialState") instanceof javax.swing.text.JTextComponent)
            ((javax.swing.text.JTextComponent) (currentMap).get("InitialState"))
                .setText(ent.getInitialState().toString());
        }
      } else {
        if (currentMap.get("InitialState") instanceof javax.swing.JLabel)
          ((javax.swing.JLabel) (currentMap).get("InitialState")).setText("");
        else {
          if (!(currentMap.get("InitialState")
              instanceof ingenias.editor.rendererxml.CollectionPanel))
            ((javax.swing.text.JTextComponent) (currentMap).get("InitialState")).setText("");
        }
      }
    }

    if (currentMap.get("NumberInstances") != null) {
      if (ent != null && ent.getNumberInstances() != null) {
        if (currentMap.get("NumberInstances") instanceof javax.swing.JLabel) {
          ((javax.swing.JLabel) (currentMap).get("NumberInstances"))
              .setText(ent.getNumberInstances().toString());
        } else {
          if (currentMap.get("NumberInstances") instanceof javax.swing.text.JTextComponent)
            ((javax.swing.text.JTextComponent) (currentMap).get("NumberInstances"))
                .setText(ent.getNumberInstances().toString());
        }
      } else {
        if (currentMap.get("NumberInstances") instanceof javax.swing.JLabel)
          ((javax.swing.JLabel) (currentMap).get("NumberInstances")).setText("");
        else {
          if (!(currentMap.get("NumberInstances")
              instanceof ingenias.editor.rendererxml.CollectionPanel))
            ((javax.swing.text.JTextComponent) (currentMap).get("NumberInstances")).setText("");
        }
      }
    }

    if (currentMap.get("AgentTypeDeployed") != null) {
      if (ent != null && ent.getAgentTypeDeployed() != null) {
        if (currentMap.get("AgentTypeDeployed") instanceof javax.swing.JLabel) {
          ((javax.swing.JLabel) (currentMap).get("AgentTypeDeployed"))
              .setText(ent.getAgentTypeDeployed().toString());
        } else {
          if (currentMap.get("AgentTypeDeployed") instanceof javax.swing.text.JTextComponent)
            ((javax.swing.text.JTextComponent) (currentMap).get("AgentTypeDeployed"))
                .setText(ent.getAgentTypeDeployed().toString());
        }
      } else {
        if (currentMap.get("AgentTypeDeployed") instanceof javax.swing.JLabel)
          ((javax.swing.JLabel) (currentMap).get("AgentTypeDeployed")).setText("");
        else {
          if (!(currentMap.get("AgentTypeDeployed")
              instanceof ingenias.editor.rendererxml.CollectionPanel))
            ((javax.swing.text.JTextComponent) (currentMap).get("AgentTypeDeployed")).setText("");
        }
      }
    }

    if (currentMap.get("Id") != null) {
      if (ent != null && ent.getId() != null) {
        if (currentMap.get("Id") instanceof javax.swing.JLabel) {
          ((javax.swing.JLabel) (currentMap).get("Id")).setText(ent.getId().toString());
        } else {
          if (currentMap.get("Id") instanceof javax.swing.text.JTextComponent)
            ((javax.swing.text.JTextComponent) (currentMap).get("Id"))
                .setText(ent.getId().toString());
        }
      } else {
        if (currentMap.get("Id") instanceof javax.swing.JLabel)
          ((javax.swing.JLabel) (currentMap).get("Id")).setText("");
        else {
          if (!(currentMap.get("Id") instanceof ingenias.editor.rendererxml.CollectionPanel))
            ((javax.swing.text.JTextComponent) (currentMap).get("Id")).setText("");
        }
      }
    }
  }