/*
   * Update radio button names in the same order as the table
   */
  private void updateControlPanel() {
    schedule.removeAll();
    noneButton.setName(""); // Name holds schedule id for the selected radio button
    noneButton.setSelected(true);
    commentTextArea.setText(""); // no text for the noneButton
    enableButtons(false);
    schedule.add(noneButton);
    schGroup.add(noneButton);

    for (int i = trainsScheduleModel.getFixedColumn();
        i < trainsScheduleModel.getColumnCount();
        i++) {
      log.debug("Column name: {}", trainsScheduleTable.getColumnName(i));
      TrainSchedule ts =
          trainScheduleManager.getScheduleByName(trainsScheduleTable.getColumnName(i));
      if (ts != null) {
        JRadioButton b = new JRadioButton();
        b.setText(ts.getName());
        b.setName(ts.getId());
        schedule.add(b);
        schGroup.add(b);
        addRadioButtonAction(b);
        if (b.getName().equals(trainManager.getTrainScheduleActiveId())) {
          b.setSelected(true);
          enableButtons(true);
          // update comment field
          commentTextArea.setText(ts.getComment());
        }
      }
    }
    schedule.revalidate();
  }
  private JRadioButton getRdBtnColorField() {
    if (rdBtnColorField == null) {
      rdBtnColorField = new JRadioButton(PluginServices.getText(this, "color_field") + ":");
      rdBtnColorField.setSelected(false);
      rdBtnColorField.setName("RDCOLORFIELD");
    }

    return rdBtnColorField;
  }
  private JRadioButton getRdBtnFixedColor() {
    if (rdBtnFixedColor == null) {
      rdBtnFixedColor = new JRadioButton(PluginServices.getText(this, "fixed_color") + ":");
      rdBtnFixedColor.setSelected(true);
      rdBtnFixedColor.setName("RDFIXEDCOLOR");
    }

    return rdBtnFixedColor;
  }
  private JRadioButton getRdBtnHeightField() {
    if (rdBtnHeightField == null) {
      rdBtnHeightField = new JRadioButton(PluginServices.getText(this, "text_height_field") + ":");
      rdBtnHeightField.setSelected(false);
      rdBtnHeightField.setName("RDHEIGHTFIELD");
    }

    return rdBtnHeightField;
  }
  private JRadioButton getRdBtnFixedHeight() {
    if (rdBtnFixedHeight == null) {
      rdBtnFixedHeight = new JRadioButton(PluginServices.getText(this, "fixed_height") + ":");
      rdBtnFixedHeight.setSelected(true);
      rdBtnFixedHeight.setName("RDFIXEDHEIGHT");
    }

    return rdBtnFixedHeight;
  }
示例#6
0
  private void run() {
    frame = new JFrame("Connection manager");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    ImageIcon img = new ImageIcon("resource/connection.png");
    frame.setIconImage(img.getImage());
    JPanel settings = new JPanel();

    btnAttackerA = new JRadioButton();
    btnAttackerA.setName("Brick A");
    btnAttackerA.addActionListener(attackerBrickListener);
    btnAttackerA.setSelected(true);

    btnAttackerB = new JRadioButton();
    btnAttackerB.setName("Brick B");
    btnAttackerB.addActionListener(attackerBrickListener);

    settings.add(new JLabel("Select attacker:"));
    settings.add(new JLabel("Brick A"));
    settings.add(btnAttackerA);
    settings.add(new JLabel("Brick B"));
    settings.add(btnAttackerB);

    btnConnectA = new JButton("Connect to A");
    btnConnectA.addActionListener(actionListenerConnectA);
    btnConnectA.setSize(100, 50);

    actionA = btnConnectA;
    settings.add(actionA);

    btnConnectB = new JButton("Connect to B");
    btnConnectB.addActionListener(actionListenerConnectB);
    btnConnectB.setSize(100, 50);

    actionB = btnConnectB;
    settings.add(actionB);

    frame.add(settings);
    frame.setSize(400, 100);
    frame.setVisible(true);

    new Thread(serverAttacker).start();
    new Thread(serverDefender).start();
  }
  private void initializeRadioButtons() {
    long serverIssuedExpirationTime = profile.getAccessTokenExpirationTime();
    String serverIssuedExpirationTimeLabel;
    if (serverIssuedExpirationTime > 0) {
      serverIssuedExpirationTimeLabel = getMostLegibleTimeString(serverIssuedExpirationTime);
    } else {
      serverIssuedExpirationTimeLabel = "No expiration.";
    }

    serverExpirationTimeOption =
        new JRadioButton(
            "Use expiration time from authorization server: " + serverIssuedExpirationTimeLabel);
    serverExpirationTimeOption.setName(SERVER_EXPIRATION_RADIO_NAME);
    ActionListener checkBoxMonitor =
        new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent e) {
            timeTextField.setEnabled(manualExpirationTimeOption.isSelected());
            timeUnitCombo.setEnabled(manualExpirationTimeOption.isSelected());
          }
        };
    serverExpirationTimeOption.addActionListener(checkBoxMonitor);

    manualExpirationTimeOption = new JRadioButton("Custom");
    manualExpirationTimeOption.setName(MANUAL_EXPIRATION_RADIO_NAME);
    manualExpirationTimeOption.addActionListener(checkBoxMonitor);

    ButtonGroup buttonGroup = new ButtonGroup();
    buttonGroup.add(serverExpirationTimeOption);
    buttonGroup.add(manualExpirationTimeOption);

    if (profile.useManualAccessTokenExpirationTime()) {
      manualExpirationTimeOption.setSelected(true);
    } else {
      serverExpirationTimeOption.setSelected(true);
    }
  }
示例#8
0
 /* WARNING: THIS METHOD WILL BE REGENERATED. */
 private javax.swing.JRadioButton getFixedRadioButton() {
   if (ivjFixedRadioButton == null) {
     try {
       ivjFixedRadioButton = new javax.swing.JRadioButton();
       ivjFixedRadioButton.setName("FixedRadioButton");
       ivjFixedRadioButton.setPreferredSize(new java.awt.Dimension(150, 20));
       ivjFixedRadioButton.setText("Fixed start values");
       // user code begin {1}
       // user code end
     } catch (Throwable ivjExc) {
       // user code begin {2}
       // user code end
       handleException(ivjExc);
     }
   }
   return ivjFixedRadioButton;
 }
示例#9
0
 /* WARNING: THIS METHOD WILL BE REGENERATED. */
 private javax.swing.JRadioButton getRandomRadioButton() {
   if (ivjRandomRadioButton == null) {
     try {
       ivjRandomRadioButton = new javax.swing.JRadioButton();
       ivjRandomRadioButton.setName("RandomRadioButton");
       ivjRandomRadioButton.setSelected(true);
       ivjRandomRadioButton.setPreferredSize(new java.awt.Dimension(150, 20));
       ivjRandomRadioButton.setText("Draw randomly");
       // user code begin {1}
       // user code end
     } catch (Throwable ivjExc) {
       // user code begin {2}
       // user code end
       handleException(ivjExc);
     }
   }
   return ivjRandomRadioButton;
 }
  /**
   * This method is called from within the constructor to initialize the form. WARNING: Do NOT
   * modify this code. The content of this method is always regenerated by the Form Editor.
   */
  @SuppressWarnings("unchecked")
  private void initComponents() {

    jPanel1 = new JPanel();
    jPanel3 = new JPanel();
    jLabelForBrowseOPCItem = new JLabel();
    jLabelForFilterCondition = new JLabel();
    jTextFieldForFilterCondition = new JTextField();
    jScrollPaneForBrowseOPCItem = new JScrollPane();
    jTree1 = new JTree();
    jScrollPaneForOPCItems = new JScrollPane();
    opcItemsPanel = new JPanel();
    jPanel2 = new JPanel();
    jLabelForAccessPath = new JLabel();
    jTextFieldForAccessPath = new JTextField();
    jLabelForOPCItemName = new JLabel();
    jTextFieldForOPCItemName = new JTextField();
    confirmButton = new JButton();
    cancelButton = new JButton();
    jPanel4 = new JPanel();
    jRadioButtonForNativeType = new JRadioButton();
    jRadioButtonForBool = new JRadioButton();
    jRadioButtonForString = new JRadioButton();
    jRadioButtonForShort = new JRadioButton();
    jRadioButtonForLong = new JRadioButton();
    jRadioButtonForDouble = new JRadioButton();

    varStyleButtonGroup = new ButtonGroup();
    varStyleButtonGroup.add(jRadioButtonForNativeType);
    varStyleButtonGroup.add(jRadioButtonForBool);
    varStyleButtonGroup.add(jRadioButtonForString);
    varStyleButtonGroup.add(jRadioButtonForShort);
    varStyleButtonGroup.add(jRadioButtonForLong);
    varStyleButtonGroup.add(jRadioButtonForDouble);
    varStyleButtonGroup.setSelected(jRadioButtonForNativeType.getModel(), true);
    selectItemButtonGroup = new ButtonGroup();

    setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);

    jLabelForBrowseOPCItem.setText(resourceMap.getString("jLabelForBrowseOPCItem.text"));

    jLabelForFilterCondition.setText(resourceMap.getString("jLabelForFilterCondition.text"));

    jTextFieldForFilterCondition.setColumns(12);
    jTextFieldForFilterCondition.setText(
        resourceMap.getString("jTextFieldForFilterCondition.text"));

    GroupLayout jPanel3Layout = new GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout.setHorizontalGroup(
        jPanel3Layout
            .createParallelGroup(Alignment.LEADING)
            .addGroup(
                jPanel3Layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jLabelForBrowseOPCItem)
                    .addGap(106, 106, 106)
                    .addComponent(jLabelForFilterCondition)
                    .addPreferredGap(ComponentPlacement.UNRELATED)
                    .addComponent(
                        jTextFieldForFilterCondition,
                        GroupLayout.PREFERRED_SIZE,
                        GroupLayout.DEFAULT_SIZE,
                        GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(41, Short.MAX_VALUE)));
    jPanel3Layout.setVerticalGroup(
        jPanel3Layout
            .createParallelGroup(Alignment.LEADING)
            .addGroup(
                jPanel3Layout
                    .createSequentialGroup()
                    .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(
                        jPanel3Layout
                            .createParallelGroup(Alignment.BASELINE)
                            .addComponent(jLabelForBrowseOPCItem)
                            .addComponent(jLabelForFilterCondition)
                            .addComponent(
                                jTextFieldForFilterCondition,
                                GroupLayout.PREFERRED_SIZE,
                                GroupLayout.DEFAULT_SIZE,
                                GroupLayout.PREFERRED_SIZE))
                    .addContainerGap()));

    jScrollPaneForBrowseOPCItem.setName("jScrollPaneForBrowseOPCItem");
    jScrollPaneForBrowseOPCItem.setViewportView(jTree1);

    opcItemsPanel.setBackground(resourceMap.getColor("opcItemsPanel.background"));
    jScrollPaneForOPCItems.setViewportView(opcItemsPanel);

    GroupLayout jPanel1Layout = new GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
        jPanel1Layout
            .createParallelGroup(Alignment.LEADING)
            .addGroup(
                jPanel1Layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(Alignment.LEADING)
                            .addGroup(
                                jPanel1Layout
                                    .createSequentialGroup()
                                    .addComponent(
                                        jScrollPaneForBrowseOPCItem,
                                        GroupLayout.PREFERRED_SIZE,
                                        170,
                                        GroupLayout.PREFERRED_SIZE)
                                    .addGap(18, 18, 18)
                                    .addComponent(
                                        jScrollPaneForOPCItems,
                                        GroupLayout.PREFERRED_SIZE,
                                        150,
                                        GroupLayout.PREFERRED_SIZE))
                            .addComponent(
                                jPanel3,
                                GroupLayout.DEFAULT_SIZE,
                                GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE))
                    .addContainerGap()));
    jPanel1Layout.setVerticalGroup(
        jPanel1Layout
            .createParallelGroup(Alignment.LEADING)
            .addGroup(
                jPanel1Layout
                    .createSequentialGroup()
                    .addComponent(
                        jPanel3, GroupLayout.PREFERRED_SIZE, 37, GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(ComponentPlacement.UNRELATED)
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(Alignment.LEADING)
                            .addComponent(
                                jScrollPaneForOPCItems,
                                GroupLayout.DEFAULT_SIZE,
                                168,
                                Short.MAX_VALUE)
                            .addComponent(
                                jScrollPaneForBrowseOPCItem,
                                GroupLayout.PREFERRED_SIZE,
                                168,
                                GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    jLabelForAccessPath.setText(resourceMap.getString("jLabelForAccessPath.text"));

    jTextFieldForAccessPath.setColumns(25);
    jTextFieldForAccessPath.setText(resourceMap.getString("jTextFieldForAccessPath.text"));

    jLabelForOPCItemName.setText(resourceMap.getString("jLabelForOPCItemName.text"));

    jTextFieldForOPCItemName.setColumns(25);
    jTextFieldForOPCItemName.setText(resourceMap.getString("jTextFieldForOPCItemName.text"));

    confirmButton.setAction(actionMap.get("confirm"));
    cancelButton.setAction(actionMap.get("cancel"));

    GroupLayout jPanel2Layout = new GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(
        jPanel2Layout
            .createParallelGroup(Alignment.LEADING)
            .addGroup(
                jPanel2Layout
                    .createSequentialGroup()
                    .addGap(18, 18, 18)
                    .addGroup(
                        jPanel2Layout
                            .createParallelGroup(Alignment.LEADING)
                            .addComponent(jLabelForOPCItemName)
                            .addComponent(jLabelForAccessPath))
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addGroup(
                        jPanel2Layout
                            .createParallelGroup(Alignment.LEADING)
                            .addComponent(
                                jTextFieldForAccessPath,
                                GroupLayout.PREFERRED_SIZE,
                                GroupLayout.DEFAULT_SIZE,
                                GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                jTextFieldForOPCItemName,
                                GroupLayout.PREFERRED_SIZE,
                                GroupLayout.DEFAULT_SIZE,
                                GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(ComponentPlacement.RELATED, 45, Short.MAX_VALUE)
                    .addGroup(
                        jPanel2Layout
                            .createParallelGroup(Alignment.LEADING)
                            .addComponent(cancelButton)
                            .addComponent(confirmButton))
                    .addContainerGap()));
    jPanel2Layout.setVerticalGroup(
        jPanel2Layout
            .createParallelGroup(Alignment.LEADING)
            .addGroup(
                jPanel2Layout
                    .createSequentialGroup()
                    .addGap(22, 22, 22)
                    .addGroup(
                        jPanel2Layout
                            .createParallelGroup(Alignment.BASELINE)
                            .addComponent(jLabelForAccessPath)
                            .addComponent(
                                jTextFieldForAccessPath,
                                GroupLayout.PREFERRED_SIZE,
                                GroupLayout.DEFAULT_SIZE,
                                GroupLayout.PREFERRED_SIZE)
                            .addComponent(confirmButton))
                    .addPreferredGap(ComponentPlacement.UNRELATED)
                    .addGroup(
                        jPanel2Layout
                            .createParallelGroup(Alignment.BASELINE)
                            .addComponent(jLabelForOPCItemName)
                            .addComponent(
                                jTextFieldForOPCItemName,
                                GroupLayout.PREFERRED_SIZE,
                                GroupLayout.DEFAULT_SIZE,
                                GroupLayout.PREFERRED_SIZE)
                            .addComponent(cancelButton))
                    .addContainerGap(14, Short.MAX_VALUE)));

    jPanel4.setBorder(
        BorderFactory.createTitledBorder(resourceMap.getString("jPanel4.border.title")));

    jRadioButtonForNativeType.setText(resourceMap.getString("jRadioButtonForNativeType.text"));
    jRadioButtonForNativeType.setName(TempOpcItemVariantType.VT_NATIVE);

    jRadioButtonForBool.setText(resourceMap.getString("jRadioButtonForBool.text"));
    jRadioButtonForBool.setName(TempOpcItemVariantType.VT_BOOL);

    jRadioButtonForString.setText(resourceMap.getString("jRadioButtonForString.text"));
    jRadioButtonForString.setName(TempOpcItemVariantType.VT_BSTR);

    jRadioButtonForShort.setText(resourceMap.getString("jRadioButtonForShort.text"));
    jRadioButtonForShort.setName(TempOpcItemVariantType.VT_I2);

    jRadioButtonForLong.setText(resourceMap.getString("jRadioButtonForLong.text"));
    jRadioButtonForLong.setName(TempOpcItemVariantType.VT_I4);

    jRadioButtonForDouble.setText(resourceMap.getString("jRadioButtonForDouble.text"));
    jRadioButtonForDouble.setName(TempOpcItemVariantType.VT_R8);

    GroupLayout jPanel4Layout = new GroupLayout(jPanel4);
    jPanel4.setLayout(jPanel4Layout);
    jPanel4Layout.setHorizontalGroup(
        jPanel4Layout
            .createParallelGroup(Alignment.LEADING)
            .addGroup(
                jPanel4Layout
                    .createSequentialGroup()
                    .addGap(22, 22, 22)
                    .addGroup(
                        jPanel4Layout
                            .createParallelGroup(Alignment.LEADING)
                            .addComponent(jRadioButtonForNativeType)
                            .addComponent(jRadioButtonForBool)
                            .addComponent(jRadioButtonForString))
                    .addGap(53, 53, 53)
                    .addGroup(
                        jPanel4Layout
                            .createParallelGroup(Alignment.LEADING)
                            .addComponent(jRadioButtonForLong)
                            .addComponent(jRadioButtonForShort)
                            .addComponent(jRadioButtonForDouble))
                    .addContainerGap(74, Short.MAX_VALUE)));
    jPanel4Layout.setVerticalGroup(
        jPanel4Layout
            .createParallelGroup(Alignment.LEADING)
            .addGroup(
                jPanel4Layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        jPanel4Layout
                            .createParallelGroup(Alignment.BASELINE)
                            .addComponent(jRadioButtonForNativeType)
                            .addComponent(jRadioButtonForShort))
                    .addPreferredGap(ComponentPlacement.UNRELATED)
                    .addGroup(
                        jPanel4Layout
                            .createParallelGroup(Alignment.BASELINE)
                            .addComponent(jRadioButtonForBool)
                            .addComponent(jRadioButtonForLong))
                    .addPreferredGap(ComponentPlacement.UNRELATED)
                    .addGroup(
                        jPanel4Layout
                            .createParallelGroup(Alignment.BASELINE)
                            .addComponent(jRadioButtonForString)
                            .addComponent(jRadioButtonForDouble))
                    .addContainerGap(19, Short.MAX_VALUE)));

    GroupLayout layout = new GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addGroup(
                        layout
                            .createParallelGroup(Alignment.LEADING)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addGap(20, 20, 20)
                                    .addComponent(
                                        jPanel4,
                                        GroupLayout.PREFERRED_SIZE,
                                        GroupLayout.DEFAULT_SIZE,
                                        GroupLayout.PREFERRED_SIZE))
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addContainerGap()
                                    .addGroup(
                                        layout
                                            .createParallelGroup(Alignment.LEADING)
                                            .addComponent(
                                                jPanel1,
                                                GroupLayout.PREFERRED_SIZE,
                                                GroupLayout.DEFAULT_SIZE,
                                                GroupLayout.PREFERRED_SIZE)
                                            .addComponent(
                                                jPanel2,
                                                GroupLayout.PREFERRED_SIZE,
                                                GroupLayout.DEFAULT_SIZE,
                                                GroupLayout.PREFERRED_SIZE))))
                    .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addComponent(
                        jPanel2,
                        GroupLayout.PREFERRED_SIZE,
                        GroupLayout.DEFAULT_SIZE,
                        GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addComponent(
                        jPanel1,
                        GroupLayout.PREFERRED_SIZE,
                        GroupLayout.DEFAULT_SIZE,
                        GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addComponent(
                        jPanel4,
                        GroupLayout.DEFAULT_SIZE,
                        GroupLayout.DEFAULT_SIZE,
                        Short.MAX_VALUE)
                    .addContainerGap()));

    setTitle(resourceMap.getString("view.title"));
    setResizable(false);
    pack();
  }
  public BiblioSearchLimitPanel(
      DatabankSchema schema, MarcQueryBuilder queryBuilder, int language, SearchUI utils) {
    super(new GridBagLayout(), queryBuilder);
    this.schema = schema;
    this.language = language;
    ButtonGroup g;

    props = PropertyUtils.loadProperties(getClass().getName(), LocaleUtils.getLocale(language));
    GuiUtils.setActionName(dateRangeAction, props.getProperty("date_range.name"));
    GuiUtils.setActionName(yearAction, props.getProperty("year.name"));
    this.utils = utils;

    lblCodingLevel = new JLabel(props.getProperty("coding_level.name"));
    cmCodingLevel = utils.constantTableLookup(SearchEngineDocumentModel.BIBLIO_LEADER_17);
    cmCodingLevel.setName("biblioCodingLevel");
    lblCodingLevel.setLabelFor(cmCodingLevel);

    lblCataloguingForm = new JLabel(props.getProperty("cataloguing_form.name"));
    cmCataloguingForm = utils.constantTableLookup(SearchEngineDocumentModel.BIBLIO_LEADER_18);
    cmCataloguingForm.setName("biblioCataloguingForm");
    lblCataloguingForm.setLabelFor(cmCataloguingForm);

    rBetween = new JRadioButton(props.getProperty("between.name"));
    rBetween.setName("biblioBetweenYears");
    rLt = new JRadioButton(props.getProperty("lt.name"));
    rLt.setName("biblioLessThanYear");
    rGt = new JRadioButton(props.getProperty("gt.name"));
    rGt.setName("biblioGreaterThanYear");
    txfYear = utils.queryTextField(4);
    txfYear.setName("biblioYearEquals");
    rYear = new JRadioButton(yearAction);
    rYear.setName("biblioYear");
    rDateRange = new JRadioButton(dateRangeAction);
    rDateRange.setName("biblioDateRange");
    lblDoctype = new JLabel(props.getProperty("biblio_doctype.name"));
    lblFrom = new JLabel(props.getProperty("from.name"));
    lblTo = new JLabel(props.getProperty("to.name"));
    lblLanguage = new JLabel(props.getProperty("language.name"));
    lblLocation = new JLabel(props.getProperty("location.name"));
    lblRetriveNo = new JLabel(props.getProperty("retriveNo.name"));
    lblRecType = new JLabel(props.getProperty("rectype.name"));
    lblRecStatus = new JLabel(props.getProperty("recstatus.name"));
    lblCalendar = new JLabel(props.getProperty("calendar.name"));
    lblBiblevel = new JLabel(props.getProperty("biblevel.name"));
    lblHierarchicalLevel = new JLabel(props.getProperty("hierarchical_level.name"));
    cmDoctype = utils.constantTableLookup(SearchEngineDocumentModel.BIBLIO_DOC_TYPE);
    cmDoctype.setName("biblioDocType");
    cmLocation = utils.constantTableLookup(SearchEngineDocumentModel.LOCATION);
    cmLocation.setName("biblioLocation");
    cmLanguage = utils.constantTableLookup(SearchEngineDocumentModel.LANGUAGE);
    cmLanguage.setName("biblioLanguage");
    cmBiblevel = utils.constantTableLookup(SearchEngineDocumentModel.BIBLIO_LEADER_7);
    cmBiblevel.setName("biblioLevel");
    cmHierarchicalLevel = utils.constantTableLookup(SearchEngineDocumentModel.BIBLIO_LEADER_8);
    cmHierarchicalLevel.setName("biblioHierarchicalLevel");
    cmRecType = utils.constantTableLookup(SearchEngineDocumentModel.BIBLIO_LEADER_6);
    cmRecType.setName("biblioRecType");
    cmRecStatus = utils.constantTableLookup(SearchEngineDocumentModel.BIBLIO_LEADER_5);
    cmRecStatus.setName("biblioRecStatus");
    cmCalendar = utils.constantTableLookup(SearchEngineDocumentModel.CALENDAR);
    cmCalendar.setName("biblioCalendar");
    txfFrom = utils.queryTextField(10);
    txfFrom.setName("biblioFromYear");
    txfTo = utils.queryTextField(10);
    txfTo.setName("biblioToYear");
    txfRetriveNo = utils.queryTextField(10);
    txfRetriveNo.setName("retriveNo");
    lblDoctype.setLabelFor(cmDoctype);
    lblLocation.setLabelFor(cmLocation);
    lblLanguage.setLabelFor(cmLanguage);
    lblFrom.setLabelFor(txfFrom);
    lblTo.setLabelFor(txfTo);
    lblRetriveNo.setLabelFor(txfRetriveNo);
    lblTo.setVerticalTextPosition(JLabel.BOTTOM);
    lblCalendar.setHorizontalAlignment(JLabel.TRAILING);
    lblLanguage.setHorizontalAlignment(JLabel.TRAILING);
    lblRecType.setHorizontalAlignment(JLabel.TRAILING);
    lblDoctype.setHorizontalAlignment(JLabel.TRAILING);
    lblLocation.setHorizontalAlignment(JLabel.TRAILING);
    cbHasAttachment = new JCheckBox(props.getProperty("attachment.name"));
    cbIsOpenShelf = new JCheckBox(props.getProperty("openShelf.name"));
    cbIsLendable = new JCheckBox(props.getProperty("lendable.name"));
    rWithAttachment = new JRadioButton(props.getProperty("attachment-present.name"));
    rWithoutAttachment = new JRadioButton(props.getProperty("attachment-notpresent.name"));
    cbHasAttachment.setName("biblioAttachment");
    cbIsOpenShelf.setName("holdingIsOpenShelf");
    cbIsLendable.setName("holdingIsLendable");
    rWithAttachment.setName("biblioAttachmentPresent");
    rWithoutAttachment.setName("biblioAttachmentNotPresent");
    cbHasAttachment.addChangeListener(attachmentChangedListener);
    rWithAttachment.setEnabled(false);
    rWithoutAttachment.setEnabled(false);
    cbHasAttachment.setSelected(false);
    cbIsOpenShelf.setSelected(false);
    cbIsLendable.setSelected(false);
    g = new ButtonGroup();
    g.add(rWithAttachment);
    g.add(rWithoutAttachment);

    g = new ButtonGroup();
    g.add(rBetween);
    g.add(rLt);
    g.add(rGt);
    g = new ButtonGroup();
    g.add(rDateRange);
    g.add(rYear);
    rYear.setSelected(true);
    dateCriteriaChanged();

    lblDescriptionLevel = new JLabel(props.getProperty("level-of-description.name"));
    cmDescriptionLevel =
        utils.constantTableLookup(SearchEngineDocumentModel.BIBLIO_ISAD_LEVEL_OF_DESCRIPTION);
    cmDescriptionLevel.setName("biblioDescriptionLevel");
    lblDescriptionLevel.setLabelFor(cmDescriptionLevel);

    lblGMD = new JLabel(props.getProperty("general-material.name"));
    cmGMD = utils.constantTableLookup(SearchEngineDocumentModel.BIBLIO_GMD_LIST);
    cmGMD.setName("biblioGMD");
    lblGMD.setLabelFor(cmGMD);

    lblLCClass = new JLabel(props.getProperty("lcclass.name"));
    txfLCClass = new JTextField(20);
    GuiUtils.localeSupport(txfLCClass);
    GuiUtils.setComponentOrientation(txfLCClass, ComponentOrientation.LEFT_TO_RIGHT);
    lblLCClass.setLabelFor(txfLCClass);

    LayoutFacility lf = new LayoutFacility(this);
    /*
            lf.add(lblCodingLevel,
                    new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.HORIZONTAL, new Insets(2, 2, 2, 2), 0, 0));
            lf.add(cmCodingLevel,
                    new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.NONE, new Insets(2, 2, 2, 2), 0, 0));
    */
    int y = 0;
    lf.add(
        lblDoctype,
        new GridBagConstraints(
            0,
            y,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        cmDoctype,
        new GridBagConstraints(
            1,
            y,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        lblRecType,
        new GridBagConstraints(
            2,
            y,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_END,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        cmRecType,
        new GridBagConstraints(
            3,
            y++,
            GridBagConstraints.REMAINDER,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        lblGMD,
        new GridBagConstraints(
            0,
            y,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_END,
            GridBagConstraints.NONE,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        cmGMD,
        new GridBagConstraints(
            1,
            y++,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));

    lf.add(
        lblLocation,
        new GridBagConstraints(
            0,
            y,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        cmLocation,
        new GridBagConstraints(
            1,
            y,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        lblLanguage,
        new GridBagConstraints(
            2,
            y,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        cmLanguage,
        new GridBagConstraints(
            3,
            y,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        lblBiblevel,
        new GridBagConstraints(
            4,
            y,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        cmBiblevel,
        new GridBagConstraints(
            5,
            y++,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    ////
    lf.add(
        lblCataloguingForm,
        new GridBagConstraints(
            0,
            y,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        cmCataloguingForm,
        new GridBagConstraints(
            1,
            y,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        lblHierarchicalLevel,
        new GridBagConstraints(
            2,
            y,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        cmHierarchicalLevel,
        new GridBagConstraints(
            3,
            y,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        lblRecStatus,
        new GridBagConstraints(
            4,
            y,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        cmRecStatus,
        new GridBagConstraints(
            5,
            y++,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    ////
    lf.add(
        lblCodingLevel,
        new GridBagConstraints(
            4,
            y,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        cmCodingLevel,
        new GridBagConstraints(
            5,
            y,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.NONE,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        rYear,
        new GridBagConstraints(
            0,
            y,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.FIRST_LINE_START,
            GridBagConstraints.NONE,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        txfYear,
        new GridBagConstraints(
            1,
            y,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.FIRST_LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        lblCalendar,
        new GridBagConstraints(
            2,
            y,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.FIRST_LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    lf.add(
        cmCalendar,
        new GridBagConstraints(
            3,
            y++,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.FIRST_LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));

    lf.add(
        rDateRange,
        new GridBagConstraints(
            0,
            y,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.FIRST_LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));

    LayoutFacility datelf = new LayoutFacility(new JPanel());
    datelf.add(
        lblFrom,
        new GridBagConstraints(
            1,
            1,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.NONE,
            new Insets(2, 5, 2, 5),
            0,
            0));
    datelf.add(
        txfFrom,
        new GridBagConstraints(
            2,
            1,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    datelf.add(
        rGt,
        new GridBagConstraints(
            3,
            1,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.NONE,
            new Insets(2, 2, 2, 2),
            0,
            0));
    datelf.add(
        rBetween,
        new GridBagConstraints(
            4,
            1,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.NONE,
            new Insets(2, 2, 2, 2),
            0,
            0));
    datelf.add(
        rLt,
        new GridBagConstraints(
            5,
            1,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.NONE,
            new Insets(2, 2, 2, 2),
            0,
            0));
    datelf.add(
        lblTo,
        new GridBagConstraints(
            6,
            1,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.NONE,
            new Insets(2, 5, 2, 5),
            0,
            0));
    datelf.add(
        txfTo,
        new GridBagConstraints(
            7,
            1,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    datelf.add(
        Box.createHorizontalGlue(),
        new GridBagConstraints(
            8,
            1,
            GridBagConstraints.REMAINDER,
            1,
            1.0,
            0.0,
            GridBagConstraints.LINE_END,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));

    lf.add(
        datelf.container,
        new GridBagConstraints(
            1,
            y++,
            GridBagConstraints.REMAINDER,
            1,
            1.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));

    LayoutFacility lcClasslf = new LayoutFacility(new JPanel());
    lcClasslf.add(
        lblLCClass,
        new GridBagConstraints(
            1,
            1,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.NONE,
            new Insets(2, 5, 2, 5),
            0,
            0));
    lcClasslf.add(
        txfLCClass,
        new GridBagConstraints(
            2,
            1,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));

    lf.add(
        lcClasslf.container,
        new GridBagConstraints(
            0,
            y++,
            2,
            1,
            1.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));

    LayoutFacility attLf = LayoutFacility.createLayoutFacility();
    int x = 0;
    attLf.add(
        cbHasAttachment,
        new GridBagConstraints(
            x++,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.NONE,
            new Insets(2, 2, 2, 2),
            0,
            0));
    attLf.add(
        cbIsOpenShelf,
        new GridBagConstraints(
            x++,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.NONE,
            new Insets(2, 2, 2, 2),
            0,
            0));
    //        attLf.add(cbIsLendable,
    //        		new GridBagConstraints(x++, 0, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START,
    // GridBagConstraints.NONE, new Insets(2, 2, 2, 10), 0, 0));
    attLf.add(
        lblRetriveNo,
        new GridBagConstraints(
            x++,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.NONE,
            new Insets(2, 20, 2, 2),
            0,
            0));
    attLf.add(
        txfRetriveNo,
        new GridBagConstraints(
            x++,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.NONE,
            new Insets(2, 2, 2, 2),
            25,
            0));

    if (SystemUtils.isISADAvailable()) {
      attLf.add(
          lblDescriptionLevel,
          new GridBagConstraints(
              x++,
              0,
              1,
              1,
              0.0,
              0.0,
              GridBagConstraints.LINE_START,
              GridBagConstraints.HORIZONTAL,
              new Insets(2, 20, 2, 2),
              0,
              0));
      attLf.add(
          cmDescriptionLevel,
          new GridBagConstraints(
              x++,
              0,
              1,
              1,
              0.0,
              0.0,
              GridBagConstraints.LINE_START,
              GridBagConstraints.NONE,
              new Insets(2, 2, 2, 2),
              0,
              0));
    }

    /*
            attLf.add(rWithAttachment,
                    new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.NONE, new Insets(2, 2, 2, 2), 0, 0));
            attLf.add(rWithoutAttachment,
                    new GridBagConstraints(2, 0, 1, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.NONE, new Insets(2, 2, 2, 2), 0, 0));
    */

    lf.add(
        attLf.container,
        new GridBagConstraints(
            0,
            y,
            GridBagConstraints.REMAINDER,
            1,
            0.0,
            0.0,
            GridBagConstraints.LINE_START,
            GridBagConstraints.NONE,
            new Insets(2, 2, 2, 2),
            0,
            0));
    //        lf.add(Box.createHorizontalGlue(),
    //                new GridBagConstraints(1, 4, 0, 1, 0.0, 0.0, GridBagConstraints.LINE_START,
    // GridBagConstraints.HORIZONTAL, new Insets(2, 2, 2, 2), 0, 0));

    ChangeListener limitChangeListener =
        new ChangeListener() {
          public void stateChanged(ChangeEvent e) {
            txfFrom.setEditable(!rLt.isSelected() && rDateRange.isSelected());
            txfTo.setEditable(!rGt.isSelected() && rDateRange.isSelected());
          }
        };
    rGt.addChangeListener(limitChangeListener);
    rLt.addChangeListener(limitChangeListener);
    rBetween.addChangeListener(limitChangeListener);
    rGt.setSelected(true);
  }
示例#12
0
  public static void main(String args[]) {
    JRadioButton rb = new JRadioButton();
    rb.getAccessibleContext();
    rb.isFocusTraversable();
    rb.setEnabled(false);
    rb.setEnabled(true);
    rb.requestFocus();
    rb.requestFocusInWindow();
    rb.getPreferredSize();
    rb.getMaximumSize();
    rb.getMinimumSize();
    rb.contains(1, 2);
    Component c1 = rb.add(new Component() {});
    Component c2 = rb.add(new Component() {});
    Component c3 = rb.add(new Component() {});
    Insets ins = rb.getInsets();
    rb.getAlignmentY();
    rb.getAlignmentX();
    rb.getGraphics();
    rb.setVisible(false);
    rb.setVisible(true);
    rb.setForeground(Color.red);
    rb.setBackground(Color.red);
    for (String font : Toolkit.getDefaultToolkit().getFontList()) {
      for (int j = 8; j < 17; j++) {
        Font f1 = new Font(font, Font.PLAIN, j);
        Font f2 = new Font(font, Font.BOLD, j);
        Font f3 = new Font(font, Font.ITALIC, j);
        Font f4 = new Font(font, Font.BOLD | Font.ITALIC, j);

        rb.setFont(f1);
        rb.setFont(f2);
        rb.setFont(f3);
        rb.setFont(f4);

        rb.getFontMetrics(f1);
        rb.getFontMetrics(f2);
        rb.getFontMetrics(f3);
        rb.getFontMetrics(f4);
      }
    }
    rb.enable();
    rb.disable();
    rb.reshape(10, 10, 10, 10);
    rb.getBounds(new Rectangle(1, 1, 1, 1));
    rb.getSize(new Dimension(1, 2));
    rb.getLocation(new Point(1, 2));
    rb.getX();
    rb.getY();
    rb.getWidth();
    rb.getHeight();
    rb.isOpaque();
    rb.isValidateRoot();
    rb.isOptimizedDrawingEnabled();
    rb.isDoubleBuffered();
    rb.getComponentCount();
    rb.countComponents();
    rb.getComponent(1);
    rb.getComponent(2);
    Component[] cs = rb.getComponents();
    rb.getLayout();
    rb.setLayout(new FlowLayout());
    rb.doLayout();
    rb.layout();
    rb.invalidate();
    rb.validate();
    rb.remove(0);
    rb.remove(c2);
    rb.removeAll();
    rb.preferredSize();
    rb.minimumSize();
    rb.getComponentAt(1, 2);
    rb.locate(1, 2);
    rb.getComponentAt(new Point(1, 2));
    rb.isFocusCycleRoot(new Container());
    rb.transferFocusBackward();
    rb.setName("goober");
    rb.getName();
    rb.getParent();
    rb.getGraphicsConfiguration();
    rb.getTreeLock();
    rb.getToolkit();
    rb.isValid();
    rb.isDisplayable();
    rb.isVisible();
    rb.isShowing();
    rb.isEnabled();
    rb.enable(false);
    rb.enable(true);
    rb.enableInputMethods(false);
    rb.enableInputMethods(true);
    rb.show();
    rb.show(false);
    rb.show(true);
    rb.hide();
    rb.getForeground();
    rb.isForegroundSet();
    rb.getBackground();
    rb.isBackgroundSet();
    rb.getFont();
    rb.isFontSet();
    Container c = new Container();
    c.add(rb);
    rb.getLocale();
    for (Locale locale : Locale.getAvailableLocales()) rb.setLocale(locale);

    rb.getColorModel();
    rb.getLocation();

    boolean exceptions = false;
    try {
      rb.getLocationOnScreen();
    } catch (IllegalComponentStateException e) {
      exceptions = true;
    }
    if (!exceptions)
      throw new RuntimeException("IllegalComponentStateException did not occur when expected");

    rb.location();
    rb.setLocation(1, 2);
    rb.move(1, 2);
    rb.setLocation(new Point(1, 2));
    rb.getSize();
    rb.size();
    rb.setSize(1, 32);
    rb.resize(1, 32);
    rb.setSize(new Dimension(1, 32));
    rb.resize(new Dimension(1, 32));
    rb.getBounds();
    rb.bounds();
    rb.setBounds(10, 10, 10, 10);
    rb.setBounds(new Rectangle(10, 10, 10, 10));
    rb.isLightweight();
    rb.setCursor(new Cursor(Cursor.CROSSHAIR_CURSOR));
    rb.getCursor();
    rb.isCursorSet();
    rb.inside(1, 2);
    rb.contains(new Point(1, 2));
    rb.isFocusable();
    rb.setFocusable(true);
    rb.setFocusable(false);
    rb.transferFocus();
    rb.getFocusCycleRootAncestor();
    rb.nextFocus();
    rb.transferFocusUpCycle();
    rb.hasFocus();
    rb.isFocusOwner();
    rb.toString();
    rb.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
    rb.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
    rb.setComponentOrientation(ComponentOrientation.UNKNOWN);
    rb.getComponentOrientation();
  }