Example #1
0
 private JPanel doLevelLayout() {
   final FormLayout layout = new FormLayout("5dlu, fill:default:grow, 5dlu", "5dlu, pref, 5dlu");
   final PanelBuilder builder = ComponentFactory.createBuilder(layout);
   final CellConstraints cc = new CellConstraints();
   builder.add(levelComboBox, cc.xy(2, 2));
   return ComponentFactory.createPanel(builder);
 }
  private Component buildTagsPanel() {
    FormLayout layout =
        new FormLayout(
            "5px, p, 10px, p, 10px, p, 10px, p, 10px, p, 10px, p, 10px, p, 10px, p, 10px, p, 10px, p, 5px",
            "f:130, 5px");
    PanelBuilder builder = new PanelBuilder(layout);
    builder.setBorder(new TitledBorder("Tags"));
    builder.setOpaque(true);

    CellConstraints cc = new CellConstraints();

    int x = 2;
    int y = 1;
    for (String engineName : lTagsPerEngine.keySet()) {
      if (x > 20) {
        break;
      }

      JScrollPane sp = new JScrollPane(lTagsPerEngine.get(engineName));
      sp.setBorder(BorderFactory.createEmptyBorder());

      JPanel p = new JPanel(new BorderLayout(0, 3));
      p.add(new JHeader(engineName), BorderLayout.NORTH);
      p.add(sp, BorderLayout.CENTER);

      builder.add(p, cc.xy(x, y));
      x += 2;
    }

    return builder.getPanel();
  }
  private JPanel buildFilePropertyPreferencesPanel() {
    FormLayout layout =
        new FormLayout(
            "5px, f:p:g, 15px, f:p:g, 15px, f:p:g, 15px, f:p:g, 15px, f:p:g, 15px, f:p:g, 5px",
            "5px, t:p, 15px, t:p, 15px, t:p, 5px");
    PanelBuilder builder = new PanelBuilder(layout);
    builder.setBorder(new TitledBorder("Properties"));
    builder.setOpaque(true);

    CellConstraints cc = new CellConstraints();

    if (fssps != null) {
      // create grid with file types and engine names
      int index = 0;
      int x = 0;
      int y = 0;
      for (FileScannerSelectorPanel fssp : fssps) {
        if (index % 6 == 0) {
          x = 2;
          y += 2;
        }

        builder.add(fssp, cc.xy(x, y));
        x += 2;

        index++;
      }
    } else {
      log.warn(
          "No FileSelectorPanels will be added because fpps is null. This should never happen!");
    }

    return builder.getPanel();
  }
  private int createArmSelect(
      PanelBuilder builder,
      int row,
      final Study curStudy,
      TreatmentDefinition def,
      CellConstraints cc) {
    builder.addLabel(def.getLabel(), cc.xy(2, row));

    ListModel arms = d_pm.getArmsPerStudyPerDefinition(curStudy, def);

    final JComboBox drugBox =
        AuxComponentFactory.createBoundComboBox(
            arms, d_pm.getSelectedArmModel(curStudy, def), true);
    if (arms.getSize() == 1) drugBox.setEnabled(false);
    final JPanel drugAndDosePanel = new JPanel(new BorderLayout());

    builder.add(drugBox, cc.xy(4, row));
    drugBox.addActionListener(
        new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent e) {
            updateDrugAndDoseLabel(curStudy, drugBox, drugAndDosePanel);
          }
        });
    row = LayoutUtil.addRow(builder.getLayout(), row);
    updateDrugAndDoseLabel(curStudy, drugBox, drugAndDosePanel);
    builder.add(drugAndDosePanel, cc.xy(4, row));

    return LayoutUtil.addRow(builder.getLayout(), row);
  }
  @Override
  public void prepare() {
    d_pm.rebuildArmSelection();

    removeAll();

    FormLayout layout = new FormLayout("3dlu, left:pref, 3dlu, pref:grow", "p");
    PanelBuilder builder = new PanelBuilder(layout);
    builder.setDefaultDialogBorder();
    CellConstraints cc = new CellConstraints();

    int row = 1;
    for (Study curStudy : d_pm.getSelectableStudyListPM().getSelectedStudiesModel()) {
      builder.addSeparator(curStudy.toString(), cc.xyw(1, row, 4));
      row = LayoutUtil.addRow(layout, row);

      for (TreatmentDefinition def : d_pm.getSelectedRefinedTreatmentDefinitions()) {
        if (!d_pm.getArmsPerStudyPerDefinition(curStudy, def).isEmpty()) {
          row = createArmSelect(builder, row, curStudy, def, cc);
        }
      }
    }

    JScrollPane sp = new JScrollPane(builder.getPanel());
    add(sp, BorderLayout.CENTER);
    sp.getVerticalScrollBar().setUnitIncrement(16);

    setComplete(true);
  }
  private void createReplacePanel() {
    if (!table.isReadOnly()) {
      replaceField.setColumns(textFieldLength);
      replaceField.addKeyListener(new FindReplaceTextFieldKeyAdapter());

      replaceButton = createButton(getResourceString("SS_SR_REPLACE"));
      replaceButton.addActionListener(replaceAction);

      replaceAllButton = createButton(getResourceString("SS_SR_REPLACEALL"));
      replaceAllButton.addActionListener(replaceAction);

      // replaceButton.setMnemonic(KeyEvent.VK_N);
      // replaceButton.addActionListener(searchAction);
      // JComponent[] itemSample = { new JMenuItem("Replace"), new JMenuItem("Replace All") };
      // memoryReplaceButton = new MemoryDropDownButton("Replace",
      // IconManager.getIcon("DropDownArrow"),
      // 1, java.util.Arrays.asList(itemSample));
      // memoryReplaceButton.setOverrideBorder(true, memoryReplaceButton.raisedBorder);
      // memoryReplaceButton.setEnabled(false);

      builder.add(replaceField, cc.xy(5, 3));
      builder.add(replaceButton, cc.xy(7, 3));
      builder.add(replaceAllButton, cc.xy(9, 3));
    }
  }
  private void initView() {
    cancelButton = new JButton("Cancel");
    proceedButton = new JButton("Continue");

    attributesTable = new JTable();

    // assemble
    CellConstraints cc = new CellConstraints();
    PanelBuilder builder =
        new PanelBuilder(new FormLayout("fill:200dlu:grow", "pref, 3dlu, top:40dlu:grow"));

    builder.setDefaultDialogBorder();

    builder.addLabel("Select actions for duplicated attributes:", cc.xy(1, 1));
    builder.add(new JScrollPane(attributesTable), cc.xy(1, 3));

    JPanel buttons = new JPanel(new FlowLayout(FlowLayout.RIGHT));
    buttons.add(cancelButton);
    buttons.add(proceedButton);

    getContentPane().setLayout(new BorderLayout());
    getContentPane().add(builder.getPanel(), BorderLayout.CENTER);
    getContentPane().add(buttons, BorderLayout.SOUTH);

    // TODO: use preferences
    setSize(450, 350);
  }
  private void prepareComponent() {
    CloseEventHandler closeEventHandler = new CloseEventHandler();
    addWindowListener(closeEventHandler);

    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

    JPanel contentPanel = new JPanel();
    // JPanel contentPanel = new FormDebugPanel();
    contentPane.add(contentPanel, BorderLayout.CENTER);

    CellConstraints cc = new CellConstraints();
    FormLayout layout =
        new FormLayout(
            "4dlu, d:grow, 4dlu", // columns
            "4dlu, p, 2dlu, fill:100dlu:grow, 4dlu, "
                + // rows
                "p, 2dlu, p, 4dlu"); // btn rows
    PanelBuilder contentPB = new PanelBuilder(layout, contentPanel);
    int columnCount = layout.getColumnCount();
    int rowCount = layout.getRowCount();

    JLabel label = new JLabel(Localizer.getString("MediaTypeCondEditor_ConditionToAdd"));
    contentPB.add(label, cc.xywh(2, 2, 1, 1));

    mediaTypeModel = new MediaTypeModel();
    mediaTypeTable = new JTable(mediaTypeModel);
    JTableHeader tableHeader = mediaTypeTable.getTableHeader();
    tableHeader.setResizingAllowed(false);
    tableHeader.setReorderingAllowed(false);
    // adjust column witdh of checkbox
    JCheckBox box = (JCheckBox) mediaTypeTable.getDefaultRenderer(Boolean.class);
    TableColumn column = mediaTypeTable.getColumnModel().getColumn(0);
    column.setMaxWidth(box.getPreferredSize().width + 2);
    column.setMinWidth(box.getPreferredSize().width + 2);
    mediaTypeTable.getColumnModel().getColumn(1).setCellRenderer(new MediaTypeCellRenderer());
    // ToolTipManager.sharedInstance().registerComponent( mediaTypeTable );
    contentPB.add(new JScrollPane(mediaTypeTable), cc.xywh(2, 4, 1, 1));

    // button bar
    contentPB.add(new JSeparator(), cc.xywh(1, rowCount - 3, columnCount, 1));

    JButton okBtn = new JButton(Localizer.getString("OK"));
    okBtn.addActionListener(new OkBtnListener());
    okBtn.setDefaultCapable(true);
    okBtn.setRequestFocusEnabled(true);

    JButton cancelBtn = new JButton(Localizer.getString("Cancel"));
    cancelBtn.addActionListener(closeEventHandler);

    JPanel btnPanel = ButtonBarFactory.buildOKCancelBar(okBtn, cancelBtn);
    contentPB.add(btnPanel, cc.xywh(2, rowCount - 1, columnCount - 2, 1));

    setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
    getRootPane().setDefaultButton(okBtn);

    pack();
    setLocationRelativeTo(getParent());
  }
Example #9
0
 private JComponent buildMainPanel() {
   final FormLayout layout = new FormLayout("450dlu", "p,3dlu,p,3dlu,p");
   CellConstraints cc = new CellConstraints();
   PanelBuilder builder = new PanelBuilder(layout);
   builder.add(buildFormPanel(), cc.xy(1, 1));
   builder.add(buildGridPanel(), cc.xy(1, 3));
   // builder.add(createValidationView(),cc.xy(1,3))
   return builder.getPanel();
 }
Example #10
0
  private void genUI() {
    prepareComponent();
    FormLayout layout = new FormLayout("3dlu:grow, pref, 3dlu:grow", "3dlu:grow, pref, 3dlu:grow");
    PanelBuilder builder = new PanelBuilder(layout);
    CellConstraints cc = new CellConstraints();

    builder.add(mStart, cc.xy(2, 2));
    setLayout(new BorderLayout());
    add(builder.getPanel(), BorderLayout.CENTER);
  }
Example #11
0
 protected JComponent buildFilterPanel() {
   FormLayout layout = new FormLayout("40dlu,3dlu,f:p:g,3dlu,p", "f:p");
   PanelBuilder builder = new PanelBuilder(layout);
   CellConstraints cc = new CellConstraints();
   builder.addLabel("Filtrar: ", cc.xy(1, 1));
   builder.add(inputField, cc.xy(3, 1));
   builder.add(loadBtn, cc.xy(5, 1));
   // builder.setDefaultDialogBorder();
   return builder.getPanel();
 }
Example #12
0
  /** Builds the content pane. */
  @Override
  public void build() {
    initComponents();
    initComponentAnnotations();
    initEventHandling();

    trackPanel = buildTrackPanel();

    FormLayout layout =
        new FormLayout(
            "fill:pref:grow", "max(14dlu;pref), p, p, p, 12px, p, 7px, p, 12px, p, 7px, p");

    setLayout(layout);
    PanelBuilder builder = new PanelBuilder(layout, this);
    builder.setDefaultDialogBorder();
    CellConstraints cc = new CellConstraints();

    builder.add(buildHintAreaPane(), cc.xy(1, 1));
    builder.addSeparator(Resources.getString("label.track"), cc.xy(1, 3));
    builder.add(trackPanel, cc.xy(1, 4));
    builder.addSeparator(Resources.getString("label.taginfo"), cc.xy(1, 6));
    builder.add(buildMusicPanel(), cc.xy(1, 8));
    JComponent audit = buildAuditInfoPanel();
    if (this.getSettings().isAuditInfo()) {
      builder.addSeparator(Resources.getString("label.auditinfo"), cc.xy(1, 10));
      builder.add(audit, cc.xy(1, 12));
    }
  }
  @Override
  public JComponent getContent() {

    if (this.obj == null) {

      throw new IllegalStateException("No object set.");
    }

    // TODO: Make this nicer later.
    if (this.obj instanceof Chapter) {

      Chapter c = (Chapter) this.obj;

      JComponent t = UIUtils.getChapterInfoPreview(c, null, this.viewer);

      if (t == null) {

        // May be a fake chapter, return null.
        return null;
      }

      t.setSize(new Dimension(300, Short.MAX_VALUE));

      return t;

    } else {

      String firstLine = "<b><i>No description.</i></b>";

      String t = (obj.getDescription() != null ? obj.getDescription().getText() : null);

      if ((t != null) && (t.length() > 0)) {

        firstLine = new Paragraph(t, 0).getFirstSentence().getText();
      }

      JEditorPane desc = UIUtils.createHelpTextPane(firstLine, null);

      FormLayout fl = new FormLayout("380px", "p");

      PanelBuilder pb = new PanelBuilder(fl);

      CellConstraints cc = new CellConstraints();

      pb.add(desc, cc.xy(1, 1));

      desc.setAlignmentX(Component.LEFT_ALIGNMENT);

      JPanel p = pb.getPanel();
      p.setOpaque(true);
      p.setBackground(UIUtils.getComponentColor());

      return p;
    }
  }
Example #14
0
  /** Constructs a JPanel containing a label and a JTextField */
  private JPanel makePanelFrom(final String label, final JTextField textField) {
    final FormLayout fl = new FormLayout("pref, 3dlu, pref", "pref");

    final PanelBuilder builder = new PanelBuilder(fl);
    final CellConstraints cc = new CellConstraints();

    builder.addLabel(label, cc.xy(1, 1));
    builder.add(textField, cc.xy(3, 1));

    return builder.getPanel();
  }
Example #15
0
  public JPanel buildPanel(WindowInterface window) {
    initComponents(window);
    FormLayout layout = new FormLayout("p", "240dlu,3dlu,p");
    PanelBuilder builder = new PanelBuilder(layout);
    CellConstraints cc = new CellConstraints();

    builder.add(new JScrollPane(tableCommission), cc.xy(1, 1));
    builder.add(ButtonBarFactory.buildCenteredBar(buttonExcel), cc.xy(1, 3));

    JPanel panel = builder.getPanel();
    panel.addComponentListener(viewHandler.getClaimComponentListener(window));
    return panel;
  }
  private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    createUIComponents();

    panel1 = new JPanel();
    hSeparator = new JSeparator();

    // ======== this ========
    setName("this");
    setLayout(new BorderLayout());

    // ======== panel1 ========
    {
      panel1.setBorder(new EmptyBorder(5, 5, 5, 5));
      panel1.setName("panel1");

      // ---- name ----
      name.setName("name");

      // ---- quantity ----
      quantity.setHorizontalAlignment(SwingConstants.CENTER);
      quantity.setName("quantity");

      // ---- subTotal ----
      subTotal.setHorizontalAlignment(SwingConstants.CENTER);
      subTotal.setName("subTotal");

      PanelBuilder panel1Builder =
          new PanelBuilder(
              new FormLayout(
                  "[200dlu,default]:grow, $lcgap, [20dlu,default,40dlu]:grow, $lcgap, [25dlu,default,75dlu]:grow",
                  "fill:[30dlu,default]:grow"),
              panel1);

      panel1Builder.add(name, CC.xy(1, 1));
      panel1Builder.add(quantity, CC.xy(3, 1));
      panel1Builder.add(subTotal, CC.xy(5, 1));
    }
    add(panel1, BorderLayout.CENTER);

    // ---- hSeparator ----
    hSeparator.setAutoscrolls(true);
    hSeparator.setPreferredSize(new Dimension(0, 1));
    hSeparator.setMaximumSize(new Dimension(32767, 1));
    hSeparator.setName("hSeparator");
    add(hSeparator, BorderLayout.SOUTH);
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
  }
Example #17
0
  private void buildPanel() {
    FormLayout layout = new FormLayout("fill:0:grow", "p, 3dlu, p");
    PanelBuilder builder = new PanelBuilder(layout);
    CellConstraints cc = new CellConstraints();
    builder.setDefaultDialogBorder();

    // Add Html to JLabel
    builder.add(new JLabel(d_d80Report), cc.xy(1, 1));

    // Buttons Panel
    JPanel buttonsPanel = new JPanel();

    // Export button
    JButton exportButton = new JButton("Export table as html");
    exportButton.addActionListener(
        new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent e) {
            saveAsHtmlDialog((Component) getParent());
          }
        });
    buttonsPanel.add(exportButton);

    // Copy to clipboard button
    JButton clipboardButton = new JButton("Copy table to clipboard");
    clipboardButton.addActionListener(
        new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent e) {
            D80Transferable data = null;
            try {
              data = new D80Transferable(d_d80Report);
            } catch (ClassNotFoundException e1) {
            }
            Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
            clipboard.setContents(data, data);
          }
        });
    buttonsPanel.add(clipboardButton);
    builder.add(buttonsPanel, cc.xy(1, 3));

    // put everything into a scrollpane and add it to the dialog
    JScrollPane scrollPane = new JScrollPane(builder.getPanel());
    scrollPane.setViewportBorder(BorderFactory.createEmptyBorder());
    scrollPane.getVerticalScrollBar().setUnitIncrement(6);
    add(scrollPane);
  }
Example #18
0
  private JPanel buildFormattedPanel() {
    FormLayout layout = new FormLayout("right:max(50dlu;pref), 3dlu, 50dlu", "p, 3dlu, p, 3dlu, p");

    PanelBuilder builder = new PanelBuilder(layout);
    builder.setDefaultDialogBorder();
    CellConstraints cc = new CellConstraints();
    builder.addLabel("Date", cc.xy(1, 1));
    builder.add(dateField, cc.xy(3, 1));
    builder.addLabel("Integer", cc.xy(1, 3));
    builder.add(integerField, cc.xy(3, 3));
    builder.addLabel("Long", cc.xy(1, 5));
    builder.add(longField, cc.xy(3, 5));
    return builder.getPanel();
  }
  @Override
  public JComponent config() {
    FormLayout layout =
        new FormLayout("left:pref, 3dlu, p, 3dlu, 0:grow", "p, 3dlu, p, 3dlu, 0:grow");
    PanelBuilder builder = new PanelBuilder(layout);
    builder.setBorder(Borders.EMPTY_BORDER);
    builder.setOpaque(false);

    CellConstraints cc = new CellConstraints();

    JComponent cmp = builder.addSeparator(Messages.getString("NetworkTab.5"), cc.xyw(1, 1, 5));
    cmp = (JComponent) cmp.getComponent(0);
    cmp.setFont(cmp.getFont().deriveFont(Font.BOLD));

    builder.addLabel(Messages.getString("FFMpegDVRMSRemux.0"), cc.xy(1, 3));
    altffpath = new JTextField(PMS.getConfiguration().getFfmpegAlternativePath());
    altffpath.addKeyListener(
        new KeyListener() {
          @Override
          public void keyPressed(KeyEvent e) {}

          @Override
          public void keyTyped(KeyEvent e) {}

          @Override
          public void keyReleased(KeyEvent e) {
            PMS.getConfiguration().setFfmpegAlternativePath(altffpath.getText());
          }
        });
    builder.add(altffpath, cc.xyw(3, 3, 3));

    return builder.getPanel();
  }
  public JComponent buildEmpty() {
    String colSpec = FormLayoutUtil.getColSpec(EMPTY_COL_SPEC, orientation);
    FormLayout layout = new FormLayout(colSpec, EMPTY_ROW_SPEC);
    PanelBuilder builder = new PanelBuilder(layout);
    builder.setBorder(Borders.EMPTY_BORDER);
    builder.setOpaque(false);

    CellConstraints cc = new CellConstraints();

    builder.addSeparator(
        Messages.getString("TrTab2.1"), FormLayoutUtil.flip(cc.xyw(1, 1, 3), colSpec, orientation));

    JPanel panel = builder.getPanel();

    // Apply the orientation to the panel and all components in it
    panel.applyComponentOrientation(orientation);

    return panel;
  }
Example #21
0
  /**
   * Builds the Track editor panel.
   *
   * <p>
   *
   * @return the panel to edit track info. AZ - FormLayout corrections
   */
  private JComponent buildTrackPanel() {
    FormLayout layout =
        new FormLayout(
            "right:max(14dlu;pref), 4dlu, left:20dlu, left:140dlu, 4dlu, left:25px, right:pref:grow",
            "4px, p, 4px, p, 4px, p, " + this.getSettings().getCoverSizeSmall() + "px");
    PanelBuilder builder = new PanelBuilder(layout);
    CellConstraints cc = new CellConstraints();

    builder.addLabel(Resources.getString("label.tracknumber") + ": ", cc.xy(1, 2));
    builder.add(trackNumber, cc.xy(3, 2));
    builder.add(albumImage, cc.xywh(7, 2, 1, 6, "right, top"));
    builder.addLabel(Resources.getString("label.title") + ": ", cc.xy(1, 4));
    builder.add(titleField, cc.xyw(3, 4, 2));
    builder.add(ComponentFactory.createTitleCaseButton(titleField), cc.xy(6, 4));
    builder.addLabel(Resources.getString("label.comment") + ": ", cc.xy(1, 6, "right, top"));
    builder.add(comment, cc.xyw(3, 6, 2));
    return new IconFeedbackPanel(
        getValidationModel().getValidationResultModel(), builder.getPanel());
  }
Example #22
0
  private JPanel buildListPanel() {
    FormLayout layout =
        new FormLayout(
            "right:max(50dlu;pref), 3dlu, 150dlu", "fill:60dlu, 6dlu, fill:60dlu, 6dlu, p");

    PanelBuilder builder = new PanelBuilder(layout);
    builder.setDefaultDialogBorder();
    CellConstraints cc = new CellConstraints();
    builder.addLabel("JList", cc.xy(1, 1, "right, top"));
    builder.add(new JScrollPane(list), cc.xy(3, 1));
    builder.addLabel("JTable", cc.xy(1, 3, "right, top"));
    builder.add(new JScrollPane(table), cc.xy(3, 3));
    builder.addLabel("JComboBox", cc.xy(1, 5));
    builder.add(comboBox, cc.xy(3, 5));
    return builder.getPanel();
  }
Example #23
0
  /**
   * Creates the list of interaction partners displayed in the top part of the {@link RegIntTab}
   *
   * @param parent The {@link JScrollPane} containing either the regulators or the targets of the
   *     selected element
   * @param map The map of interaction partners, either regulators or targets, also found in results
   * @param results The entire {@link ResultsObj}. Must have map as either its regulator or target
   *     map
   * @param builder The {@link PanelBuilder} that will include this pathway
   * @return the list of interaction partners (in pathway form for expression visualization)
   */
  private VPathwaySwing createPathway(
      JScrollPane parent, Map<Xref, Interaction> map, ResultsObj results, PanelBuilder builder) {
    VPathwaySwing vPathwaySwing = new VPathwaySwing(parent);
    VPathway vPathway = vPathwaySwing.createVPathway();
    vPathway.setEditMode(false);
    Pathway sourcePw = new Pathway();
    Map<Xref, Interaction> sorted = sortXrefs(map);
    x = 0;
    for (Xref xref : sorted.keySet()) {
      PathwayElement pwe = createPathwayELement(xref);
      sourcePw.add(pwe);

      JLabel linkout = new JLabel(icon);
      JPanel linkoutPane = new JPanel();
      linkout.addMouseListener(new InfoButtonListener(xref, results, plugin));
      linkoutPane.add(linkout);
      linkoutPane.setCursor(new Cursor(Cursor.HAND_CURSOR));
      linkoutPane.setVisible(true);

      List<File> uniqueFiles = new ArrayList<File>();
      for (File intFile : sorted.get(xref).getFiles()) {
        if (!uniqueFiles.contains(intFile)
            && RegIntPreferences.getPreferences().getSelectedIntFiles().contains(intFile)) {
          uniqueFiles.add(intFile);
        }
      }
      builder.addLabel(
          uniqueFiles.size()
              + "/"
              + RegIntPreferences.getPreferences().getSelectedIntFiles().size(),
          cc.xy(6, y));

      builder.add(linkoutPane, cc.xy(4, y));
      y = y + 2;
      x++;
    }
    vPathway.fromModel(sourcePw);
    vPathway.setSelectionEnabled(false);
    vPathway.addVPathwayListener(plugin.getDesktop().getVisualizationManager());
    return vPathwaySwing;
  }
Example #24
0
  @Override
  public JComponent config() {
    FormLayout layout =
        new FormLayout("left:pref, 0:grow", "p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, 0:grow");
    PanelBuilder builder = new PanelBuilder(layout);
    builder.setBorder(Borders.EMPTY_BORDER);
    builder.setOpaque(false);

    CellConstraints cc = new CellConstraints();

    JComponent cmp = builder.addSeparator("Audio settings", cc.xyw(2, 1, 1));
    cmp = (JComponent) cmp.getComponent(0);
    cmp.setFont(cmp.getFont().deriveFont(Font.BOLD));

    noresample = new JCheckBox(Messages.getString("TrTab2.22"));
    noresample.setContentAreaFilled(false);
    noresample.setSelected(configuration.isAudioResample());
    noresample.addItemListener(
        new ItemListener() {
          public void itemStateChanged(ItemEvent e) {
            configuration.setAudioResample(e.getStateChange() == ItemEvent.SELECTED);
          }
        });
    builder.add(noresample, cc.xy(2, 3));

    return builder.getPanel();
  }
 private JComponent buildForma() {
   FormLayout layout = new FormLayout("50dlu,4dlu,50dlu,40dlu", "pref,20dlu,pref");
   PanelBuilder builder = new PanelBuilder(layout);
   CellConstraints cc = new CellConstraints();
   builder.add(new JLabel("Año"), cc.xyw(1, 2, 2));
   builder.add(año, cc.xyw(3, 2, 2));
   builder.add(new JLabel("Mes"), cc.xyw(1, 3, 2));
   builder.add(mes, cc.xyw(3, 3, 2));
   return builder.getPanel();
 }
Example #26
0
 protected JComponent createMainPanel() {
   final FormLayout layout = new FormLayout("max(p;380dlu)", "p,3dlu,220dlu,3dlu,50dlu");
   CellConstraints cc = new CellConstraints();
   PanelBuilder builder = new PanelBuilder(layout);
   builder.add(createMasterPanel(), cc.xy(1, 1));
   builder.add(createDetailsPanel(), cc.xy(1, 3));
   builder.add(createValidationView(), cc.xy(1, 5));
   // model.updateValidation();
   updateComponentTreeMandatoryAndSeverity(
       model.getValidationModel().getResult(), builder.getPanel());
   return builder.getPanel();
 }
Example #27
0
  private Component buildMainPanel() {
    FormLayout layout = new FormLayout("center:pref", "p, 10dlu, p");
    PanelBuilder builder = new PanelBuilder(layout);
    builder.setDefaultDialogBorder();
    builder.setOpaque(false);

    CellConstraints cc = new CellConstraints();

    builder.add(buildSettingsPanel(), cc.xy(1, 1));
    builder.add(buildButtonsPanel(), cc.xy(1, 3));

    return builder.getPanel();
  }
Example #28
0
 /*
  * (non-Javadoc)
  *
  * @see eu.europa.ec.markt.dss.applet.view.DSSAppletView#doLayout()
  */
 @Override
 protected Container doLayout() {
   final FormLayout layout =
       new FormLayout(
           "5dlu, pref, 5dlu, pref, 5dlu ,pref:grow ,5dlu",
           "5dlu, pref, 5dlu, pref, 5dlu, pref, 5dlu, pref, 5dlu");
   final PanelBuilder builder = ComponentFactory.createBuilder(layout);
   final CellConstraints cc = new CellConstraints();
   builder.addSeparator(I18N_LIBRARY_PATH, cc.xyw(2, 2, 5));
   builder.add(selectFileSource, cc.xy(2, 4));
   builder.add(fileSourceLabel, cc.xyw(4, 4, 3));
   builder.addSeparator(I18N_PASSWORD, cc.xyw(2, 6, 5));
   builder.add(passwordField, cc.xyw(2, 8, 3));
   return ComponentFactory.createPanel(builder);
 }
  public void buildView() {
    super.buildView();

    this.setHeaderInfo(getModel().getHeaderInfo());

    FormLayout layout =
        new FormLayout("20dlu, pref, pref, 1dlu:grow", "pref, 2dlu, pref, 2dlu, pref");
    CellConstraints cc = new CellConstraints();
    PanelBuilder builder = new PanelBuilder(layout);
    builder.addSeparator("Benutzeroberflaeche", cc.xyw(1, 1, 4));
    builder.add(cPathActive, cc.xyw(1, 3, 4));
    builder.addLabel("Position: ", cc.xy(2, 5));
    builder.add(cbPathPosition, cc.xy(3, 5));

    this.addToContentPanel(builder.getPanel());
  }
Example #30
0
  /*
   * (non-Javadoc)
   *
   * @see eu.europa.ec.markt.dss.applet.view.DSSAppletView#doInit()
   */
  @Override
  protected Container doLayout() {

    final JPanel formatPanel = doFormatLayout();
    final JPanel packagingPanel = doPackagingLayout();
    final JPanel levelPanel = doLevelLayout();

    final FormLayout layout =
        new FormLayout(
            "5dlu,pref:grow ,5dlu",
            "5dlu, pref, 5dlu, pref, 5dlu, pref, 5dlu,pref, 5dlu,pref, 5dlu, pref, 5dlu");
    final PanelBuilder builder = ComponentFactory.createBuilder(layout);
    final CellConstraints cc = new CellConstraints();
    builder.addSeparator(ResourceUtils.getI18n("SIGNATURE_FORMAT"), cc.xyw(2, 2, 1));
    builder.add(formatPanel, cc.xyw(2, 4, 1));
    builder.addSeparator(ResourceUtils.getI18n("PACKAGING"), cc.xyw(2, 6, 1));
    builder.add(packagingPanel, cc.xyw(2, 8, 1));
    builder.addSeparator(ResourceUtils.getI18n("LEVEL"), cc.xyw(2, 10, 1));
    builder.add(levelPanel, cc.xy(2, 12));
    return ComponentFactory.createPanel(builder);
  }