package integration.gui.mock.component;

import javax.swing.*;
import javax.swing.border.TitledBorder;
import mdlaf.MaterialLookAndFeel;
import mdlaf.themes.MaterialLiteTheme;

public class TitledBorderMaterialStyle extends javax.swing.JFrame {

  static {
    try {
      MaterialLookAndFeel materialLookAndFeel = new MaterialLookAndFeel(new MaterialLiteTheme());
      UIManager.setLookAndFeel(materialLookAndFeel);
      // UIManager.setLookAndFeel(new MetalLookAndFeel());
    } catch (Exception ex) {
      java.util.logging.Logger.getLogger(TitledBorderMaterialStyle.class.getName())
          .log(java.util.logging.Level.SEVERE, null, ex);
    }
  }

  public TitledBorderMaterialStyle() {
    initComponents();
  }

  private void initComponents() {

    jComboBox3 = new javax.swing.JComboBox<>();
    jLabel1 = new javax.swing.JLabel();
    jScrollPane1 = new javax.swing.JScrollPane();
    jTree1 = new javax.swing.JTree();
    jScrollPane2 = new javax.swing.JScrollPane();
    jList1 = new javax.swing.JList<>();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle("Antenna");

    jComboBox3.setModel(
        new javax.swing.DefaultComboBoxModel<>(
            new String[] {"Item 1", "Item 2", "Item 3", "Item 4"}));

    jLabel1.setText("jLabel1");

    jScrollPane1.setViewportView(jTree1);

    //        jList1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "my titled
    // border", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.ABOVE_TOP, new
    // java.awt.Font("Tahoma", 0, 11), new java.awt.Color(255, 0, 0))); // NOI18N
    // jScrollPane2.setBorder(javax.swing.BorderFactory.createTitledBorder(MaterialBorders.DEFAULT_SHADOW_BORDER, "Material Style", javax.swing.border.TitledBorder.LEFT, TitledBorder.BELOW_TOP, new java.awt.Font("NotoSans", Font.BOLD, 10))); // NOI18N
    jScrollPane2.setBorder(
        BorderFactory.createTitledBorder(
            null, "MaterialStyle", TitledBorder.LEFT, TitledBorder.BELOW_TOP)); // NOI18N
    jList1.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
    jList1.setModel(
        new javax.swing.AbstractListModel<String>() {
          String[] strings = {"Item 1", "Item 2", "Item 3", "Item 4", "Item 5"};

          public int getSize() {
            return strings.length;
          }

          public String getElementAt(int i) {
            return strings[i];
          }
        });
    jScrollPane2.setViewportView(jList1);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(
                                jScrollPane2,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                145,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel1)
                                            .addComponent(
                                                jComboBox3,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                120,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGap(18, 18, 18)
                                    .addComponent(
                                        jScrollPane1,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        314,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap(32, Short.MAX_VALUE)));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addContainerGap()
                                    .addComponent(jLabel1)
                                    .addGap(29, 29, 29)
                                    .addComponent(
                                        jComboBox3,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(
                                jScrollPane1,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                120,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(
                        javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        Short.MAX_VALUE)
                    .addComponent(
                        jScrollPane2,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(55, 55, 55)));

    pack();
  }

  public static void main(String args[]) {

    /* Create and display the form */
    java.awt.EventQueue.invokeLater(
        new Runnable() {
          public void run() {
            new TitledBorderMaterialStyle().setVisible(true);
          }
        });
  }

  // Variables declaration - do not modify//GEN-BEGIN:variables
  private javax.swing.JComboBox<String> jComboBox3;
  private javax.swing.JLabel jLabel1;
  private javax.swing.JList<String> jList1;
  private javax.swing.JScrollPane jScrollPane1;
  private javax.swing.JScrollPane jScrollPane2;
  private javax.swing.JTree jTree1;
  // End of variables declaration//GEN-END:variables

}
