Ejemplo n.º 1
0
  private void addContinFilter(final Container pane) {

    GridLayout layout = new GridLayout(0, 2);

    layout.setVgap(GAP);

    final JPanel panel = new JPanel();
    pane.add(panel, BorderLayout.NORTH);

    panel.setLayout(layout);
    layout.layoutContainer(panel);

    panel.setBorder(BorderFactory.createTitledBorder("Show contin(s):"));

    add(
        "with number (ex. 2, 4-9, 30)",
        Display2DOptions.ContinFilterType.custom_number,
        continNumberInput,
        panel);

    add(
        "with name (ex. ContinA, ContinB)",
        Display2DOptions.ContinFilterType.custom_name,
        continNameInput,
        panel);

    add(
        "with color code (ex. blue-10, green-5)",
        Display2DOptions.ContinFilterType.custom_color_code,
        continColorInput,
        panel);
  }
Ejemplo n.º 2
0
  private void addImageOptions(final Container pane) {

    GridLayout layout = new GridLayout(0, 2);

    layout.setVgap(GAP);

    final JPanel panel = new JPanel();
    pane.add(panel, BorderLayout.NORTH);

    panel.setLayout(layout);
    layout.layoutContainer(panel);

    panel.setBorder(BorderFactory.createTitledBorder("Image Options:"));

    panel.add(new JLabel("Synapse Type:"));
    for (Display2DOptions.SynapseType type : Display2DOptions.SynapseType.getValues()) {
      synapsesCombo.addItem(type.getLabel());
    }
    synapsesCombo.setSelectedIndex(
        Display2DOptions.SynapseType.getIndex(Elegance.display2DOptions.getSynapseType()));

    panel.add(synapsesCombo);

    panel.add(new JLabel("Display Type:"));
    for (String dtypeStr : ALL_D_TYPES) {
      dtypeCombo.addItem(dtypeStr);
    }
    panel.add(dtypeCombo);

    dtypeCombo.setSelectedIndex(
        Arrays.asList(ALL_D_TYPES).indexOf(Elegance.display2DOptions.getDtype()));

    panel.add(new JLabel("Zoom:"));
    for (String zoomStr : ALL_ZOOMS) {
      zoomCombo.addItem(zoomStr);
    }
    panel.add(zoomCombo);
    zoomCombo.setSelectedIndex(
        Arrays.asList(ALL_ZOOMS).indexOf(Elegance.display2DOptions.getZoom() + ""));

    panel.add(new JLabel("Neurons To Connect: (ex. 10:20, 21:35)"));
    panel.add(neurons2ConnectInput);

    if (Elegance.display2DOptions.getNeurons2Connect() != null) {
      List<String> str = new ArrayList<String>();
      for (Display2DOptions.NeuronPair pair : Elegance.display2DOptions.getNeurons2Connect()) {
        str.add(pair.getFromId() + ":" + pair.getToId());
      }
      neurons2ConnectInput.setText(EString.join(str, ","));
    }
  }
Ejemplo n.º 3
0
  /**
   * Lays out the specified container using this layout.
   *
   * @param parent The container that needs to be laid out.
   */
  public void layoutContainer(Container parent) {
    if (parent != container) throw new AWTError("invalid parent");

    grid.layoutContainer(parent);
  }