コード例 #1
0
  /**
   * Shows given list of reading lists.
   *
   * @param lists lists.
   */
  protected void setReadingLists(ReadingList[] lists) {
    tblReadingLists.setEnabled(lists != null);
    btnAddReadingList.setEnabled(lists != null);
    btnRemoveList.setEnabled(lists != null);

    readingListsModel.setLists(lists);
  }
コード例 #2
0
ファイル: SecurityPanel.java プロジェクト: richardwhiuk/jitsi
 private void loadStates() {
   boolean b = enableDefaultEncryption.isSelected();
   cboSavpOption.setEnabled(b);
   this.encryptionProtocolPreferences.setEnabled(b);
   enableSipZrtpAttribute.setEnabled(
       b && this.encryptionConfigurationTableModel.isEnabledLabel("ZRTP"));
   tabCiphers.setEnabled(b && this.encryptionConfigurationTableModel.isEnabledLabel("SDES"));
 }
コード例 #3
0
  public hostelStatus() {
    setTitle("Hostel");
    connect();
    updateRecord();

    JFrame fr = new JFrame();
    Toolkit tkt = fr.getToolkit();
    Dimension frsize = tkt.getScreenSize();
    setBounds(frsize.width / 4, frsize.height / 12, frsize.width / 2, frsize.height / 8);
    setLayout(null);

    cn = getContentPane();
    cn.setBackground(new Color(190, 180, 170));

    setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

    tl = new JLabel("Current Hostels Status");
    tl.setFont(new Font("Engravers MT", 1, 25));
    tl.setForeground(new Color(247, 251, 249));

    p1 = new JPanel();
    p1.setBounds(0, 0, 600, 50);
    p1.add(tl);
    p1.setBackground(new Color(31, 88, 166));
    cn.add(p1);

    b1 = new JButton("LOAD");
    b1.setMnemonic('L');
    b1.addActionListener(new dispListener());
    b1.setBounds(230, 320, 120, 30);

    b2 = new JButton("EXIT");
    b2.setMnemonic('X');
    b2.addActionListener(new exitListener());
    b2.setBounds(350, 320, 100, 30);

    cn.add(b1);
    cn.add(b2);

    table = new JTable(data, col);
    table.setFont(new Font("Serif", Font.BOLD, 16));
    table.setBackground(new Color(250, 250, 250));
    table.setEnabled(false);

    JScrollPane jsp = new JScrollPane(table);
    jsp.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
    jsp.setBounds(5, 100, 590, 200);
    cn.add(jsp);

    screensize = Toolkit.getDefaultToolkit().getScreenSize();

    setSize(600, 400);
    setVisible(true);
    setVisible(true);
    setResizable(true);
    connect();
  }
コード例 #4
0
  public UReservacion(String i, String n, String a, String c) {
    this.Identificacion = i;
    this.Nombre = n;
    this.Apellido = a;
    this.Correo = c;
    setTitle("Sistema de Registro");
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    esquema = new BorderLayout();
    panelnorte = new JPanel();
    panelcentro = new JPanel(new BorderLayout());
    panelBusqueda = new JPanel(new FlowLayout());
    panelsur = new JPanel();

    dtmesa = mesa.listarMesa("");
    String[] columNames = {"Numero", "Capacidad", "Fumador", "Estado"};
    dtmMesa = new DefaultTableModel(dtmesa, columNames);
    jtbMesa = new JTable(dtmMesa);
    jtbMesa.setEnabled(false);
    jtbMesa.setPreferredScrollableViewportSize(new Dimension(700, 120));
    jtbMesa.setAutoCreateRowSorter(true);
    spMesa = new JScrollPane(jtbMesa);
    lbltitulo = new JLabel("Mesas disponibles");
    lbltitulo.setFont(new Font("Verdana", Font.BOLD, 14));

    lblnomproducto = new JLabel("Ingrese numero de mesa:");
    txtNumMesa = new JTextField(5);
    btnRegistrar = new JButton("Registrar");

    panelBusqueda.add(lblnomproducto);
    panelBusqueda.add(txtNumMesa);

    lblAcompaantes = new JLabel("Personas:");
    panelBusqueda.add(lblAcompaantes);

    textCompa = new JTextField();
    panelBusqueda.add(textCompa);
    textCompa.setColumns(5);

    lblNewLabel_1 = new JLabel("Fecha");
    panelBusqueda.add(lblNewLabel_1);

    txtAaaammdd = new JTextField();
    txtAaaammdd.setText("AAAA-MM-DD");
    txtAaaammdd.setToolTipText("");
    panelBusqueda.add(txtAaaammdd);
    txtAaaammdd.setColumns(10);

    lblHora = new JLabel("Hora");
    panelBusqueda.add(lblHora);

    txtHhmmss = new JTextField();
    txtHhmmss.setText("HH-MM-SS");
    panelBusqueda.add(txtHhmmss);
    txtHhmmss.setColumns(10);

    lblNewLabel = new JLabel("¿Vista al mar?");
    panelBusqueda.add(lblNewLabel);

    checkBox = new JCheckBox("");
    checkBox.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent arg0) {
            checkBox.setEnabled(false);
          }
        });
    panelBusqueda.add(checkBox);
    panelBusqueda.add(btnRegistrar);

    getContentPane().setLayout(esquema);

    panelnorte.add(lbltitulo);
    panelcentro.add(panelBusqueda, BorderLayout.NORTH);
    panelcentro.add(spMesa, BorderLayout.CENTER);

    getContentPane().add(panelnorte, BorderLayout.NORTH);
    getContentPane().add(panelcentro, BorderLayout.CENTER);
    getContentPane().add(panelsur, BorderLayout.SOUTH);

    this.pack();
    setResizable(false);
    setLocationRelativeTo(this.getParent());
    setVisible(true);
    mostrarProductos("Libre");
  }