54 lines
1.5 KiB
Java
54 lines
1.5 KiB
Java
package VistaControlador;
|
|
|
|
import java.awt.GridBagConstraints;
|
|
import java.awt.GridBagLayout;
|
|
|
|
import javax.swing.ButtonGroup;
|
|
import javax.swing.JButton;
|
|
import javax.swing.JCheckBox;
|
|
import javax.swing.JRadioButton;
|
|
import javax.swing.JRadioButtonMenuItem;
|
|
|
|
public class VistaPanelInterfaz extends VistaPanel{
|
|
ButtonGroup menu;
|
|
JRadioButton temaClaro;
|
|
JRadioButton temaRosa;
|
|
JRadioButton temaOscuro;
|
|
JCheckBox aplicarBarra;
|
|
JButton aplicarCambios;
|
|
|
|
VistaPanelInterfaz() {
|
|
this.setLayout(new GridBagLayout());
|
|
GridBagConstraints constrain = new GridBagConstraints();
|
|
this.menu = new ButtonGroup();
|
|
this.temaClaro = new JRadioButton("claro");
|
|
this.menu.add(this.temaClaro);
|
|
this.temaOscuro = new JRadioButton("oscuro");
|
|
this.menu.add(this.temaOscuro);
|
|
this.temaRosa = new JRadioButton("rosa");
|
|
this.menu.add(this.temaRosa);
|
|
//this.menu.setSize(200, 200);
|
|
constrain.gridx = 0;
|
|
constrain.gridy = 0;
|
|
this.add(this.temaClaro,constrain);
|
|
constrain.gridx = 1;
|
|
constrain.gridy = 0;
|
|
this.add(this.temaRosa,constrain);
|
|
constrain.gridx = 2;
|
|
constrain.gridy = 0;
|
|
this.add(this.temaOscuro,constrain);
|
|
this.aplicarBarra = new JCheckBox("Barra");
|
|
this.aplicarBarra.setToolTipText("Selecciona para aplicar también el tema en la barra");
|
|
constrain.gridx = 0;
|
|
constrain.gridy = 1;
|
|
this.add(this.aplicarBarra,constrain);
|
|
this.aplicarCambios = new JButton("Aplicar");
|
|
this.aplicarCambios.setToolTipText("aplicar el tema");
|
|
constrain.gridx = 1;
|
|
constrain.gridy = 1;
|
|
this.add(this.aplicarCambios,constrain);
|
|
|
|
}
|
|
|
|
}
|