Exemplo n.º 1
0
 private JRadioButton getRegionButton(
     JRadioButton button, int x, int y, int w, int h, String tip) {
   button.setBounds(new Rectangle(x, y, w, h));
   button.setBorder(BorderFactory.createLoweredBevelBorder());
   button.setToolTipText(Messages.getString(tip));
   button.addActionListener(alRegion);
   regionButtons.add(button);
   return button;
 }
Exemplo n.º 2
0
  public PanelMore(OSeaMAction dia) {
    dlg = dia;
    setLayout(null);
    panelPat = new PanelPat(dlg, Ent.BODY);
    panelPat.setBounds(new Rectangle(0, 0, 110, 160));
    add(panelPat);
    add(getRegionButton(regionAButton, 110, 0, 34, 30, "RegionA"));
    add(getRegionButton(regionBButton, 110, 32, 34, 30, "RegionB"));
    add(getRegionButton(regionCButton, 110, 64, 34, 30, "RegionC"));

    elevLabel = new JLabel(Messages.getString("Elevation"), SwingConstants.CENTER);
    elevLabel.setBounds(new Rectangle(140, 0, 90, 20));
    add(elevLabel);
    elevBox = new JTextField();
    elevBox.setBounds(new Rectangle(160, 20, 50, 20));
    elevBox.setHorizontalAlignment(SwingConstants.CENTER);
    add(elevBox);
    elevBox.addFocusListener(flElev);

    heightLabel = new JLabel(Messages.getString("Height"), SwingConstants.CENTER);
    heightLabel.setBounds(new Rectangle(140, 40, 90, 20));
    add(heightLabel);
    heightBox = new JTextField();
    heightBox.setBounds(new Rectangle(160, 60, 50, 20));
    heightBox.setHorizontalAlignment(SwingConstants.CENTER);
    add(heightBox);
    heightBox.addFocusListener(flHeight);

    sourceLabel = new JLabel(Messages.getString("Source"), SwingConstants.CENTER);
    sourceLabel.setBounds(new Rectangle(110, 80, 130, 20));
    add(sourceLabel);
    sourceBox = new JTextField();
    sourceBox.setBounds(new Rectangle(110, 100, 130, 20));
    sourceBox.setHorizontalAlignment(SwingConstants.CENTER);
    add(sourceBox);
    sourceBox.addFocusListener(flSource);

    infoLabel = new JLabel(Messages.getString("Information"), SwingConstants.CENTER);
    infoLabel.setBounds(new Rectangle(110, 120, 130, 20));
    add(infoLabel);
    infoBox = new JTextField();
    infoBox.setBounds(new Rectangle(110, 140, 130, 20));
    infoBox.setHorizontalAlignment(SwingConstants.CENTER);
    add(infoBox);
    infoBox.addFocusListener(flInfo);

    statusLabel = new JLabel(Messages.getString("Status"), SwingConstants.CENTER);
    statusLabel.setBounds(new Rectangle(250, 0, 100, 20));
    add(statusLabel);
    statusBox = new JComboBox();
    statusBox.setBounds(new Rectangle(250, 20, 100, 20));
    addStsItem("", Sts.UNKSTS);
    addStsItem(Messages.getString("Permanent"), Sts.PERM);
    addStsItem(Messages.getString("Occasional"), Sts.OCC);
    addStsItem(Messages.getString("Recommended"), Sts.REC);
    addStsItem(Messages.getString("NotInUse"), Sts.NIU);
    addStsItem(Messages.getString("Intermittent"), Sts.INT);
    addStsItem(Messages.getString("Reserved"), Sts.RESV);
    addStsItem(Messages.getString("Temporary"), Sts.TEMP);
    addStsItem(Messages.getString("Private"), Sts.PRIV);
    addStsItem(Messages.getString("Mandatory"), Sts.MAND);
    addStsItem(Messages.getString("Destroyed"), Sts.DEST);
    addStsItem(Messages.getString("Extinguished"), Sts.EXT);
    addStsItem(Messages.getString("Illuminated"), Sts.ILLUM);
    addStsItem(Messages.getString("Historic"), Sts.HIST);
    addStsItem(Messages.getString("Public"), Sts.PUB);
    addStsItem(Messages.getString("Synchronized"), Sts.SYNC);
    addStsItem(Messages.getString("Watched"), Sts.WATCH);
    addStsItem(Messages.getString("UnWatched"), Sts.UNWAT);
    addStsItem(Messages.getString("Doubtful"), Sts.DOUBT);
    add(statusBox);
    statusBox.addActionListener(alStatus);

    constrLabel = new JLabel(Messages.getString("Construction"), SwingConstants.CENTER);
    constrLabel.setBounds(new Rectangle(250, 40, 100, 20));
    add(constrLabel);
    constrBox = new JComboBox();
    constrBox.setBounds(new Rectangle(250, 60, 100, 20));
    addCnsItem("", Cns.UNKCNS);
    addCnsItem(Messages.getString("Masonry"), Cns.BRICK);
    addCnsItem(Messages.getString("Concreted"), Cns.CONC);
    addCnsItem(Messages.getString("Boulders"), Cns.BOULD);
    addCnsItem(Messages.getString("HardSurfaced"), Cns.HSURF);
    addCnsItem(Messages.getString("Unsurfaced"), Cns.USURF);
    addCnsItem(Messages.getString("Wooden"), Cns.WOOD);
    addCnsItem(Messages.getString("Metal"), Cns.METAL);
    addCnsItem(Messages.getString("GRP"), Cns.GLAS);
    addCnsItem(Messages.getString("Painted"), Cns.PAINT);
    add(constrBox);
    constrBox.addActionListener(alConstr);

    conLabel = new JLabel(Messages.getString("Conspicuity"), SwingConstants.CENTER);
    conLabel.setBounds(new Rectangle(250, 80, 100, 20));
    add(conLabel);
    conBox = new JComboBox();
    conBox.setBounds(new Rectangle(250, 100, 100, 20));
    addConItem("", Con.UNKCON);
    addConItem(Messages.getString("Conspicuous"), Con.CONSP);
    addConItem(Messages.getString("NotConspicuous"), Con.NCONS);
    add(conBox);
    conBox.addActionListener(alCon);

    reflLabel = new JLabel(Messages.getString("Reflectivity"), SwingConstants.CENTER);
    reflLabel.setBounds(new Rectangle(250, 120, 100, 20));
    add(reflLabel);
    reflBox = new JComboBox();
    reflBox.setBounds(new Rectangle(250, 140, 100, 20));
    addReflItem("", Con.UNKCON);
    addReflItem(Messages.getString("Conspicuous"), Con.CONSP);
    addReflItem(Messages.getString("NotConspicuous"), Con.NCONS);
    addReflItem(Messages.getString("Reflector"), Con.REFL);
    add(reflBox);
    reflBox.addActionListener(alRefl);
  }