/** Initialize the contents of the frame. */
  private void initialize() {
    // Ventana principal
    frmVisualizadord = new JFrame();
    frmVisualizadord.setIconImage(
        Toolkit.getDefaultToolkit().getImage(Visualizador3D.class.getResource("/icon/icon.png")));
    frmVisualizadord.setTitle("Visualizador 3D");
    frmVisualizadord.setBounds(50, 20, 1200, 700);
    frmVisualizadord.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    GridBagLayout gridBagLayout = new GridBagLayout();
    gridBagLayout.columnWidths = new int[] {0, 200, 0};
    gridBagLayout.rowHeights = new int[] {261, 0};
    gridBagLayout.columnWeights = new double[] {1.0, 0.0, Double.MIN_VALUE};
    gridBagLayout.rowWeights = new double[] {1.0, Double.MIN_VALUE};
    frmVisualizadord.getContentPane().setLayout(gridBagLayout);

    // Panel Imagen
    panelImagen = new Imagen3D();

    GridBagConstraints gbc_panelImagen = new GridBagConstraints();
    gbc_panelImagen.fill = GridBagConstraints.BOTH;
    gbc_panelImagen.insets = new Insets(15, 15, 15, 5);
    gbc_panelImagen.gridx = 0;
    gbc_panelImagen.gridy = 0;
    frmVisualizadord.getContentPane().add(panelImagen, gbc_panelImagen);

    // Cargar Handler
    MouseHandler mouseHandler = new MouseHandler(this, panelImagen);

    // Panel Opciones
    panelOpciones = new JPanel();

    GridBagConstraints gbc_panelOpciones = new GridBagConstraints();
    gbc_panelOpciones.insets = new Insets(15, 10, 15, 15);
    gbc_panelOpciones.fill = GridBagConstraints.BOTH;
    gbc_panelOpciones.gridx = 1;
    gbc_panelOpciones.gridy = 0;
    frmVisualizadord.getContentPane().add(panelOpciones, gbc_panelOpciones);

    GridBagLayout gbl_panelOpciones = new GridBagLayout();
    gbl_panelOpciones.columnWidths = new int[] {48, 0};
    gbl_panelOpciones.rowHeights = new int[] {36, 0, 0, 0, 0, 0, 0};
    gbl_panelOpciones.columnWeights = new double[] {1.0, Double.MIN_VALUE};
    gbl_panelOpciones.rowWeights = new double[] {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
    panelOpciones.setLayout(gbl_panelOpciones);

    initMenu();

    initPanelObjeto();

    initPanelLuzAmbiente();

    initPanelAmbienteColor();

    initPanelVisualizacion();

    initPanelTransformacion();

    initPanelPosicion();
  }
Example #2
0
  protected void createGraghTab() {
    JPanel plotPanel = new JPanel();
    add(plotPanel, "<html><div style='text-align: center;'>C<br>h<br>a<br>r<br>t</div></html>");

    GridBagLayout gbl_plotPanel = new GridBagLayout();
    gbl_plotPanel.columnWidths = new int[] {0};
    gbl_plotPanel.rowHeights = new int[] {0, 0};
    gbl_plotPanel.columnWeights = new double[] {1.0};
    gbl_plotPanel.rowWeights = new double[] {0.0, 1.0};
    plotPanel.setLayout(gbl_plotPanel);

    JPanel cntlPanel = new JPanel();
    GridBagConstraints gbl_ctrlPanel = new GridBagConstraints();
    gbl_ctrlPanel.insets = new Insets(3, 3, 3, 3);
    gbl_ctrlPanel.anchor = GridBagConstraints.NORTH;
    gbl_ctrlPanel.weightx = 1.0;
    gbl_ctrlPanel.fill = GridBagConstraints.HORIZONTAL;
    gbl_ctrlPanel.gridx = 0;
    gbl_ctrlPanel.gridy = 0;
    plotPanel.add(cntlPanel, gbl_ctrlPanel);

    GridBagLayout gbl_cntlPanel = new GridBagLayout();
    gbl_cntlPanel.columnWidths = new int[] {0, 0};
    gbl_cntlPanel.rowHeights = new int[] {0, 0};
    gbl_cntlPanel.columnWeights = new double[] {0.0, 1.0};
    gbl_cntlPanel.rowWeights = new double[] {0};
    cntlPanel.setLayout(gbl_cntlPanel);

    createChart(plotPanel, xAxisName, yAxisName);
  }
  public ActionPanel(String text, int nb, MouseListener ml) {
    this.setNb(nb);
    this.text = text;
    this.addMouseListener(ml);
    this.font = new Font("sans-serif", Font.PLAIN, 12);
    this.selected = false;
    this.setBackground(new Color(122, 197, 255));
    this.setPreferredSize(new Dimension(200, 20));
    this.setBorder(BorderFactory.createRaisedBevelBorder());
    this.setPreferredSize(new Dimension(200, 20));
    createImages();
    this.setRequestFocusEnabled(true);

    GridBagLayout gridBagLayout = new GridBagLayout();
    gridBagLayout.columnWidths = new int[] {0, 0, 0, 40, 0};
    gridBagLayout.rowHeights = new int[] {0, 0};
    gridBagLayout.columnWeights = new double[] {0.0, 1.0, 0.0, 0.0, Double.MIN_VALUE};
    gridBagLayout.rowWeights = new double[] {0.0, Double.MIN_VALUE};
    setLayout(gridBagLayout);

    JLabel lblNewLabel = new JLabel("(" + String.valueOf(nb) + ")");
    lblNewLabel.setForeground(Color.GRAY);
    lblNewLabel.setFont(new Font("Lucida Grande", Font.ITALIC, 12));
    GridBagConstraints gbc_lblNewLabel = new GridBagConstraints();
    gbc_lblNewLabel.gridx = 3;
    gbc_lblNewLabel.gridy = 0;
    add(lblNewLabel, gbc_lblNewLabel);
  }
Example #4
0
  /** Create the dialog. */
  public requestDpixdist() {
    setTitle("Input Lines Height");
    setResizable(false);
    setBounds(100, 100, 333, 169);
    contentPanel = new JPanel();
    contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
    setContentPane(contentPanel);
    GridBagLayout gbl_contentPane = new GridBagLayout();
    gbl_contentPane.columnWidths = new int[] {0, 0, 0, 0};
    gbl_contentPane.rowHeights = new int[] {0, 0, 0, 0, 0, 0, 0};
    gbl_contentPane.columnWeights = new double[] {0.0, 0.0, 1.0, Double.MIN_VALUE};
    gbl_contentPane.rowWeights = new double[] {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
    contentPanel.setLayout(gbl_contentPane);

    JLabel lblHeightOfLines = new JLabel("Height of black lines (mm):");
    GridBagConstraints gbc_lblHeightOfLines = new GridBagConstraints();
    gbc_lblHeightOfLines.anchor = GridBagConstraints.EAST;
    gbc_lblHeightOfLines.insets = new Insets(0, 0, 5, 5);
    gbc_lblHeightOfLines.gridx = 1;
    gbc_lblHeightOfLines.gridy = 1;
    contentPanel.add(lblHeightOfLines, gbc_lblHeightOfLines);

    heightText = new JTextField();
    heightText.setMaximumSize(new Dimension(4, 20));
    GridBagConstraints gbc_heightText = new GridBagConstraints();
    gbc_heightText.fill = GridBagConstraints.HORIZONTAL;
    gbc_heightText.insets = new Insets(0, 0, 5, 0);
    gbc_heightText.gridx = 2;
    gbc_heightText.gridy = 1;
    contentPanel.add(heightText, gbc_heightText);
    heightText.setColumns(10);
  }
Example #5
0
  public ManageBankView() {
    GridBagLayout gridBagLayout = new GridBagLayout();
    gridBagLayout.columnWidths = new int[] {0, 0, 0, 0, 0};
    gridBagLayout.rowHeights = new int[] {0, 0, 0, 0, 0};
    gridBagLayout.columnWeights = new double[] {0.0, 0.0, 0.0, 1.0, Double.MIN_VALUE};
    gridBagLayout.rowWeights = new double[] {0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
    getContentPane().setLayout(gridBagLayout);

    JLabel lblEnterBank = new JLabel("Enter Bank");
    GridBagConstraints gbc_lblEnterBank = new GridBagConstraints();
    gbc_lblEnterBank.insets = new Insets(0, 0, 5, 5);
    gbc_lblEnterBank.gridx = 1;
    gbc_lblEnterBank.gridy = 1;
    getContentPane().add(lblEnterBank, gbc_lblEnterBank);

    txtBankName = new JTextField();
    GridBagConstraints gbc_txtBankName = new GridBagConstraints();
    gbc_txtBankName.insets = new Insets(0, 0, 5, 0);
    gbc_txtBankName.fill = GridBagConstraints.HORIZONTAL;
    gbc_txtBankName.gridx = 3;
    gbc_txtBankName.gridy = 1;
    getContentPane().add(txtBankName, gbc_txtBankName);
    txtBankName.setColumns(10);

    JButton btnAdd = new JButton("Add");
    GridBagConstraints gbc_btnAdd = new GridBagConstraints();
    gbc_btnAdd.insets = new Insets(0, 0, 0, 5);
    gbc_btnAdd.gridx = 1;
    gbc_btnAdd.gridy = 3;
    getContentPane().add(btnAdd, gbc_btnAdd);
  }
  public PanelCharacterCombat(int maxWidth, CombatTrackerUnit character, Boolean isSelected) {
    combatUnit = character;

    setBorder(new EmptyBorder(4, 4, 4, 4));
    GridBagLayout gridBagLayout = new GridBagLayout();
    gridBagLayout.columnWidths = new int[] {56, 64, 0};
    gridBagLayout.rowHeights = new int[] {14, 0};
    gridBagLayout.columnWeights = new double[] {1.0, 0.0, Double.MIN_VALUE};
    gridBagLayout.rowWeights = new double[] {1.0, Double.MIN_VALUE};
    setLayout(gridBagLayout);
    JLabel lblName = new JLabel(getCharacter().getName(true));

    GridBagConstraints gbc_lblName = new GridBagConstraints();
    gbc_lblName.fill = GridBagConstraints.HORIZONTAL;
    gbc_lblName.insets = new Insets(0, 0, 0, 5);
    gbc_lblName.gridx = 0;
    gbc_lblName.gridy = 0;
    this.add(lblName, gbc_lblName);

    JLabel lblInit = new JLabel(getCharacter().getInitiative() + "");
    GridBagConstraints gbc_lblInit = new GridBagConstraints();
    gbc_lblInit.anchor = GridBagConstraints.EAST;
    gbc_lblInit.gridx = 1;
    gbc_lblInit.gridy = 0;
    add(lblInit, gbc_lblInit);

    if (isSelected) {
      this.setBackground(Color.GREEN);
    } else {
      this.setBackground(UIManager.getColor("Panel.background"));
    }

    this.setPreferredSize(new Dimension(maxWidth, 30));
  }
Example #7
0
  /** initialization of graphical components */
  public JMainWinView() {

    setDefaultCloseOperation(EXIT_ON_CLOSE);
    setBounds(200, 200, 800, 600);

    /** initialization jContentPanel */
    jContentPanel = new JPanel();
    jContentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
    GridBagLayout gbl_jContentPanel = new GridBagLayout();
    gbl_jContentPanel.columnWeights = new double[] {1.0, 0.0};
    gbl_jContentPanel.rowWeights = new double[] {0.0, 1.0};
    jContentPanel.setLayout(gbl_jContentPanel);
    setContentPane(jContentPanel);

    /** initialization jMainMenu */
    jMainMenu = new JMainMenuView();
    GridBagConstraints gbc_jMainMenu = new GridBagConstraints();
    gbc_jMainMenu.anchor = GridBagConstraints.NORTH;
    gbc_jMainMenu.insets = new Insets(0, 0, 0, 0);
    gbc_jMainMenu.fill = GridBagConstraints.HORIZONTAL;
    gbc_jMainMenu.gridx = 0;
    gbc_jMainMenu.gridy = 0;
    gbc_jMainMenu.gridwidth = 2;
    jContentPanel.add(jMainMenu, gbc_jMainMenu);

    /** initialization jPanelFiles */
    jPanelFiles = new JPanelFiles();
    GridBagConstraints gbc_jPanelFiles = new GridBagConstraints();
    gbc_jPanelFiles.anchor = GridBagConstraints.NORTH;
    gbc_jPanelFiles.insets = new Insets(0, 0, 0, 0);
    gbc_jPanelFiles.fill = GridBagConstraints.HORIZONTAL;
    gbc_jPanelFiles.gridx = 0;
    gbc_jPanelFiles.gridy = 1;
    jContentPanel.add(jPanelFiles, gbc_jPanelFiles);
  }
Example #8
0
  /** Initialize the contents of the frame. */
  private void initialize() {
    frame = new JFrame();
    frame.setBounds(100, 100, 450, 300);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    GridBagLayout gridBagLayout = new GridBagLayout();
    gridBagLayout.columnWidths = new int[] {30, 36, 353, 0};
    gridBagLayout.rowHeights = new int[] {30, 16, 0};
    gridBagLayout.columnWeights = new double[] {0.0, 0.0, 1.0, Double.MIN_VALUE};
    gridBagLayout.rowWeights = new double[] {0.0, 0.0, Double.MIN_VALUE};
    frame.getContentPane().setLayout(gridBagLayout);

    JLabel lblName = new JLabel("Name");
    GridBagConstraints gbc_lblName = new GridBagConstraints();
    gbc_lblName.insets = new Insets(0, 0, 0, 5);
    gbc_lblName.anchor = GridBagConstraints.EAST;
    gbc_lblName.gridx = 1;
    gbc_lblName.gridy = 1;
    frame.getContentPane().add(lblName, gbc_lblName);

    textField = new JTextField();
    GridBagConstraints gbc_textField = new GridBagConstraints();
    gbc_textField.anchor = GridBagConstraints.WEST;
    gbc_textField.gridx = 3;
    gbc_textField.gridy = 1;
    frame.getContentPane().add(textField, gbc_textField);
    textField.setColumns(10);
  }
    public void addRow(String label, JComponent component) {
      GridBagConstraints labelConstraints = new GridBagConstraints();
      labelConstraints.gridx = 0;
      labelConstraints.gridy = rowCount;
      labelConstraints.insets = new Insets(0, 0, 5, 5);
      labelConstraints.anchor = GridBagConstraints.LINE_END;

      GridBagConstraints componentConstraints = new GridBagConstraints();
      componentConstraints.gridx = 1;
      componentConstraints.gridy = rowCount;
      componentConstraints.gridwidth = GridBagConstraints.REMAINDER;
      componentConstraints.fill = GridBagConstraints.HORIZONTAL;
      componentConstraints.insets = new Insets(0, 0, 5, 0);
      componentConstraints.anchor = GridBagConstraints.LINE_START;

      JLabel l = new JLabel(label + ":");
      add(l, labelConstraints);
      add(component, componentConstraints);
      rowCount++;

      // Add another column/row that takes up all available space.
      // This moves the layout to the top-left corner.
      layout.columnWidths = new int[] {0, 0, 0};
      layout.columnWeights = new double[] {0.0, 0.0, 1.0E-4};
      layout.rowHeights = new int[rowCount + 1];
      layout.rowWeights = new double[rowCount + 1];
      layout.rowWeights[rowCount] = 1.0E-4;
    }
 /** @return panel_controls */
 private JPanel getPanel_controls() {
   if (panel_controls == null) {
     panel_controls = new JPanel();
     GridBagLayout gbl_panel_controls = new GridBagLayout();
     gbl_panel_controls.columnWidths = new int[] {0, 0, 0};
     gbl_panel_controls.rowHeights = new int[] {0, 0, 0};
     gbl_panel_controls.columnWeights = new double[] {1.0, 0.0, Double.MIN_VALUE};
     gbl_panel_controls.rowWeights = new double[] {0.0, 1.0, Double.MIN_VALUE};
     panel_controls.setLayout(gbl_panel_controls);
     GridBagConstraints gbc_label_animationControl = new GridBagConstraints();
     gbc_label_animationControl.insets = new Insets(2, 2, 2, 2);
     gbc_label_animationControl.gridx = 0;
     gbc_label_animationControl.gridy = 0;
     panel_controls.add(getLabel_animationControl(), gbc_label_animationControl);
     GridBagConstraints gbc_label_fine_tune = new GridBagConstraints();
     gbc_label_fine_tune.insets = new Insets(2, 2, 2, 2);
     gbc_label_fine_tune.gridx = 1;
     gbc_label_fine_tune.gridy = 0;
     panel_controls.add(getLabel_fine_tune(), gbc_label_fine_tune);
     GridBagConstraints gbc_slider_animationControl = new GridBagConstraints();
     gbc_slider_animationControl.fill = GridBagConstraints.BOTH;
     gbc_slider_animationControl.insets = new Insets(2, 25, 2, 25);
     gbc_slider_animationControl.gridx = 0;
     gbc_slider_animationControl.gridy = 1;
     panel_controls.add(getSlider_animationControl(), gbc_slider_animationControl);
     GridBagConstraints gbc_spinner_fine_tune = new GridBagConstraints();
     gbc_spinner_fine_tune.insets = new Insets(2, 2, 2, 2);
     gbc_spinner_fine_tune.gridx = 1;
     gbc_spinner_fine_tune.gridy = 1;
     panel_controls.add(getSpinner_fine_tune(), gbc_spinner_fine_tune);
   }
   return panel_controls;
 }
Example #11
0
 public Main() {
   setIconImage(
       Toolkit.getDefaultToolkit().getImage(Main.class.getResource("/img/multimedia-5.png")));
   setTitle("CATALOG2");
   setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
   setBounds(100, 100, 800, 600);
   setJMenuBar(getMenuBar_1());
   contentPane = new JPanel();
   contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
   setContentPane(contentPane);
   GridBagLayout gbl_contentPane = new GridBagLayout();
   gbl_contentPane.columnWidths = new int[] {400, 400, 0};
   gbl_contentPane.rowHeights = new int[] {0, 0};
   gbl_contentPane.columnWeights = new double[] {1.0, 1.0, Double.MIN_VALUE};
   gbl_contentPane.rowWeights = new double[] {1.0, Double.MIN_VALUE};
   contentPane.setLayout(gbl_contentPane);
   GridBagConstraints gbc_scrollPane = new GridBagConstraints();
   gbc_scrollPane.fill = GridBagConstraints.BOTH;
   gbc_scrollPane.insets = new Insets(0, 0, 0, 5);
   gbc_scrollPane.gridx = 0;
   gbc_scrollPane.gridy = 0;
   contentPane.add(getScrollPane(), gbc_scrollPane);
   GridBagConstraints gbc_scrollPane_2 = new GridBagConstraints();
   gbc_scrollPane_2.fill = GridBagConstraints.BOTH;
   gbc_scrollPane_2.gridx = 1;
   gbc_scrollPane_2.gridy = 0;
   contentPane.add(getScrollPane_2(), gbc_scrollPane_2);
 }
Example #12
0
  // <editor-fold defaultstate="collapsed" desc="Generated
  // Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    jPanel1 = new javax.swing.JPanel();
    jLabel3 = new javax.swing.JLabel();
    m_jName = new javax.swing.JTextField();
    jPanel3 = new javax.swing.JPanel();
    m_jImage = new com.openbravo.data.gui.JImageEditor(m_App);

    setLayout(new java.awt.BorderLayout());

    // jPanel1.setPreferredSize(new java.awt.Dimension(150, 100));
    GridBagLayout gbl_panel = new GridBagLayout();
    gbl_panel.columnWeights = new double[] {0.0, 1.0, 0.0};
    gbl_panel.rowWeights =
        new double[] {
          0.0,
        };
    jPanel1.setLayout(gbl_panel);

    jLabel3.setText(AppLocal.getIntString("Label.Name")); // NOI18N
    GridBagConstraints lbl1 = new GridBagConstraints();
    lbl1.anchor = GridBagConstraints.WEST;
    lbl1.insets = new Insets(5, 5, 0, 0);
    lbl1.gridx = 0;
    lbl1.gridy = 0;
    jPanel1.add(jLabel3, lbl1);

    GridBagConstraints gbc_textPane = new GridBagConstraints();
    gbc_textPane.fill = GridBagConstraints.HORIZONTAL;
    gbc_textPane.insets = new Insets(5, 5, 0, 0);
    gbc_textPane.weightx = 1.0;
    gbc_textPane.gridx = 1;
    gbc_textPane.gridy = 0;
    jPanel1.add(m_jName, gbc_textPane);

    JLabel lblSpace1 = new JLabel("");
    GridBagConstraints gbc_space1 = new GridBagConstraints();
    gbc_space1.insets = new Insets(5, 5, 0, 0);
    gbc_space1.weightx = 1.0;
    gbc_space1.gridx = 2;
    gbc_space1.gridy = 0;
    jPanel1.add(lblSpace1, gbc_space1);

    JLabel lblSpace2 = new JLabel("");
    GridBagConstraints gbc_space2 = new GridBagConstraints();
    gbc_space2.insets = new Insets(5, 5, 0, 0);
    gbc_space2.gridx = 0;
    gbc_space2.gridy = 1;
    jPanel1.add(lblSpace2, gbc_space2);

    add(jPanel1, java.awt.BorderLayout.NORTH);

    jPanel3.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 0, 0));
    jPanel3.setLayout(new java.awt.BorderLayout());
    jPanel3.add(m_jImage, java.awt.BorderLayout.CENTER);

    add(jPanel3, java.awt.BorderLayout.CENTER);
  } // </editor-fold>//GEN-END:initComponents
  public void initComponents() {
    gridBagLayout = new GridBagLayout();
    gridBagLayout.columnWidths = new int[] {20, 0, 20, 0, 20, 0};
    gridBagLayout.rowHeights = new int[] {20, 0, 20, 0, 20, 0};
    gridBagLayout.columnWeights = new double[] {0.0, 1.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
    gridBagLayout.rowWeights = new double[] {0.0, 0.0, 0.0, 1.0, 0.0, Double.MIN_VALUE};
    setLayout(gridBagLayout);

    textFieldRecherche = new JTextField();
    GridBagConstraints gbc_textFieldRecherche = new GridBagConstraints();
    gbc_textFieldRecherche.insets = new Insets(0, 0, 5, 5);
    gbc_textFieldRecherche.fill = GridBagConstraints.HORIZONTAL;
    gbc_textFieldRecherche.gridx = 1;
    gbc_textFieldRecherche.gridy = 1;
    add(textFieldRecherche, gbc_textFieldRecherche);
    textFieldRecherche.setColumns(10);

    btnRechercher = new JButton("Rechercher");
    GridBagConstraints gbc_btnRechercher = new GridBagConstraints();
    gbc_btnRechercher.insets = new Insets(0, 0, 5, 5);
    gbc_btnRechercher.gridx = 3;
    gbc_btnRechercher.gridy = 1;
    add(btnRechercher, gbc_btnRechercher);

    resultat = new JPanel();
    GridBagConstraints gbc_resultat = new GridBagConstraints();
    gbc_resultat.gridwidth = 3;
    gbc_resultat.insets = new Insets(0, 0, 5, 5);
    gbc_resultat.fill = GridBagConstraints.BOTH;
    gbc_resultat.gridx = 1;
    gbc_resultat.gridy = 3;
    add(resultat, gbc_resultat);

    GridBagLayout gbl_resultat = new GridBagLayout();
    gbl_resultat.columnWidths = new int[] {0, 0};
    gbl_resultat.rowHeights = new int[] {0, 0};
    gbl_resultat.columnWeights = new double[] {1.0, Double.MIN_VALUE};
    gbl_resultat.rowWeights = new double[] {1.0, Double.MIN_VALUE};
    resultat.setLayout(gbl_resultat);

    gbc_result = new GridBagConstraints();
    gbc_result.fill = GridBagConstraints.BOTH;
    gbc_result.gridx = 0;
    gbc_result.gridy = 0;
  }
  private void initPanelVisualizacion() {
    panelVisualizacion = new JPanel();
    panelVisualizacion.setBorder(
        new TitledBorder(
            UIManager.getBorder("TitledBorder.border"),
            "Visualizacion",
            TitledBorder.LEADING,
            TitledBorder.TOP,
            null,
            new Color(0, 0, 0)));
    GridBagConstraints gbc_panelVisualizacion = new GridBagConstraints();
    gbc_panelVisualizacion.fill = GridBagConstraints.BOTH;
    gbc_panelVisualizacion.insets = new Insets(5, 5, 0, 5);
    gbc_panelVisualizacion.gridx = 0;
    gbc_panelVisualizacion.gridy = 3;
    panelOpciones.add(panelVisualizacion, gbc_panelVisualizacion);
    GridBagLayout gbl_panelVisualizacion = new GridBagLayout();
    gbl_panelVisualizacion.columnWidths = new int[] {48, 0};
    gbl_panelVisualizacion.rowHeights = new int[] {29, 0, 0};
    gbl_panelVisualizacion.columnWeights = new double[] {1.0, Double.MIN_VALUE};
    gbl_panelVisualizacion.rowWeights = new double[] {0.0, 0.0, Double.MIN_VALUE};
    panelVisualizacion.setLayout(gbl_panelVisualizacion);

    comboVista = new JComboBox();
    GridBagConstraints gbc_comboVista = new GridBagConstraints();
    gbc_comboVista.fill = GridBagConstraints.HORIZONTAL;
    gbc_comboVista.insets = new Insets(5, 5, 5, 5);
    gbc_comboVista.gridx = 0;
    gbc_comboVista.gridy = 0;
    panelVisualizacion.add(comboVista, gbc_comboVista);
    comboVista.addItemListener(
        new ItemListener() {
          public void itemStateChanged(ItemEvent item) {
            if (item.getStateChange() == ItemEvent.SELECTED) {
              actualizarVista();
            }
          }
        });
    comboVista.setModel(
        new DefaultComboBoxModel(new String[] {"Puntos", "Triangulacion", "Solido"}));
    comboVista.setSelectedIndex(2);
    comboVista.setToolTipText("Modo de Visualizacion");

    chckbxBackfaceCulling = new JCheckBox("Backface Culling");
    chckbxBackfaceCulling.addItemListener(
        new ItemListener() {
          public void itemStateChanged(ItemEvent item) {
            panelImagen.setBackfaceCulling(item.getStateChange() == ItemEvent.SELECTED);
          }
        });
    GridBagConstraints gbc_chckbxBackfaceCulling = new GridBagConstraints();
    gbc_chckbxBackfaceCulling.anchor = GridBagConstraints.WEST;
    gbc_chckbxBackfaceCulling.insets = new Insets(0, 10, 0, 0);
    gbc_chckbxBackfaceCulling.gridx = 0;
    gbc_chckbxBackfaceCulling.gridy = 1;
    panelVisualizacion.add(chckbxBackfaceCulling, gbc_chckbxBackfaceCulling);
  }
  public NightlyBuildDialog(JFrame parent) {

    super(parent, true);

    this.setTitle("Warning !!!");
    this.setLayout(new BorderLayout());
    this.add(new NightlyBuildWarning(), BorderLayout.CENTER);

    show_option_checkbox.setSelected(!_pref.isNightlyBuildWarning());

    GridBagLayout grid_bag_layout = new GridBagLayout();
    bottom_panel.setPreferredSize(new java.awt.Dimension(399, 57));
    grid_bag_layout.rowWeights = new double[] {0.1};
    grid_bag_layout.rowHeights = new int[] {7};
    grid_bag_layout.columnWeights = new double[] {0.0, 0.0, 0.1, 0.0};
    grid_bag_layout.columnWidths = new int[] {231, 44, 7, 7};
    bottom_panel.setLayout(grid_bag_layout);
    bottom_panel.add(
        show_option_checkbox,
        new GridBagConstraints(
            0,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.NONE,
            new Insets(0, 0, 0, 0),
            0,
            0));
    bottom_panel.add(
        ok_button,
        new GridBagConstraints(
            2,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(0, 0, 0, 0),
            0,
            0));
    this.add(bottom_panel, BorderLayout.SOUTH);
    this.setSize(450, 340);
    ok_button.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent event) {
            if (show_option_checkbox.isSelected()) _pref.setNightlyBuildWarning(false);
            setVisible(false);
          }
        });
  }
  private void initPanelPosicion() {
    panelPosicion = new JPanel();
    panelPosicion.setBorder(
        new TitledBorder(
            UIManager.getBorder("TitledBorder.border"),
            "Posicion",
            TitledBorder.LEADING,
            TitledBorder.TOP,
            null,
            new Color(0, 0, 0)));
    GridBagConstraints gbc_panelPosicion = new GridBagConstraints();
    gbc_panelPosicion.insets = new Insets(5, 5, 5, 5);
    gbc_panelPosicion.fill = GridBagConstraints.BOTH;
    gbc_panelPosicion.gridx = 0;
    gbc_panelPosicion.gridy = 5;
    panelOpciones.add(panelPosicion, gbc_panelPosicion);
    GridBagLayout gbl_panelPosicion = new GridBagLayout();
    gbl_panelPosicion.columnWidths = new int[] {48, 0, 0};
    gbl_panelPosicion.rowHeights = new int[] {0, 0, 0};
    gbl_panelPosicion.columnWeights = new double[] {1.0, 1.0, Double.MIN_VALUE};
    gbl_panelPosicion.rowWeights = new double[] {0.0, 0.0, Double.MIN_VALUE};
    panelPosicion.setLayout(gbl_panelPosicion);

    lblPosicionX = new JLabel("Posicion X:");
    GridBagConstraints gbc_lblPosicionX = new GridBagConstraints();
    gbc_lblPosicionX.anchor = GridBagConstraints.EAST;
    gbc_lblPosicionX.insets = new Insets(0, 0, 5, 5);
    gbc_lblPosicionX.gridx = 0;
    gbc_lblPosicionX.gridy = 0;
    panelPosicion.add(lblPosicionX, gbc_lblPosicionX);

    labelPosX = new JLabel("");
    GridBagConstraints gbc_labelPosX = new GridBagConstraints();
    gbc_labelPosX.anchor = GridBagConstraints.WEST;
    gbc_labelPosX.insets = new Insets(0, 0, 5, 0);
    gbc_labelPosX.gridx = 1;
    gbc_labelPosX.gridy = 0;
    panelPosicion.add(labelPosX, gbc_labelPosX);

    lblPosicionY = new JLabel("Posicion Y:");
    GridBagConstraints gbc_lblPosicionY = new GridBagConstraints();
    gbc_lblPosicionY.anchor = GridBagConstraints.EAST;
    gbc_lblPosicionY.insets = new Insets(0, 0, 0, 5);
    gbc_lblPosicionY.gridx = 0;
    gbc_lblPosicionY.gridy = 1;
    panelPosicion.add(lblPosicionY, gbc_lblPosicionY);

    lblPosY = new JLabel("");
    GridBagConstraints gbc_lblPosY = new GridBagConstraints();
    gbc_lblPosY.anchor = GridBagConstraints.WEST;
    gbc_lblPosY.gridx = 1;
    gbc_lblPosY.gridy = 1;
    panelPosicion.add(lblPosY, gbc_lblPosY);
  }
Example #17
0
  public ImportClientsGUI(File file, Controller controller) {
    super();
    setOpaque(false);

    this.controller = controller;
    this.towns = new HashMap<String, TownDTO>();
    this.subcategories = new HashMap<String, SubcategoryDTO>();

    for (TownDTO town : controller.getAllTowns()) {
      this.towns.put(town.getName().toUpperCase(), town);
    }

    for (SubcategoryDTO subcategory : controller.getAllSubcategories()) {
      this.subcategories.put(subcategory.getDescription().toUpperCase(), subcategory);
    }

    this.file = file;
    GridBagLayout gridBagLayout = new GridBagLayout();
    gridBagLayout.columnWidths = new int[] {0, 0};
    gridBagLayout.rowHeights = new int[] {0, 50, 0};
    gridBagLayout.columnWeights = new double[] {1.0, Double.MIN_VALUE};
    gridBagLayout.rowWeights = new double[] {1.0, 0.0, Double.MIN_VALUE};
    setLayout(gridBagLayout);

    JScrollPane scrollPane = new JScrollPane();
    scrollPane.setOpaque(false);
    GridBagConstraints gbc_scrollPane = new GridBagConstraints();
    gbc_scrollPane.insets = new Insets(15, 15, 10, 15);
    gbc_scrollPane.fill = GridBagConstraints.BOTH;
    gbc_scrollPane.gridx = 0;
    gbc_scrollPane.gridy = 0;
    add(scrollPane, gbc_scrollPane);

    textArea = new JTextArea();
    textArea.setEditable(false);
    textArea.setMargin(new Insets(10, 10, 10, 10));
    textArea.setWrapStyleWord(true);
    textArea.setLineWrap(true);
    textArea.setForeground(Color.GREEN);
    textArea.setFont(new Font("Lucida Grande", Font.PLAIN, 15));
    textArea.setBackground(new Color(0, 0, 0, 140));
    scrollPane.setViewportView(textArea);

    progressBar = new JProgressBar();
    progressBar.setStringPainted(true);
    progressBar.setForeground(Color.BLACK);
    progressBar.setFont(new Font("Lucida Grande", Font.PLAIN, 20));
    GridBagConstraints gbc_progressBar = new GridBagConstraints();
    gbc_progressBar.fill = GridBagConstraints.BOTH;
    gbc_progressBar.insets = new Insets(0, 15, 15, 15);
    gbc_progressBar.gridx = 0;
    gbc_progressBar.gridy = 1;
    add(progressBar, gbc_progressBar);
  }
 private void initGUI() {
   try {
     BorderLayout thisLayout = new BorderLayout();
     this.setLayout(thisLayout);
     this.setPreferredSize(new java.awt.Dimension(691, 416));
     {
       tiltePnl = new JPanel();
       BorderLayout tiltePnlLayout = new BorderLayout();
       tiltePnl.setLayout(tiltePnlLayout);
       this.add(tiltePnl, BorderLayout.NORTH);
       tiltePnl.setPreferredSize(new java.awt.Dimension(691, 51));
       {
         titleTxt = new JTextPane();
         tiltePnl.add(titleTxt, BorderLayout.WEST);
         titleTxt.setText("Welche Art von Event moechten Sie besuchen?");
         titleTxt.setPreferredSize(new java.awt.Dimension(626, 58));
         titleTxt.setBackground(new java.awt.Color(212, 208, 200));
         titleTxt.setEditable(false);
         titleTxt.setOpaque(false);
         titleTxt.setFont(new java.awt.Font("Segoe UI", 0, 18));
       }
     }
     {
       contentPnl = new JPanel();
       this.add(contentPnl, BorderLayout.CENTER);
       GridBagLayout contentPnlLayout = new GridBagLayout();
       contentPnlLayout.rowWeights = new double[] {0.0, 0.0, 0.1};
       contentPnlLayout.rowHeights = new int[] {20, 300, 7};
       contentPnlLayout.columnWeights = new double[] {0.0, 0.0, 0.0, 0.0, 0.1};
       contentPnlLayout.columnWidths = new int[] {30, 200, 200, 200, 7};
       contentPnl.setLayout(contentPnlLayout);
       contentPnl.setPreferredSize(new java.awt.Dimension(691, 365));
       {
         kindOfEventList = new LikeSelectionList();
         contentPnl.add(
             kindOfEventList,
             new GridBagConstraints(
                 1,
                 1,
                 1,
                 1,
                 0.0,
                 0.0,
                 GridBagConstraints.NORTH,
                 GridBagConstraints.NONE,
                 new Insets(0, 0, 0, 0),
                 0,
                 0));
       }
     }
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
Example #19
0
 /** inits GUI */
 private void initGUI() {
   try {
     GridBagLayout thisLayout = new GridBagLayout();
     thisLayout.rowWeights = new double[] {0.1, 0.1, 0.1, 0.1};
     thisLayout.rowHeights = new int[] {7, 7, 7, 7};
     thisLayout.columnWeights = new double[] {0.1, 0.1, 0.1, 0.1};
     thisLayout.columnWidths = new int[] {7, 7, 7, 7};
     getContentPane().setLayout(thisLayout);
     this.setResizable(false);
     this.setModal(true);
     {
       cb = new JCheckBox();
       getContentPane()
           .add(
               cb,
               new GridBagConstraints(
                   1,
                   1,
                   1,
                   1,
                   0.0,
                   0.0,
                   GridBagConstraints.CENTER,
                   GridBagConstraints.NONE,
                   new Insets(0, 0, 0, 0),
                   0,
                   0));
       cb.setText("jCheckBox");
     }
     {
       label = new JLabel();
       getContentPane()
           .add(
               label,
               new GridBagConstraints(
                   2,
                   2,
                   1,
                   1,
                   0.0,
                   0.0,
                   GridBagConstraints.CENTER,
                   GridBagConstraints.NONE,
                   new Insets(0, 0, 0, 0),
                   0,
                   0));
       label.setText("jLabel");
     }
     setSize(400, 300);
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
  private void initPanelLuzAmbiente() {
    panelLuzAmbiente = new JPanel();
    panelLuzAmbiente.setBorder(
        new TitledBorder(
            UIManager.getBorder("TitledBorder.border"),
            "Fuente de Luz",
            TitledBorder.LEADING,
            TitledBorder.TOP,
            null,
            new Color(0, 0, 0)));
    GridBagConstraints gbc_panelLuzAmbiente = new GridBagConstraints();
    gbc_panelLuzAmbiente.fill = GridBagConstraints.BOTH;
    gbc_panelLuzAmbiente.insets = new Insets(5, 5, 0, 5);
    gbc_panelLuzAmbiente.gridx = 0;
    gbc_panelLuzAmbiente.gridy = 1;
    panelOpciones.add(panelLuzAmbiente, gbc_panelLuzAmbiente);
    GridBagLayout gbl_panelLuzAmbiente = new GridBagLayout();
    gbl_panelLuzAmbiente.columnWidths = new int[] {48, 0};
    gbl_panelLuzAmbiente.rowHeights = new int[] {0, 0, 0, 0};
    gbl_panelLuzAmbiente.columnWeights = new double[] {1.0, Double.MIN_VALUE};
    gbl_panelLuzAmbiente.rowWeights = new double[] {0.0, 1.0, 1.0, Double.MIN_VALUE};
    panelLuzAmbiente.setLayout(gbl_panelLuzAmbiente);

    comboLuz = new JComboBox();
    comboLuz.addItemListener(
        new ItemListener() {
          public void itemStateChanged(ItemEvent item) {
            if (item.getStateChange() == ItemEvent.SELECTED) {
              actualizarLuz();
            }
          }
        });
    comboLuz.setModel(
        new DefaultComboBoxModel(
            new String[] {
              "Lateral Izquierda",
              "Lateral Derecha",
              "Cenital",
              "Contrapicado",
              "Frontal",
              "Contraluz",
              "Semi-lateral",
              "Semi-contraluz"
            }));
    comboLuz.setSelectedIndex(0);
    GridBagConstraints gbc_comboLuz = new GridBagConstraints();
    gbc_comboLuz.insets = new Insets(5, 5, 5, 5);
    gbc_comboLuz.fill = GridBagConstraints.HORIZONTAL;
    gbc_comboLuz.gridx = 0;
    gbc_comboLuz.gridy = 0;
    panelLuzAmbiente.add(comboLuz, gbc_comboLuz);
  }
Example #21
0
 @Override
 protected GridBagLayout createRuleDetailsLayout() {
   GridBagLayout ruleDetailsLayout = new GridBagLayout();
   ruleDetailsLayout.rowWeights = new double[] {0.0, 0.0, 0.0, 0.0};
   // max total height = 290
   if (!isException) {
     ruleDetailsLayout.rowHeights = new int[] {30, 30, 30, 90};
   } else {
     ruleDetailsLayout.rowHeights = new int[] {150, 30, 30, 90};
   }
   ruleDetailsLayout.columnWeights = new double[] {0.0, 0.0};
   ruleDetailsLayout.columnWidths = new int[] {130, 660};
   return ruleDetailsLayout;
 }
  /** Constructor. Creates the different swing elements. */
  public SimulationSelectionGUI() {
    // Layout
    GridBagLayout gridBagLayout = new GridBagLayout();
    gridBagLayout.columnWidths = new int[] {190, 90, 67, 0};
    gridBagLayout.rowHeights = new int[] {20, 202, 23, 0};
    gridBagLayout.columnWeights = new double[] {0.0, 0.0, 0.0, Double.MIN_VALUE};
    gridBagLayout.rowWeights = new double[] {0.0, 0.0, 0.0, Double.MIN_VALUE};
    setLayout(gridBagLayout);

    // List
    resultsList = new JList<>();
    GridBagConstraints gbc_resultsList = new GridBagConstraints();
    gbc_resultsList.fill = GridBagConstraints.BOTH;
    gbc_resultsList.insets = new Insets(0, 0, 5, 0);
    gbc_resultsList.gridwidth = 3;
    gbc_resultsList.gridx = 0;
    gbc_resultsList.gridy = 1;
    add(resultsList, gbc_resultsList);

    // Select button
    selectButton = new JButton("Sélectionner");
    selectButton.setEnabled(false);
    GridBagConstraints gbc_selectButton = new GridBagConstraints();
    gbc_selectButton.anchor = GridBagConstraints.EAST;
    gbc_selectButton.gridx = 2;
    gbc_selectButton.gridy = 2;
    add(selectButton, gbc_selectButton);
    selectButton.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            onSelect(resultsList.getSelectedValuesList());
          }
        });

    // Return button
    returnButton = new JButton("Retour");
    GridBagConstraints gbc_returnButton = new GridBagConstraints();
    gbc_returnButton.anchor = GridBagConstraints.WEST;
    gbc_returnButton.gridx = 1;
    gbc_returnButton.gridy = 2;
    add(returnButton, gbc_returnButton);
    returnButton.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            onReturn();
          }
        });
  }
  public Example_9_View_Step1Panel() {
    super();

    GridBagLayout gridBagLayout = new GridBagLayout();
    gridBagLayout.columnWidths = new int[] {0, 0};
    gridBagLayout.rowHeights = new int[] {0, 0};
    gridBagLayout.columnWeights = new double[] {1.0, Double.MIN_VALUE};
    gridBagLayout.rowWeights = new double[] {1.0, Double.MIN_VALUE};
    setLayout(gridBagLayout);

    startButton = new StrictThreadingJButton("Start");
    GridBagConstraints gbc_startButton = new GridBagConstraints();
    gbc_startButton.gridx = 0;
    gbc_startButton.gridy = 0;
    add(startButton, gbc_startButton);
  }
  public Example_10_View() {
    super();
    setTitle(getClass().getSimpleName() + " " + ManagementFactory.getRuntimeMXBean().getName());

    setBounds(100, 100, 450, 300);
    setDefaultCloseOperation(StrictThreadingJFrame.EXIT_ON_CLOSE);
    GridBagLayout gridBagLayout = new GridBagLayout();
    gridBagLayout.columnWidths = new int[] {0, 0, 0};
    gridBagLayout.rowHeights = new int[] {0, 0, 0, 0};
    gridBagLayout.columnWeights = new double[] {1.0, 1.0, Double.MIN_VALUE};
    gridBagLayout.rowWeights = new double[] {0.0, 1.0, 1.0, Double.MIN_VALUE};
    getContentPane().setLayout(gridBagLayout);

    editCheckBox = new StrictThreadingJCheckBox("Edit");
    GridBagConstraints gbc_editCheckBox = new GridBagConstraints();
    gbc_editCheckBox.fill = GridBagConstraints.HORIZONTAL;
    gbc_editCheckBox.insets = new Insets(5, 5, 5, 5);
    gbc_editCheckBox.gridx = 0;
    gbc_editCheckBox.gridy = 0;
    getContentPane().add(editCheckBox, gbc_editCheckBox);

    customerLabel = new StrictThreadingJLabel("");
    GridBagConstraints gbc_customerLabel = new GridBagConstraints();
    gbc_customerLabel.anchor = GridBagConstraints.EAST;
    gbc_customerLabel.insets = new Insets(5, 0, 5, 5);
    gbc_customerLabel.gridx = 1;
    gbc_customerLabel.gridy = 0;
    getContentPane().add(customerLabel, gbc_customerLabel);

    addressPanel = new Example_10_View_AddressPanel();
    GridBagConstraints gbc_addressPanel = new GridBagConstraints();
    gbc_addressPanel.insets = new Insets(0, 0, 5, 5);
    gbc_addressPanel.gridwidth = 2;
    gbc_addressPanel.fill = GridBagConstraints.BOTH;
    gbc_addressPanel.gridx = 0;
    gbc_addressPanel.gridy = 1;
    getContentPane().add(addressPanel, gbc_addressPanel);

    notesPanel = new Example_10_View_NotesPanel();
    GridBagConstraints gbv_notesPanel = new GridBagConstraints();
    gbv_notesPanel.gridwidth = 2;
    gbv_notesPanel.insets = new Insets(0, 0, 5, 5);
    gbv_notesPanel.fill = GridBagConstraints.BOTH;
    gbv_notesPanel.gridx = 0;
    gbv_notesPanel.gridy = 2;
    getContentPane().add(notesPanel, gbv_notesPanel);
  }
  /**
   * Create the panel.
   *
   * @param cndIO
   */
  public ViewMessagePanel(IO cndIO) {

    this.io = cndIO;

    setBorder(
        new TitledBorder(
            UIManager.getBorder("TitledBorder.border"),
            "Messages / Alerts - View",
            TitledBorder.LEADING,
            TitledBorder.TOP,
            null,
            null));
    GridBagLayout gridBagLayout = new GridBagLayout();
    gridBagLayout.columnWidths = new int[] {0, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
    gridBagLayout.rowHeights = new int[] {0, 0, 197, 0, 0, 0, 0, 0, 0, 0};
    gridBagLayout.columnWeights =
        new double[] {0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
    gridBagLayout.rowWeights =
        new double[] {0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
    setLayout(gridBagLayout);

    JTextArea textAreaMessages = new JTextArea();
    GridBagConstraints gbc_textAreaMessages = new GridBagConstraints();
    gbc_textAreaMessages.gridheight = 4;
    gbc_textAreaMessages.gridwidth = 9;
    gbc_textAreaMessages.insets = new Insets(0, 0, 5, 5);
    gbc_textAreaMessages.fill = GridBagConstraints.BOTH;
    gbc_textAreaMessages.gridx = 1;
    gbc_textAreaMessages.gridy = 1;
    add(textAreaMessages, gbc_textAreaMessages);

    btnReply = new JButton("Reply");
    GridBagConstraints gbc_btnReply = new GridBagConstraints();
    gbc_btnReply.gridwidth = 2;
    gbc_btnReply.insets = new Insets(0, 0, 5, 5);
    gbc_btnReply.gridx = 4;
    gbc_btnReply.gridy = 7;
    add(btnReply, gbc_btnReply);

    btnCancel = new JButton("Cancel");
    GridBagConstraints gbc_btnCancel = new GridBagConstraints();
    gbc_btnCancel.gridwidth = 2;
    gbc_btnCancel.insets = new Insets(0, 0, 5, 5);
    gbc_btnCancel.gridx = 7;
    gbc_btnCancel.gridy = 7;
    add(btnCancel, gbc_btnCancel);
  }
Example #26
0
	private void initGUI() {
		try {
			GridBagLayout thisLayout = new GridBagLayout();
			thisLayout.rowWeights = new double[] {0.1};
			thisLayout.rowHeights = new int[] {7};
			thisLayout.columnWeights = new double[] {0.1};
			thisLayout.columnWidths = new int[] {7};
			this.setLayout(thisLayout);
			setPreferredSize(new Dimension(400, 300));
			{
				jScrollPane1 = new JScrollPane();
				this.add(jScrollPane1, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
Example #27
0
  /** Initialize the contents of the frame. */
  private void initialize() {
    frame = new JFrame();
    frame.setBounds(100, 100, 450, 300);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    JMenuBar menuBar = new JMenuBar();
    frame.setJMenuBar(menuBar);

    JMenu menu = new JMenu("File");
    menuBar.add(menu);

    JMenu menu_1 = new JMenu("About");
    menuBar.add(menu_1);
    GridBagLayout gridBagLayout = new GridBagLayout();
    gridBagLayout.columnWidths = new int[] {0, 0, 0, 0, 0, 0, 0, 0};
    gridBagLayout.rowHeights = new int[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
    gridBagLayout.columnWeights =
        new double[] {0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, Double.MIN_VALUE};
    gridBagLayout.rowWeights =
        new double[] {0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, Double.MIN_VALUE};
    frame.getContentPane().setLayout(gridBagLayout);

    JScrollPane scrollPane = new JScrollPane();
    GridBagConstraints gbc_scrollPane = new GridBagConstraints();
    gbc_scrollPane.gridwidth = 7;
    gbc_scrollPane.gridheight = 8;
    gbc_scrollPane.insets = new Insets(0, 0, 5, 0);
    gbc_scrollPane.fill = GridBagConstraints.BOTH;
    gbc_scrollPane.gridx = 0;
    gbc_scrollPane.gridy = 0;
    frame.getContentPane().add(scrollPane, gbc_scrollPane);

    textArea = new JTextArea();
    scrollPane.setViewportView(textArea);

    textField = new JTextField();
    GridBagConstraints gbc_textField = new GridBagConstraints();
    gbc_textField.gridwidth = 7;
    gbc_textField.insets = new Insets(0, 0, 0, 5);
    gbc_textField.fill = GridBagConstraints.HORIZONTAL;
    gbc_textField.gridx = 0;
    gbc_textField.gridy = 8;
    frame.getContentPane().add(textField, gbc_textField);
    textField.setColumns(10);
    textField.addActionListener(this);
  }
Example #28
0
    public ComparedValuePanel() {
      GridBagLayout gbl_panel_1 = new GridBagLayout();
      gbl_panel_1.columnWidths = new int[] {0, 0, 0, 0};
      gbl_panel_1.rowHeights = new int[] {0, 0};
      gbl_panel_1.columnWeights = new double[] {0.0, 1.0, 0.0, Double.MIN_VALUE};
      gbl_panel_1.rowWeights = new double[] {0.0, Double.MIN_VALUE};
      setLayout(gbl_panel_1);

      checkBox_3 = new JLabel(AwesomeIcon.create(AwesomeIcon.FA_MINUS_CIRCLE));
      checkBox_3.addMouseListener(
          new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
              if (SwingUtilities.isLeftMouseButton(e)) {
                lowerPanel.remove(ComparedValuePanel.this);
                lowerPanel.revalidate();
                if (lowerPanel.getComponentCount() == 1) {
                  addComparedValuePanel();
                }
              }
            }
          });
      GridBagConstraints gbc_checkBox_3 = new GridBagConstraints();
      gbc_checkBox_3.anchor = GridBagConstraints.WEST;
      gbc_checkBox_3.gridx = 0;
      gbc_checkBox_3.gridy = 0;
      add(checkBox_3, gbc_checkBox_3);

      textField_1 = new JTextField();
      GridBagConstraints gbc_textField_1 = new GridBagConstraints();
      gbc_textField_1.fill = GridBagConstraints.HORIZONTAL;
      gbc_textField_1.gridx = 1;
      gbc_textField_1.gridy = 0;
      add(textField_1, gbc_textField_1);
      textField_1.setColumns(10);

      label_1 = new JLabel(SCBundle.get("key.filter.nthColumn"));
      label_1.setVisible(false);
      GridBagConstraints gbc_label_1 = new GridBagConstraints();
      gbc_label_1.gridx = 2;
      gbc_label_1.gridy = 0;
      add(label_1, gbc_label_1);
    }
 /** @return panel_settings */
 private JPanel getPanel_settings() {
   if (panel_settings == null) {
     panel_settings = new JPanel();
     panel_settings.setBorder(
         BorderFactory.createTitledBorder("Local coordinate system settings"));
     GridBagLayout gbl_panel_settings = new GridBagLayout();
     gbl_panel_settings.columnWidths = new int[] {0, 0};
     gbl_panel_settings.rowHeights = new int[] {0, 0};
     gbl_panel_settings.columnWeights = new double[] {1.0, Double.MIN_VALUE};
     gbl_panel_settings.rowWeights = new double[] {1.0, Double.MIN_VALUE};
     panel_settings.setLayout(gbl_panel_settings);
     GridBagConstraints gbc_panel_contents = new GridBagConstraints();
     gbc_panel_contents.fill = GridBagConstraints.HORIZONTAL;
     gbc_panel_contents.gridx = 0;
     gbc_panel_contents.gridy = 0;
     panel_settings.add(getPanel_contents(), gbc_panel_contents);
   }
   return panel_settings;
 }
  public void initComponents(final Application application) {
    // setBounds(100, 100, 800, 550);

    setPreferredSize(application.getSize());

    setBackground(Color.PINK);
    GridBagLayout gridBagLayout = new GridBagLayout();
    gridBagLayout.columnWidths = new int[] {20, 350, 20, 309, 20, 0};
    gridBagLayout.rowHeights = new int[] {20, 350, 20, 0, 20, 0};
    gridBagLayout.columnWeights = new double[] {0.0, 0.0, 0.0, 1.0, 0.0, Double.MIN_VALUE};
    gridBagLayout.rowWeights = new double[] {0.0, 0.0, 0.0, 1.0, 0.0, Double.MIN_VALUE};
    setLayout(gridBagLayout);

    tabbedPaneConfig = new JTabbedPane(JTabbedPane.TOP);
    GridBagConstraints gbc_tabbedPaneConfig = new GridBagConstraints();
    gbc_tabbedPaneConfig.insets = new Insets(0, 0, 5, 5);
    gbc_tabbedPaneConfig.fill = GridBagConstraints.BOTH;
    gbc_tabbedPaneConfig.gridx = 1;
    gbc_tabbedPaneConfig.gridy = 1;

    tabbedPaneConfig.addTab("Local", configParamSqlLocal);
    tabbedPaneConfig.addTab("Master", configParamSqlMaster);

    add(tabbedPaneConfig, gbc_tabbedPaneConfig);

    tabbedPaneRequetes = new JTabbedPane(JTabbedPane.TOP);
    GridBagConstraints gbc_tabbedPaneRequetes = new GridBagConstraints();
    gbc_tabbedPaneRequetes.gridheight = 3;
    gbc_tabbedPaneRequetes.insets = new Insets(0, 0, 5, 5);
    gbc_tabbedPaneRequetes.fill = GridBagConstraints.BOTH;
    gbc_tabbedPaneRequetes.gridx = 3;
    gbc_tabbedPaneRequetes.gridy = 1;
    add(tabbedPaneRequetes, gbc_tabbedPaneRequetes);

    tabbedPaneRequetes.addTab("Local", configSqlEditorLocal);
    tabbedPaneRequetes.addTab("Master", configSqlEditorMaster);

    add(tabbedPaneRequetes, gbc_tabbedPaneRequetes);
  }