Ejemplo n.º 1
0
  private JPanel createImageButtonsPanel() {
    replaceImageButton =
        new JButton(mainPanel.translate("button.replace"), View.getIcon("replaceimage16"));
    replaceImageButton.setMargin(new Insets(3, 3, 3, 10));
    replaceImageButton.addActionListener(mainPanel::replaceButtonActionPerformed);
    replaceImageButton.setVisible(false);

    replaceImageAlphaButton =
        new JButton(
            mainPanel.translate("button.replaceAlphaChannel"), View.getIcon("replacealpha16"));
    replaceImageAlphaButton.setMargin(new Insets(3, 3, 3, 10));
    replaceImageAlphaButton.addActionListener(mainPanel::replaceAlphaButtonActionPerformed);
    replaceImageAlphaButton.setVisible(false);

    prevFontsButton = new JButton(mainPanel.translate("button.prev"), View.getIcon("prev16"));
    prevFontsButton.setMargin(new Insets(3, 3, 3, 10));
    prevFontsButton.addActionListener(this::prevFontsButtonActionPerformed);
    prevFontsButton.setVisible(false);

    nextFontsButton = new JButton(mainPanel.translate("button.next"), View.getIcon("next16"));
    nextFontsButton.setMargin(new Insets(3, 3, 3, 10));
    nextFontsButton.addActionListener(this::nextFontsButtonActionPerformed);
    nextFontsButton.setVisible(false);

    ButtonsPanel imageButtonsPanel = new ButtonsPanel();
    imageButtonsPanel.add(replaceImageButton);
    imageButtonsPanel.add(replaceImageAlphaButton);
    imageButtonsPanel.add(prevFontsButton);
    imageButtonsPanel.add(nextFontsButton);
    return imageButtonsPanel;
  }
Ejemplo n.º 2
0
  private JPanel createBinaryButtonsPanel() {
    replaceBinaryButton =
        new JButton(mainPanel.translate("button.replace"), View.getIcon("edit16"));
    replaceBinaryButton.setMargin(new Insets(3, 3, 3, 10));
    replaceBinaryButton.addActionListener(mainPanel::replaceButtonActionPerformed);

    ButtonsPanel binaryButtonsPanel = new ButtonsPanel();
    binaryButtonsPanel.add(replaceBinaryButton);
    return binaryButtonsPanel;
  }
Ejemplo n.º 3
0
  private JPanel createMetadataButtonsPanel() {
    metadataEditButton = new JButton(mainPanel.translate("button.edit"), View.getIcon("edit16"));
    metadataEditButton.setMargin(new Insets(3, 3, 3, 10));
    metadataEditButton.addActionListener(this::editMetadataButtonActionPerformed);
    metadataSaveButton = new JButton(mainPanel.translate("button.save"), View.getIcon("save16"));
    metadataSaveButton.setMargin(new Insets(3, 3, 3, 10));
    metadataSaveButton.addActionListener(this::saveMetadataButtonActionPerformed);
    metadataSaveButton.setVisible(false);
    metadataCancelButton =
        new JButton(mainPanel.translate("button.cancel"), View.getIcon("cancel16"));
    metadataCancelButton.setMargin(new Insets(3, 3, 3, 10));
    metadataCancelButton.addActionListener(this::cancelMetadataButtonActionPerformed);
    metadataCancelButton.setVisible(false);

    ButtonsPanel metadataTagButtonsPanel = new ButtonsPanel();
    metadataTagButtonsPanel.add(metadataEditButton);
    metadataTagButtonsPanel.add(metadataSaveButton);
    metadataTagButtonsPanel.add(metadataCancelButton);
    return metadataTagButtonsPanel;
  }
Ejemplo n.º 4
0
  private JPanel createGenericTagButtonsPanel() {
    genericEditButton = new JButton(mainPanel.translate("button.edit"), View.getIcon("edit16"));
    genericEditButton.setMargin(new Insets(3, 3, 3, 10));
    genericEditButton.addActionListener(this::editGenericTagButtonActionPerformed);
    genericSaveButton = new JButton(mainPanel.translate("button.save"), View.getIcon("save16"));
    genericSaveButton.setMargin(new Insets(3, 3, 3, 10));
    genericSaveButton.addActionListener(this::saveGenericTagButtonActionPerformed);
    genericSaveButton.setVisible(false);
    genericCancelButton =
        new JButton(mainPanel.translate("button.cancel"), View.getIcon("cancel16"));
    genericCancelButton.setMargin(new Insets(3, 3, 3, 10));
    genericCancelButton.addActionListener(this::cancelGenericTagButtonActionPerformed);
    genericCancelButton.setVisible(false);

    ButtonsPanel genericTagButtonsPanel = new ButtonsPanel();
    genericTagButtonsPanel.add(genericEditButton);
    genericTagButtonsPanel.add(genericSaveButton);
    genericTagButtonsPanel.add(genericCancelButton);
    return genericTagButtonsPanel;
  }
Ejemplo n.º 5
0
  private JPanel createFlashPlayerPanel(FlashPlayerPanel flashPanel) {
    JPanel pan = new JPanel(new BorderLayout());
    JLabel prevLabel = new HeaderLabel(mainPanel.translate("swfpreview"));
    prevLabel.setHorizontalAlignment(SwingConstants.CENTER);
    // prevLabel.setBorder(new BevelBorder(BevelBorder.RAISED));

    pan.add(prevLabel, BorderLayout.NORTH);

    Component leftComponent;
    if (flashPanel != null) {
      JPanel flashPlayPanel = new JPanel(new BorderLayout());
      flashPlayPanel.add(flashPanel, BorderLayout.CENTER);

      /*JPanel bottomPanel = new JPanel(new BorderLayout());
      JPanel buttonsPanel = new JPanel(new FlowLayout());
      JButton selectColorButton = new JButton(View.getIcon("color16"));
      selectColorButton.addActionListener(mainPanel::selectBkColor);
      selectColorButton.setToolTipText(AppStrings.translate("button.selectbkcolor.hint"));
      buttonsPanel.add(selectColorButton);
      bottomPanel.add(buttonsPanel, BorderLayout.EAST);

      flashPlayPanel.add(bottomPanel, BorderLayout.SOUTH);*/
      JPanel flashPlayPanel2 = new JPanel(new BorderLayout());
      flashPlayPanel2.add(flashPlayPanel, BorderLayout.CENTER);
      flashPlayPanel2.add(new PlayerControls(mainPanel, flashPanel), BorderLayout.SOUTH);
      leftComponent = flashPlayPanel2;
    } else {
      JPanel swtPanel = new JPanel(new BorderLayout());
      swtPanel.add(
          new JLabel(
              "<html><center>" + mainPanel.translate("notavailonthisplatform") + "</center></html>",
              JLabel.CENTER),
          BorderLayout.CENTER);
      swtPanel.setBackground(View.getDefaultBackgroundColor());
      leftComponent = swtPanel;
    }

    pan.add(leftComponent, BorderLayout.CENTER);
    return pan;
  }
Ejemplo n.º 6
0
  private void createParametersPanel() {
    displayWithPreview = new JPanel(new CardLayout());

    textPanel = new TextPanel(mainPanel);
    displayWithPreview.add(textPanel, CARDTEXTPANEL);

    fontPanel = new FontPanel(mainPanel);
    displayWithPreview.add(fontPanel, CARDFONTPANEL);

    JLabel paramsLabel = new HeaderLabel(mainPanel.translate("parameters"));
    paramsLabel.setHorizontalAlignment(SwingConstants.CENTER);
    // paramsLabel.setBorder(new BevelBorder(BevelBorder.RAISED));

    parametersPanel = new JPanel(new BorderLayout());
    parametersPanel.add(paramsLabel, BorderLayout.NORTH);
    parametersPanel.add(displayWithPreview, BorderLayout.CENTER);
    setRightComponent(parametersPanel);
  }
Ejemplo n.º 7
0
  private JPanel createImagesCard() {
    JPanel shapesCard = new JPanel(new BorderLayout());
    JPanel previewPanel = new JPanel(new BorderLayout());

    JPanel previewCnt = new JPanel(new BorderLayout());
    imagePanel = new ImagePanel();
    imagePanel.setLoop(Configuration.loopMedia.get());
    previewCnt.add(imagePanel, BorderLayout.CENTER);
    previewCnt.add(
        imagePlayControls = new PlayerControls(mainPanel, imagePanel), BorderLayout.SOUTH);
    imagePlayControls.setMedia(imagePanel);
    previewPanel.add(previewCnt, BorderLayout.CENTER);
    JLabel prevIntLabel = new HeaderLabel(mainPanel.translate("swfpreview.internal"));
    prevIntLabel.setHorizontalAlignment(SwingConstants.CENTER);
    // prevIntLabel.setBorder(new BevelBorder(BevelBorder.RAISED));
    previewPanel.add(prevIntLabel, BorderLayout.NORTH);

    shapesCard.add(previewPanel, BorderLayout.CENTER);

    shapesCard.add(createImageButtonsPanel(), BorderLayout.SOUTH);
    return shapesCard;
  }
Ejemplo n.º 8
0
 private String translate(String key) {
   return mainPanel.translate(key);
 }