コード例 #1
0
  /** @return A Box for selecting an asset type, the old asset and its replacement asset. */
  private Box assetChoiceBox() {
    TreeSet<String> types = new TreeSet<String>();

    types.add(AssetType.CHARACTER.toString());
    types.add(AssetType.PROP.toString());
    types.add(AssetType.SET.toString());

    // JDrawer toReturn;
    Box hbox = new Box(BoxLayout.X_AXIS);
    {
      JCollectionField assetType = UIFactory.createCollectionField(types, diag, sTSize);
      assetType.setActionCommand("type");
      assetType.addActionListener(this);

      JCollectionField oldAsset = UIFactory.createCollectionField(charList.keySet(), diag, sVSize);
      JCollectionField newAsset = UIFactory.createCollectionField(charList.keySet(), diag, sVSize);
      hbox.add(assetType);
      hbox.add(Box.createHorizontalStrut(10));
      hbox.add(oldAsset);
      hbox.add(Box.createHorizontalStrut(5));
      hbox.add(newAsset);

      // pPotentials.put(oldAsset, newAsset);
    }
    list.add(Box.createVerticalStrut(5));

    return hbox; // toReturn;
  } // return assetChoiceBox