Ejemplo n.º 1
0
  @Override
  public GemPanel init() {
    number = new GemNumericField(6);
    number.addActionListener(this);
    name = new GemField(15);
    name.addActionListener(this);
    style = new GemField(15);
    style.addActionListener(this);
    site = new GemField(15);
    site.addActionListener(this);

    btErase = new GemButton(GemCommand.ERASE_CMD);
    btErase.addActionListener(this);

    mask = new GemPanel();
    mask.setLayout(new GridBagLayout());

    GridBagHelper gb = new GridBagHelper(mask);
    gb.add(new GemLabel(BundleUtil.getLabel("Number.label")), 0, 0, 1, 1, GridBagHelper.WEST);
    gb.add(new GemLabel(BundleUtil.getLabel("Name.label")), 0, 1, 1, 1, GridBagHelper.WEST);
    gb.add(new GemLabel(BundleUtil.getLabel("Style.label")), 0, 2, 1, 1, GridBagHelper.WEST);
    gb.add(new GemLabel(BundleUtil.getLabel("Website.label")), 0, 3, 1, 1, GridBagHelper.WEST);

    gb.add(number, 1, 0, 1, 1, GridBagHelper.WEST);
    gb.add(name, 1, 1, 1, 1, GridBagHelper.WEST);
    gb.add(style, 1, 2, 1, 1, GridBagHelper.WEST);
    gb.add(site, 1, 3, 1, 1, GridBagHelper.WEST);

    gb.add(btErase, 2, 4, 1, 1, GridBagHelper.WEST);

    return mask;
  }
Ejemplo n.º 2
0
  public MemberRehearsalView(GemList<Room> roomList) {

    memberField = new GemField(35);
    memberField.setEditable(false);
    datePanel = new DateRangePanel(DateRangePanel.SIMPLE_DATE, null);
    hourPanel = new HourRangePanel(3 * 60);
    roomChoice = new RoomChoice(roomList);
    withCard = new JCheckBox(BundleUtil.getLabel("Subscription.label"));
    withCard.setBorder(null);
    this.setLayout(new GridBagLayout());
    GridBagHelper gb = new GridBagHelper(this);

    gb.add(new GemLabel(BundleUtil.getLabel("Member.label")), 0, 0, 1, 1, GridBagHelper.WEST);
    gb.add(new GemLabel(BundleUtil.getLabel("Date.label")), 0, 1, 1, 1, GridBagHelper.WEST);
    gb.add(new GemLabel(BundleUtil.getLabel("Hour.label")), 0, 2, 1, 1, GridBagHelper.WEST);
    gb.add(new GemLabel(BundleUtil.getLabel("Room.label")), 0, 3, 1, 1, GridBagHelper.WEST);
    // gb.add(new GemLabel(BundleUtil.getLabel("Subscription.label")), 0, 4, 1, 1,
    // GridBagHelper.EAST);

    gb.add(memberField, 1, 0, 1, 1, GridBagHelper.WEST);
    gb.add(datePanel, 1, 1, 1, 1, GridBagHelper.WEST);
    gb.add(hourPanel, 1, 2, 1, 1, GridBagHelper.WEST);
    gb.add(roomChoice, 1, 3, 1, 1, GridBagHelper.WEST);
    gb.add(withCard, 1, 4, 1, 1, GridBagHelper.WEST);
  }
Ejemplo n.º 3
0
  public ContactFileEditor(GemDesktop _desktop) {
    super(_desktop);

    note = new GemLabel();
    note.setForeground(java.awt.Color.red);
    personView = new PersonView();
    infosView = new GemPanel();

    infosView.setBorder(BorderFactory.createMatteBorder(0, 1, 0, 0, Color.lightGray));
    teleView =
        new TelView(
            ParamTableIO.find(Category.TELEPHONE.getTable(), Category.TELEPHONE.getCol(), dc));

    emailView = new EmailView();
    websiteView =
        new WebSiteView(
            ParamTableIO.find(Category.SITEWEB.getTable(), Category.SITEWEB.getCol(), dc));

    infosView.setLayout(new BoxLayout(infosView, BoxLayout.Y_AXIS));
    infosView.add(teleView);
    infosView.add(emailView);
    infosView.add(websiteView);

    JScrollPane scp = new JScrollPane(infosView);
    scp.setBorder(null);
    scp.setPreferredSize(new Dimension(400, scp.getPreferredSize().height));

    GemPanel addressPanel = new GemPanel();
    addressPanel.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
    addressView = new AddressView();
    addressView.setBorder(null);
    addressPanel.add(addressView, BorderLayout.SOUTH);

    this.setLayout(new GridBagLayout());
    gb = new GridBagHelper(this);
    GemBorderPanel gp = new GemBorderPanel(new BorderLayout());

    gp.add(personView, BorderLayout.WEST);
    gp.add(scp, BorderLayout.EAST);

    gb.add(gp, 0, 0, 1, 1, GridBagHelper.BOTH, 1.0, 1.0);
    gb.add(addressPanel, 0, 2, 1, 1, GridBagHelper.BOTH, GridBagHelper.WEST);
    gb.add(note, 0, 3, 1, 1, GridBagHelper.HORIZONTAL, GridBagHelper.WEST);
  }
Ejemplo n.º 4
0
 public void setLinkTelAddress(Vector a, Vector t, JCheckBox cb) {
   if (a != null && a.size() > 0) {
     addressView.set((Address) a.elementAt(0));
   }
   addressView.setEditable(false);
   addressView.getArchive().setEnabled(false);
   teleView.setLien(t);
   teleView.setEditable(false);
   gb.add(cb, 0, 1, 1, 1, GridBagHelper.WEST);
   cbTelAddress = cb;
   linkTelAddress = true;
   revalidate();
 }
Ejemplo n.º 5
0
  public BranchView() {

    no = new GemField(6);
    no.setEditable(false);
    no.setBackground(Color.lightGray);

    bankCode = new BankCodeField();
    bankName = new GemField(30);

    branchCode = new BranchCodeField();
    domiciliation = new GemField(24);
    bicCode = new BicCodeField();
    bicCode.setActionCommand(BankCodeCtrl.BIC_CMD);
    bicCode.setToolTipText(BundleUtil.getLabel("Bic.code.tip"));

    addressView = new AddressView();

    this.setLayout(new GridBagLayout());
    GridBagHelper gb = new GridBagHelper(this);

    gb.add(new GemLabel(BundleUtil.getLabel("Id.label")), 0, 0, 1, 1, GridBagHelper.WEST);
    gb.add(new GemLabel(BundleUtil.getLabel("Bank.code.label")), 0, 1, 1, 1, GridBagHelper.WEST);
    gb.add(new GemLabel(BundleUtil.getLabel("Bank.name.label")), 0, 2, 1, 1, GridBagHelper.WEST);
    gb.add(
        new GemLabel(BundleUtil.getLabel("Bank.branch.code.label")),
        0,
        3,
        1,
        1,
        GridBagHelper.WEST);
    gb.add(new GemLabel("Domiciliation"), 0, 4, 1, 1, GridBagHelper.WEST);
    gb.add(new GemLabel(BundleUtil.getLabel("Bic.code.label")), 0, 5, 1, 1, GridBagHelper.WEST);
    gb.add(no, 1, 0, 1, 1, GridBagHelper.WEST);
    gb.add(bankCode, 1, 1, 3, 1, GridBagHelper.WEST);
    gb.add(bankName, 1, 2, 3, 1, GridBagHelper.WEST);
    gb.add(branchCode, 1, 3, 1, 1, GridBagHelper.WEST);
    gb.add(domiciliation, 1, 4, 1, 1, GridBagHelper.WEST);
    gb.add(bicCode, 1, 5, 1, 1, GridBagHelper.WEST);
    gb.add(addressView, 0, 6, 2, 1, GridBagHelper.BOTH, 1.0, 1.0);
  }