/** * Sets the resources on a {@link JLabel}. It sets the text, mnemonic, * and labelFor property. * * @param label The Label on which to set the properties * @param labelFor the {@link Component} to set with the * <code>labelFor</code> property on the <code>label</code>. * @param labelText The text label to set on the <code>label</code> * @see JLabel#setText(String) * @see JLabel#setLabelFor(Component) * @see JLabel#setDisplayedMnemonic(int) */ public static void resLabel(JLabel label, Component labelFor, String labelText) { label.setText(stripMnemonic(labelText)); if (Spark.isWindows()) { label.setDisplayedMnemonic(getMnemonicKeyCode(labelText)); } label.setLabelFor(labelFor); }
private void jbInit() throws Exception { this.setLayout(gridBagLayout1); this.add(confirmPasswordField, new GridBagConstraints(1, 4, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); this.add(passwordField, new GridBagConstraints(1, 3, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); this.add(topicField, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); this.add(nameField, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); this.add(privateCheckbox, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); this.add(permanentCheckBox, new GridBagConstraints(0, 5, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); this.add(confirmPasswordLabel, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); this.add(passwordLabel, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); this.add(topicLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 5, 0)); this.add(nameLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); ResourceUtils.resLabel(nameLabel, nameField, Res.getString("label.room.name")); ResourceUtils.resLabel(topicLabel, topicField, Res.getString("label.room.topic") + ":"); ResourceUtils.resLabel(passwordLabel, passwordField, Res.getString("label.password") + ":"); ResourceUtils.resLabel(confirmPasswordLabel, confirmPasswordField, Res.getString("label.confirm.password") + ":"); ResourceUtils.resButton(permanentCheckBox, Res.getString("checkbox.permanent")); ResourceUtils.resButton(privateCheckbox, Res.getString("checkbox.private.room")); }
/** * Creates and displays the new confirm dialog. * * @param parent the parent dialog. * @param title the title of this dialog. * @param text the main text to display. * @param yesText the text to use on the OK or Yes button. * @param noText the text to use on the No button. * @param icon the icon to use for graphical represenation. */ public void showConfirmDialog(JFrame parent, String title, String text, String yesText, String noText, Icon icon) { message.setText("<html><body>" + text + "</body></html>"); iconLabel.setIcon(icon); ResourceUtils.resButton(yesButton, yesText); ResourceUtils.resButton(noButton, noText); dialog = new JDialog(parent, title, false); dialog.getContentPane().setLayout(new BorderLayout()); dialog.getContentPane().add(this); dialog.pack(); dialog.setLocationRelativeTo(parent); dialog.setVisible(true); dialog.addWindowListener(new WindowAdapter() { public void windowClosed(WindowEvent windowEvent) { if (listener != null) { listener.noOption(); } } }); }
/** * Creates a new instance of the RosterBrowser. */ public RosterPickList() { setLayout(new GridBagLayout()); rosterList.setCellRenderer(new JContactItemRenderer()); JLabel rosterLabel = new JLabel(); this.add(rosterLabel, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); this.add(new JScrollPane(rosterList), new GridBagConstraints(0, 1, 1, 1, 1.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 0, 0)); ResourceUtils.resLabel(rosterLabel, rosterList, Res.getString("label.available.users.in.roster")); }
private void createUI() { setLayout(new VerticalFlowLayout()); ResourceUtils.resButton(highlightMyName , Res.getString("menuitem.add.groupchat.myname")); ResourceUtils.resButton(highlightMyText , Res.getString("menuitem.add.groupchat.mytext")); ResourceUtils.resButton(highlightPopName , Res.getString("menuitem.add.groupchat.popname")); ResourceUtils.resButton(showjoinleavemessage , Res.getString("menuitem.add.groupchat.showjoinleavemessage")); ResourceUtils.resButton(showroleicons , Res.getString("menuitem.add.groupchat.showrolesinsteadofstatus")); ResourceUtils.resButton(_autoAcceptInvites , Res.getString("menuitem.add.groupchat.auto.accept.invite")); ResourceUtils.resButton(_randomcolors , Res.getString("menuitem.add.groupchat.random.colors")); ResourceUtils.resButton(inviteToBookmark , Res.getString("menuitem.add.groupchat.invitetobookmark")); gCPanel.setBorder(BorderFactory.createTitledBorder(Res.getString("title.group.chat.settings"))); add(gCPanel); gCPanel.setLayout(new GridBagLayout()); gCPanel.add(highlightMyName , new GridBagConstraints(0, 0, 2, 1, 1.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); gCPanel.add(highlightMyText , new GridBagConstraints(0, 1, 2, 1, 1.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); gCPanel.add(_randomcolors , new GridBagConstraints(0, 2, 2, 1, 1.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); gCPanel.add(highlightPopName , new GridBagConstraints(0, 3, 2, 1, 1.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); gCPanel.add(showjoinleavemessage, new GridBagConstraints(0, 4, 2, 1, 1.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); gCPanel.add(showroleicons , new GridBagConstraints(0, 5, 2, 1, 1.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); gCPanel.add(_autoAcceptInvites , new GridBagConstraints(0, 6, 2, 1, 1.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); gCPanel.add(inviteToBookmark , new GridBagConstraints(0, 7, 2, 1, 1.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); }
public JoinConferenceRoomDialog() { GridBagLayout gridBagLayout1 = new GridBagLayout(); setLayout( gridBagLayout1 ); add(nicknameField, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); add(passwordField, new GridBagConstraints(1, 2, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); add(passwordLabel, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); JLabel nicknameLabel = new JLabel(); add( nicknameLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); JLabel roomNameLabel = new JLabel(); add( roomNameLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(roomNameDescription, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); add(new JLabel(), new GridBagConstraints(0, 3, 2, 1, 0.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.VERTICAL, new Insets(5, 5, 5, 5), 0, 0)); // Add Resource Utils ResourceUtils.resLabel( nicknameLabel, nicknameField, Res.getString("label.nickname") + ":"); ResourceUtils.resLabel(passwordLabel, passwordField, Res.getString("label.password") + ":"); roomNameLabel.setText(Res.getString("room.name") +":"); }
public FileTransferPreferencePanel() { setLayout(new GridBagLayout()); setBorder(BorderFactory.createTitledBorder(Res.getString("title.file.transfer.preferences"))); timeoutField = new JTextField(); downloadDirectoryField = new JTextField(); ibbOnly = new JCheckBox(); JLabel timeoutLabel = new JLabel(); JLabel downloadDirectoryLabel = new JLabel(); ResourceUtils.resLabel(timeoutLabel, timeoutField, Res.getString("label.transfer.timeout")); ResourceUtils.resLabel(downloadDirectoryLabel, downloadDirectoryField, Res.getString("label.transfer.download.directory")); ResourceUtils.resButton(ibbOnly, Res.getString("checkbox.filetransfer.ibb.only")); add(ibbOnly, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(timeoutLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(timeoutField, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 100, 0)); add(downloadDirectoryLabel, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(downloadDirectoryField, new GridBagConstraints(1, 2, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); final JButton button = new JButton(); ResourceUtils.resButton(button, Res.getString("button.browse")); add(button, new GridBagConstraints(2, 2, 1, 1, 0.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); button.addActionListener( e -> pickFile(Res.getString("title.choose.directory"), downloadDirectoryField) ); }
/** * Default Constructor */ public AvatarPanel() { setLayout(new GridBagLayout()); final JLabel photo = new JLabel(Res.getString("label.avatar")); avatar = new JLabel(); add(photo, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(avatar, new GridBagConstraints(1, 0, 1, 2, 1.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(browseButton, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(clearButton, new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); browseButton.addActionListener(this); // Add ResourceUtils ResourceUtils.resButton(browseButton, Res.getString("button.browse")); ResourceUtils.resButton(clearButton, Res.getString("button.clear")); clearButton.addActionListener( actionEvent -> { avatar.setIcon(null); bytes = null; avatarFile = null; avatar.setBorder(null); } ); avatar.setText(Res.getString("message.no.avatar.found")); GraphicUtils.makeSameSize(browseButton, clearButton); }
/** * Sets the resources on a subclass of {@link AbstractButton}. The common * classes are {@link javax.swing.JRadioButton}, {@link javax.swing.JButton}, * and {@link javax.swing.JCheckBox} * <p/> * This method sets the text and mnemonic. * * @param button The button on which to set the text and mnemonoic * @param labelText the text which contains the displayed text and mnemonic * @see AbstractButton#setText(String) * @see AbstractButton#setMnemonic(int) */ public static void resButton(RolloverButton button, String labelText) { button.setText(stripMnemonic(labelText)); if (Spark.isWindows()) { button.setMnemonic(getMnemonicKeyCode(labelText)); } }
ResourceUtils.resLabel(firstNameLabel, firstNameField, Res.getString("label.first.name") + ":"); ResourceUtils.resLabel(middleNameLabel, middleNameField, Res.getString("label.middle.name") + ":"); add(middleNameLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(middleNameField, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); ResourceUtils.resLabel(lastNameLabel, lastNameField, Res.getString("label.last.name") + ":"); add(lastNameLabel, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(lastNameField, new GridBagConstraints(1, 2, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); ResourceUtils.resLabel(nicknameLabel, nicknameField, Res.getString("label.nickname") + ":"); add(nicknameLabel, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(nicknameField, new GridBagConstraints(1, 4, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); ResourceUtils.resLabel(emaiAddressLabel, emailAddressField, Res.getString("label.email.address") + ":"); add(emaiAddressLabel, new GridBagConstraints(0, 5, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(emailAddressField, new GridBagConstraints(1, 5, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); ResourceUtils.resLabel(jidLabel, jidField, Res.getString("label.jid") + ":"); add(jidLabel, new GridBagConstraints(0, 6, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(jidField, new GridBagConstraints(1, 6, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
ResourceUtils.resLabel( usernameLabel, nicknameField, Res.getString("label.username") + ":"); JLabel nicknameLabel = new JLabel(); ResourceUtils.resLabel( nicknameLabel, nicknameField, Res.getString("label.nickname") + ":"); JLabel groupLabel = new JLabel(); ResourceUtils.resLabel( groupLabel, groupBox, Res.getString("label.group") + ":"); ResourceUtils.resButton(acceptButton, Res.getString("button.accept")); ResourceUtils.resButton(viewInfoButton, Res.getString("button.profile")); ResourceUtils.resButton(denyButton, Res.getString("button.deny"));
public SoundPanel() { setLayout(new GridBagLayout()); setBorder(BorderFactory.createTitledBorder(Res.getString("title.sound.preferences"))); // Add ResourceUtils ResourceUtils.resButton(incomingMessageBox, Res.getString("checkbox.play.sound.on.new.message")); ResourceUtils.resButton(outgoingMessageBox, Res.getString("checkbox.play.sound.on.outgoing.message")); ResourceUtils.resButton(userOfflineCheckbox, Res.getString("checkbox.play.sound.when.offline")); ResourceUtils.resButton(incomingInvitationBox, Res.getString("checkbox.play.sound.on.invitation")); // Handle incoming sounds add(incomingMessageBox, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(incomingMessageSound, new GridBagConstraints(0, 1, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); add(incomingBrowseButton, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); // Handle sending sounds add(outgoingMessageBox, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(outgoingMessageSound, new GridBagConstraints(0, 3, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); add(outgoingBrowseButton, new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); // Handle User Online Sound add(userOfflineCheckbox, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(userOfflineField, new GridBagConstraints(0, 5, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); add(offlineBrowseButton, new GridBagConstraints(1, 5, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); // Handle Invitation Sound add(incomingInvitationBox, new GridBagConstraints(0, 6, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(incomingInvitationField, new GridBagConstraints(0, 7, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); add(incomingInvitationBrowseButton, new GridBagConstraints(1, 7, 1, 1, 0.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); incomingBrowseButton.addActionListener( e -> pickFile(Res.getString("title.choose.incoming.sound"), incomingMessageSound) ); outgoingBrowseButton.addActionListener( e -> pickFile(Res.getString("title.choose.outgoing.sound"), outgoingMessageSound) ); offlineBrowseButton.addActionListener( e -> pickFile(Res.getString("title.choose.offline.sound"), userOfflineField) ); incomingInvitationBrowseButton.addActionListener( e -> pickFile(Res.getString("title.choose.incoming.sound"), incomingInvitationField) ); }
/** * Sets the resources on a subclass of {@link AbstractButton}. The common * classes are {@link javax.swing.JRadioButton}, {@link javax.swing.JButton}, * and {@link javax.swing.JCheckBox} * <p/> * This method sets the text and mnemonic. * * @param button The button on which to set the text and mnemonoic * @param labelText the text which contains the displayed text and mnemonic * @see AbstractButton#setText(String) * @see AbstractButton#setMnemonic(int) */ public static void resButton(AbstractButton button, String labelText) { button.setText(stripMnemonic(labelText)); if (Spark.isWindows()) { button.setMnemonic(getMnemonicKeyCode(labelText)); } }
ResourceUtils.resLabel( streetLabel, streetField, Res.getString("label.street.address") + ":"); JLabel cityLabel = new JLabel(); ResourceUtils.resLabel( cityLabel, cityField, Res.getString("label.city") + ":"); JLabel stateLabel = new JLabel(); ResourceUtils.resLabel( stateLabel, stateField, Res.getString("label.state.and.province") + ":"); JLabel zipCodeLabel = new JLabel(); ResourceUtils.resLabel( zipCodeLabel, zipCodeField, Res.getString("label.postal.code") + ":"); JLabel countryLabel = new JLabel(); ResourceUtils.resLabel( countryLabel, countryField, Res.getString("label.country") + ":"); ResourceUtils.resLabel( phoneLabel, phoneField, Res.getString("label.phone") + ":"); JLabel faxLabel = new JLabel(); ResourceUtils.resLabel( faxLabel, faxField, Res.getString("label.fax") + ":"); JLabel mobileLabel = new JLabel(); ResourceUtils.resLabel( mobileLabel, mobileField, Res.getString("label.mobile") + ":"); JLabel pagerLabel = new JLabel(); ResourceUtils.resLabel( pagerLabel, pagerField, Res.getString("label.pager") + ":");
ResourceUtils.resLabel( usernameLabel, usernameField, Res.getString("label.username") + ":"); JLabel passwordLabel = new JLabel(); ResourceUtils.resLabel( passwordLabel, passwordField, Res.getString("label.password") + ":"); JLabel confirmPasswordLabel = new JLabel(); ResourceUtils.resLabel( confirmPasswordLabel, confirmPasswordField, Res.getString("label.confirm.password") + ":"); JLabel serverLabel = new JLabel(); ResourceUtils.resLabel( serverLabel, serverField, Res.getString("label.server") + ":"); ResourceUtils.resButton(createAccountButton, Res.getString("button.create.account")); ResourceUtils.resButton( closeButton, Res.getString("button.close")); add( closeButton, new GridBagConstraints(3, 5, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
/** * Creates a new IconTextField with Icon. * * @param text the text to use on the button. */ public ChatAreaSendField(String text) { setLayout(new GridBagLayout()); setBackground((Color)UIManager.get("TextPane.background")); textField = new ChatInputEditor(); textField.setBorder(null); setBorder(BorderFactory.createMatteBorder(1, 1, 1, 1, Color.lightGray)); button = new JButton(); if (Spark.isMac()) { button.setContentAreaFilled(false); } ResourceUtils.resButton(button, text); add(button, new GridBagConstraints(1, 0, 1, 1, 0.0, 1.0, GridBagConstraints.EAST, GridBagConstraints.VERTICAL, new Insets(2, 2, 2, 2), 0, 0)); button.setVisible(false); final JScrollPane pane = new JScrollPane(textField); pane.setBorder(null); add(pane, new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(2, 2, 2, 2), 0, 0)); button.setEnabled(false); }
ResourceUtils.resLabel( companyLabel, companyField, Res.getString("label.company") + ":"); JLabel streetLabel = new JLabel(); ResourceUtils.resLabel( streetLabel, streetField, Res.getString("label.street.address") + ":"); JLabel cityLabel = new JLabel(); ResourceUtils.resLabel( cityLabel, cityField, Res.getString("label.city") + ":"); JLabel stateLabel = new JLabel(); ResourceUtils.resLabel( stateLabel, stateField, Res.getString("label.state.and.province") + ":"); JLabel zipCodeLabel = new JLabel(); ResourceUtils.resLabel( zipCodeLabel, zipCodeField, Res.getString("label.postal.code") + ":"); JLabel countryLabel = new JLabel(); ResourceUtils.resLabel( countryLabel, countryField, Res.getString("label.country") + ":"); ResourceUtils.resLabel( jobTitleLabel, jobTitleField, Res.getString("label.job.title") + ":"); JLabel departmentLabel = new JLabel(); ResourceUtils.resLabel( departmentLabel, departmentField, Res.getString("label.department") + ":"); JLabel phoneLabel = new JLabel(); ResourceUtils.resLabel( phoneLabel, phoneField, Res.getString("label.phone") + ":"); JLabel faxLabel = new JLabel(); ResourceUtils.resLabel( faxLabel, faxField, Res.getString("label.fax") + ":"); JLabel mobileLabel = new JLabel(); ResourceUtils.resLabel( mobileLabel, mobileField, Res.getString("label.mobile") + ":"); JLabel webPageLabel = new JLabel(); ResourceUtils.resLabel( webPageLabel, webPageField, Res.getString("label.web.page") + ":"); JLabel pagerLabel = new JLabel(); ResourceUtils.resLabel( pagerLabel, pagerField, Res.getString("label.pager") + ":");
ResourceUtils.resButton(offlineNotificationBox, Res.getString("checkbox.notify.user.goes.offline")); pn_OnOffNotifications.add(offlineNotificationBox, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); ResourceUtils.resButton(onlineNotificationBox, Res.getString("checkbox.notify.user.comes.online")); pn_OnOffNotifications.add(onlineNotificationBox, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); ResourceUtils.resButton(toasterBox, Res.getString("checkbox.show.toaster")); pn.add(toasterBox, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); ResourceUtils.resButton(asteriskToasterBox, Res.getString("checkbox.disable.asterisk.toaster")); pn.add(asteriskToasterBox, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); ResourceUtils.resButton(windowFocusBox, Res.getString("checkbox.window.to.front")); pn.add(windowFocusBox, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); ResourceUtils.resButton(SystemTrayNotificationBox, Res.getString("checkbox.notify.systemtray")); pn.add(SystemTrayNotificationBox, new GridBagConstraints(0, 5, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); ResourceUtils.resButton(showTypingNotificationBox, Res.getString("checkbox.notify.typing.systemtray")); pn.add(showTypingNotificationBox, new GridBagConstraints(0, 6, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); ResourceUtils.resButton(betaCheckBox, Res.getString("menuitem.check.for.updates")); if (!Default.getBoolean("DISABLE_UPDATES") && Enterprise.containsFeature(Enterprise.UPDATES_FEATURE)) { pn.add(betaCheckBox, new GridBagConstraints(0, 7, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
ResourceUtils.resLabel(serviceLabel, serviceField, Res.getString("label.add.conference.service"));