Package net.sf.robocode.repository

Examples of net.sf.robocode.repository.IRobotSpecItem


  public int compareTo(Object other) {
    if (other == this) {
      return 0;
    }
    if (other instanceof IRobotSpecItem) {
      IRobotSpecItem otherRI = (IRobotSpecItem) other;

      return compare(getFullPackage(), getFullClassName(), getVersion(), otherRI.getFullPackage(),
          otherRI.getFullClassName(), otherRI.getVersion());
    }

    // for IgnoredItem
    return 0;
  }
View Full Code Here


        return;
      }
      currentSelectedRobots = selectedRobots; // Bug fix [3026856]

      if (selectedRobots.size() == 1) {
        IRobotSpecItem robotSpecItem = selectedRobots.get(0);

        getIncludeSource().setSelected(robotSpecItem.getIncludeSource());
       
        getIncludeData().setSelected(robotSpecItem.getIncludeData());

        String ver = robotSpecItem.getVersion();
        if (ver == null || ver.length() == 0) {
          getVersionHelpLabel().setVisible(false);
          ver = "1.0";
        } else {
          if (ver.length() == 10) {
            ver = ver.substring(0, 9);
          }
          ver += "*";
          getVersionHelpLabel().setVisible(true);
        }
        getVersionField().setText(ver);

        String desc = robotSpecItem.getDescription();
        if (desc == null) {
          desc = "";
        }
        getDescriptionArea().setText(desc);

        String author = robotSpecItem.getAuthorName();
        if (author == null) {
          author = "";
        }
        getAuthorField().setText(author);

        URL url = robotSpecItem.getWebpage();
        String webPage = (url != null) ? url.toString() : "";   
        getWebpageField().setText(webPage);

        String fullPackage = robotSpecItem.getFullPackage();

        String text = "";
        if (fullPackage != null && fullPackage.indexOf(".") != -1) {
          String htmlFileName = fullPackage.substring(0, fullPackage.lastIndexOf(".")) + ".html";

View Full Code Here

  private void selectedRobotsListSelectionChanged() {
    int sel[] = getSelectedRobotsList().getSelectedIndices();

    if (sel.length == 1) {
      availableRobotsPanel.clearSelection();
      IRobotSpecItem robotSpecification = ((AvailableRobotsPanel.ItemWrapper) getSelectedRobotsList().getModel().getElementAt(sel[0])).getItem();

      showDescription(robotSpecification);
    } else {
      showDescription(null);
    }
View Full Code Here

      } else {
        selectedRobots = teamPackager.getRobotSelectionPanel().getSelectedRobots();
      }

      if (selectedRobots != null) {
        IRobotSpecItem robotSpecification = selectedRobots.get(0);

        getTeamNameLabel().setText("Please choose a name for your team: (Must be a valid Java classname)");
        getTeamNameField().setText(robotSpecification.getShortClassName() + "Team");
        getTeamPackageLabel().setText(robotSpecification.getFullPackage() + ".");
        teamPackage = robotSpecification.getFullPackage();
        if (teamPackage != null) {
          teamPackage += ".";
        }

        String d = robotSpecification.getDescription();

        if (d == null) {
          d = "";
        }
        getDescriptionArea().setText(d);
        String a = robotSpecification.getAuthorName();

        if (a == null) {
          a = "";
        }
        getAuthorField().setText(a);
        URL u = robotSpecification.getWebpage();

        if (u == null) {
          getWebpageField().setText("");
        } else {
          getWebpageField().setText(u.toString());
View Full Code Here

    output = new StringWriter();
    PrintWriter out = new PrintWriter(output);

    out.println("Robot Extract");
    List<IRobotSpecItem> selectedRobots = getRobotSelectionPanel().getSelectedRobots();
    IRobotSpecItem spec = selectedRobots.get(0);

    try {
      WindowUtil.setStatusWriter(out);

      rv = repositoryManager.extractJar(spec);
View Full Code Here

    if (sel.length == 1) {
      if (actionList != null) {
        actionList.clearSelection();
      }
      IRobotSpecItem robotSpecification = ((ItemWrapper) getAvailableRobotsList().getModel().getElementAt(sel[0])).getItem();

      if (robotSelectionPanel != null) {
        robotSelectionPanel.showDescription(robotSpecification);
      }
    } else {
View Full Code Here

      }

      String text;

      if (value instanceof ItemWrapper) {
        IRobotSpecItem item = ((ItemWrapper) value).getItem();

        text = (item.isTeam() ? "Team: " : "");
        text += useShortName
            ? item.getUniqueShortClassNameWithVersion()
            : item.getUniqueFullClassNameWithVersion();
      } else {
        text = value.toString();
      }
      setText(text);
View Full Code Here

TOP

Related Classes of net.sf.robocode.repository.IRobotSpecItem

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.