List of usage examples for com.jgoodies.forms.layout FormLayout FormLayout
public FormLayout(ColumnSpec[] colSpecs, RowSpec[] rowSpecs)
From source file:com.cs521.team7.SignUpPage.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner Evaluation license - Abhijeet Kedari label_firstName = new JLabel(); textField_firstName = new JTextField(); label_lastName = new JLabel(); textField_lastName = new JTextField(); label_emailID = new JLabel(); textField_emailID = new JTextField(); label_username = new JLabel(); textField_userName = new JTextField(); label_password = new JLabel(); textField_password = new JPasswordField(); label_confirmPassword = new JLabel(); textField_confirmPassword = new JPasswordField(); btn_cancel = new JButton(); btn_signUp = new JButton(); //======== this ======== setIconImage(new ImageIcon(getClass().getResource("/logo/sonos_logo.jpg")).getImage()); Container contentPane = getContentPane(); contentPane.setLayout(new FormLayout("default, $lcgap, pref, 2*($lcgap, pref:grow), $lcgap, pref", "3*(default, $lgap), default:grow, 3*($lgap, default), $lgap, default:grow, $lgap, default")); //---- label_firstName ---- label_firstName.setText("First Name"); contentPane.add(label_firstName, CC.xy(1, 1)); contentPane.add(textField_firstName, CC.xywh(3, 1, 7, 1, CC.FILL, CC.DEFAULT)); //---- label_lastName ---- label_lastName.setText("Last Name"); contentPane.add(label_lastName, CC.xy(1, 3)); contentPane.add(textField_lastName, CC.xywh(3, 3, 7, 1, CC.FILL, CC.DEFAULT)); //---- label_emailID ---- label_emailID.setText("Enter Email ID"); contentPane.add(label_emailID, CC.xy(1, 5)); contentPane.add(textField_emailID, CC.xywh(3, 5, 7, 1, CC.FILL, CC.DEFAULT)); //---- label_username ---- label_username.setText("Enter Username"); contentPane.add(label_username, CC.xy(1, 9)); contentPane.add(textField_userName, CC.xywh(3, 9, 7, 1, CC.FILL, CC.DEFAULT)); //---- label_password ---- label_password.setText("Enter Password"); contentPane.add(label_password, CC.xy(1, 11)); contentPane.add(textField_password, CC.xywh(3, 11, 7, 1, CC.FILL, CC.DEFAULT)); //---- label_confirmPassword ---- label_confirmPassword.setText("Confirm Password"); contentPane.add(label_confirmPassword, CC.xy(1, 13)); contentPane.add(textField_confirmPassword, CC.xywh(3, 13, 7, 1, CC.FILL, CC.DEFAULT)); //---- btn_cancel ---- btn_cancel.setText("Cancel"); btn_cancel.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { btn_cancelActionPerformed(e); }/*from ww w . ja v a 2 s .com*/ }); contentPane.add(btn_cancel, CC.xy(3, 17)); //---- btn_signUp ---- btn_signUp.setText("Sign Up"); btn_signUp.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { btn_signUpActionPerformed(e); } }); contentPane.add(btn_signUp, CC.xy(9, 17)); setSize(305, 290); setLocationRelativeTo(null); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:com.devdaily.heidi.ApplyLicenseDialog.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents dialogPane = new JPanel(); contentPanel = new JPanel(); headerTitle = new JLabel(); headerHelpText = new JLabel(); fileTextfieldLabel = new JLabel(); fileTextField = new JTextField(); browseButton = new JButton(); ///*ww w . j av a 2 s.co m*/ // AJA // //needALicenseLabel = new JLabel(); buttonBar = new JPanel(); cancelButton = new JButton(); applyLicenseButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== // // AJA // setTitle("Hyde Licensing"); Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== dialogPane ======== { dialogPane.setBorder(Borders.DIALOG_BORDER); dialogPane.setLayout(new BorderLayout()); //======== contentPanel ======== { contentPanel.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.PARAGRAPH_GAP_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.PARAGRAPH_GAP_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.PARAGRAPH_GAP_ROWSPEC })); //---- headerTitle ---- headerTitle.setText("Licensing"); headerTitle.setFont(new Font("Lucida Grande", Font.BOLD, 14)); contentPanel.add(headerTitle, cc.xywh(1, 1, 5, 1)); //---- headerHelpText ---- headerHelpText.setText("Select the license file from your system, and click \"Apply License\"."); contentPanel.add(headerHelpText, cc.xywh(1, 3, 5, 1)); //---- fileTextfieldLabel ---- fileTextfieldLabel.setText("Choose license file:"); contentPanel.add(fileTextfieldLabel, cc.xywh(1, 7, 5, 1)); contentPanel.add(fileTextField, cc.xywh(1, 9, 4, 1)); //---- browseButton ---- browseButton.setText("Browse..."); contentPanel.add(browseButton, cc.xy(5, 9)); //---- needALicenseLabel ---- // // AJA // //needALicenseLabel.setText("Need a license? Click here to get started."); needALicenseLabel.setForeground(Color.gray); contentPanel.add(needALicenseLabel, cc.xywh(1, 13, 5, 1)); } dialogPane.add(contentPanel, BorderLayout.CENTER); //======== buttonBar ======== { buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER); buttonBar.setLayout(new FormLayout(new ColumnSpec[] { FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.GLUE_COLSPEC, FormFactory.BUTTON_COLSPEC, FormFactory.MIN_COLSPEC, FormFactory.BUTTON_COLSPEC }, RowSpec.decodeSpecs("pref"))); //---- cancelButton ---- cancelButton.setText("Cancel"); buttonBar.add(cancelButton, cc.xy(4, 1)); //---- applyLicenseButton ---- applyLicenseButton.setText("Apply License"); buttonBar.add(applyLicenseButton, cc.xy(6, 1)); } dialogPane.add(buttonBar, BorderLayout.SOUTH); } contentPane.add(dialogPane, BorderLayout.CENTER); pack(); setLocationRelativeTo(getOwner()); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:com.devdaily.heidi.LicenseReminderDialog.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents dialogPane = new JPanel(); contentPanel = new JPanel(); htmlMessageScrollPane = new JScrollPane(); htmlMessageArea = new JEditorPane(); closeButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== dialogPane ======== {//from ww w .j a va2 s . co m dialogPane.setBorder(Borders.DIALOG_BORDER); dialogPane.setLayout(new BorderLayout()); //======== contentPanel ======== { contentPanel .setLayout( new FormLayout( new ColumnSpec[] { FormFactory.GLUE_COLSPEC, new ColumnSpec(ColumnSpec.LEFT, Sizes.dluX(0), FormSpec.NO_GROW), new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), new ColumnSpec(Sizes.dluX(0)), FormFactory.GLUE_COLSPEC }, new RowSpec[] { FormFactory.LINE_GAP_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //======== htmlMessageScrollPane ======== { //---- htmlMessageArea ---- htmlMessageArea.setContentType("text/html"); htmlMessageArea.setEditable(false); htmlMessageArea.setFont(new Font("Monaco", Font.PLAIN, 13)); htmlMessageArea.setMargin(new Insets(4, 4, 4, 4)); htmlMessageArea.setMinimumSize(new Dimension(360, 240)); htmlMessageArea.setPreferredSize(new Dimension(360, 240)); htmlMessageScrollPane.setViewportView(htmlMessageArea); } contentPanel.add(htmlMessageScrollPane, cc.xy(3, 3)); //---- closeButton ---- closeButton.setText("Close"); contentPanel.add(closeButton, cc.xywh(3, 5, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); } dialogPane.add(contentPanel, BorderLayout.CENTER); } contentPane.add(dialogPane, BorderLayout.CENTER); pack(); setLocationRelativeTo(getOwner()); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:com.devdaily.justwrite.view.ColorChooserDialog.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents dialogPane = new JPanel(); contentPanel = new JPanel(); fontColorSwatch = new JLabel(); fontColorLabel = new JLabel(); backgroundColorSwatch = new JLabel(); backgroundColorLabel = new JLabel(); textAreaScrollPane = new JScrollPane(); sampleTextArea = new JTextPane(); buttonBar = new JPanel(); resetButton = new JButton(); okButton = new JButton(); cancelButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setTitle("Modify the Editor Colors"); setResizable(false);// w ww . jav a 2 s.c o m Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== dialogPane ======== { dialogPane.setBorder(Borders.DIALOG_BORDER); dialogPane.setPreferredSize(new Dimension(388, 237)); dialogPane.setLayout(new BorderLayout()); //======== contentPanel ======== { contentPanel.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, new RowSpec[] { FormFactory.UNRELATED_GAP_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.PARAGRAPH_GAP_ROWSPEC, new RowSpec(RowSpec.CENTER, Sizes.PREFERRED, FormSpec.DEFAULT_GROW), FormFactory.PARAGRAPH_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- fontColorSwatch ---- fontColorSwatch.setPreferredSize(new Dimension(60, 20)); fontColorSwatch.setForeground(Color.green); fontColorSwatch.setBackground(Color.green); fontColorSwatch.setOpaque(true); fontColorSwatch.setBorder(new EtchedBorder()); fontColorSwatch.setToolTipText("Click to change the font color"); contentPanel.add(fontColorSwatch, cc.xy(3, 3)); //---- fontColorLabel ---- fontColorLabel.setText("Font Color"); fontColorLabel.setToolTipText("Click to change the font color"); contentPanel.add(fontColorLabel, cc.xy(5, 3)); //---- backgroundColorSwatch ---- backgroundColorSwatch.setPreferredSize(new Dimension(60, 20)); backgroundColorSwatch.setBackground(Color.black); backgroundColorSwatch.setOpaque(true); backgroundColorSwatch.setBorder(new MatteBorder(1, 1, 1, 1, Color.black)); backgroundColorSwatch.setToolTipText("Click to change the background color"); contentPanel.add(backgroundColorSwatch, cc.xy(3, 5)); //---- backgroundColorLabel ---- backgroundColorLabel.setText("Background Color"); backgroundColorLabel.setToolTipText("Click to change the background color"); contentPanel.add(backgroundColorLabel, cc.xy(5, 5)); //======== textAreaScrollPane ======== { textAreaScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); textAreaScrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); textAreaScrollPane.setToolTipText("This is an example of your colors with the current font."); textAreaScrollPane.setPreferredSize(new Dimension(300, 60)); //---- sampleTextArea ---- sampleTextArea.setText("Four score and seven years ago"); sampleTextArea.setEditable(false); sampleTextArea.setPreferredSize(new Dimension(200, 60)); sampleTextArea.setToolTipText("Sample area to demonstrate your color choices"); textAreaScrollPane.setViewportView(sampleTextArea); } contentPanel.add(textAreaScrollPane, cc.xywh(3, 7, 3, 2)); } dialogPane.add(contentPanel, BorderLayout.CENTER); //======== buttonBar ======== { buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER); buttonBar.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.GLUE_COLSPEC, FormFactory.BUTTON_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC }, RowSpec.decodeSpecs("pref"))); //---- resetButton ---- resetButton.setText("Reset"); resetButton.setToolTipText("Reset to the system default colors"); buttonBar.add(resetButton, cc.xy(2, 1)); //---- okButton ---- okButton.setText("OK"); okButton.setToolTipText("Accept your color changes"); buttonBar.add(okButton, cc.xy(4, 1)); //---- cancelButton ---- cancelButton.setText("Cancel"); cancelButton.setToolTipText("Cancel your color changes"); buttonBar.add(cancelButton, cc.xy(6, 1)); } dialogPane.add(buttonBar, BorderLayout.SOUTH); } contentPane.add(dialogPane, BorderLayout.CENTER); pack(); setLocationRelativeTo(getOwner()); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:com.devdaily.justwrite.view.FullScreenEditorFrame.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents scrollPane = new JScrollPane(); // NEW - this was a JTextPane DocumentLookAhead lookAhead = new DocumentLookAhead(); editorPane = new LookAheadTextPane(lookAhead); CellConstraints cc = new CellConstraints(); //======== this ======== setBackground(Color.black);/*w w w.jav a 2 s.c o m*/ Container contentPane = getContentPane(); contentPane.setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, 0.30000000000000004), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec("660px"), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, 0.30000000000000004) }, new RowSpec[] { // NEW new RowSpec("96px"), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec("60px") })); //======== scrollPane ======== { scrollPane.setBackground(Color.black); scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane.setAutoscrolls(true); scrollPane.setBorder(null); scrollPane.setFocusable(false); scrollPane.setRequestFocusEnabled(false); scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); scrollPane.setViewportBorder(null); //---- editorPane ---- editorPane.setBackground(new Color(12, 12, 12)); editorPane.setForeground(Color.green); editorPane.setFont(new Font("Monaco", Font.PLAIN, 13)); editorPane.setCaretColor(Color.green); editorPane.setSelectedTextColor(Color.green); editorPane.setBorder(null); editorPane.setSelectionColor(Color.darkGray); scrollPane.setViewportView(editorPane); } contentPane.add(scrollPane, cc.xy(3, 3)); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:com.devdaily.justwrite.view.OpenRecentFileDialog.java
License:Open Source License
private void doLayoutForm() { FormLayout layout = new FormLayout("fill:pref, 3dlu, fill:80dlu:grow, 3dlu, left:pref", "pref, 6dlu, pref, 6dlu, pref"); JPanel panel = new JPanel(); DefaultFormBuilder builder = new DefaultFormBuilder(layout, panel); builder.setDefaultDialogBorder();/*from w ww. j av a 2s. c o m*/ CellConstraints cc = new CellConstraints(); builder.addSeparator("Recent Files", cc.xyw(1, 1, 5)); builder.add(scrollPane, cc.xyw(1, 3, 5)); builder.add(ButtonBarFactory.buildCenteredBar(cancelButton, okButton), cc.xy(3, 5, CellConstraints.CENTER, CellConstraints.DEFAULT)); //builder.add(okButton, cc.xy(3,5,CellConstraints.CENTER, CellConstraints.DEFAULT)); this.setContentPane(builder.getPanel()); }
From source file:com.facetoe.jreader.ui.NewProfileWindow.java
License:Open Source License
/** * Method generated by IntelliJ IDEA GUI Designer * >>> IMPORTANT!! <<< * DO NOT edit this method OR call it in your code! * * @noinspection ALL/*from w ww.j a v a2 s . c o m*/ */ private void $$$setupUI$$$() { parentPanel = new JPanel(); parentPanel.setLayout(new FormLayout("fill:d:grow", "center:max(d;4px):noGrow,top:4dlu:noGrow,center:d:grow,top:4dlu:noGrow,center:d:noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow")); parentPanel .setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10), null)); pnlName = new JPanel(); pnlName.setLayout(new FormLayout("fill:104px:noGrow,left:17dlu:noGrow,fill:d:grow", "center:d:noGrow,top:4dlu:noGrow,center:d:grow")); CellConstraints cc = new CellConstraints(); parentPanel.add(pnlName, cc.xy(1, 5)); pnlName.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), null)); txtName = new JTextField(); txtName.setPreferredSize(new Dimension(350, 20)); txtName.setToolTipText("Name for this profile"); pnlName.add(txtName, cc.xy(3, 1, CellConstraints.FILL, CellConstraints.FILL)); final JLabel label1 = new JLabel(); label1.setText("Profile Name:"); pnlName.add(label1, cc.xy(1, 1)); final Spacer spacer1 = new Spacer(); pnlName.add(spacer1, cc.xy(3, 3, CellConstraints.DEFAULT, CellConstraints.FILL)); pnlDocs = new JPanel(); pnlDocs.setLayout(new FormLayout( "fill:101px:noGrow,left:19dlu:noGrow,fill:d:grow,left:4dlu:noGrow,fill:max(d;4px):noGrow", "center:d:noGrow")); parentPanel.add(pnlDocs, cc.xy(1, 7)); pnlDocs.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), null)); final JLabel label2 = new JLabel(); label2.setPreferredSize(new Dimension(300, 14)); label2.setText("Javadoc Directory:"); pnlDocs.add(label2, cc.xyw(1, 1, 2)); txtDocs = new JTextField(); txtDocs.setText(""); txtDocs.setToolTipText("Path to the Javadocs"); pnlDocs.add(txtDocs, cc.xy(3, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); btnDocs = new JButton(); btnDocs.setText("..."); btnDocs.setToolTipText("Choose directory"); pnlDocs.add(btnDocs, cc.xy(5, 1)); pnlSrc = new JPanel(); pnlSrc.setLayout(new FormLayout( "fill:101px:noGrow,left:19dlu:noGrow,fill:d:grow,left:4dlu:noGrow,fill:max(d;4px):noGrow", "center:d:noGrow")); parentPanel.add(pnlSrc, cc.xy(1, 9)); pnlSrc.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), null)); final JLabel label3 = new JLabel(); label3.setPreferredSize(new Dimension(300, 14)); label3.setText("Source Directory:"); pnlSrc.add(label3, cc.xyw(1, 1, 2)); txtSrc = new JTextField(); txtSrc.setToolTipText("Path to the source code"); pnlSrc.add(txtSrc, cc.xy(3, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); btnSrc = new JButton(); btnSrc.setText("..."); btnSrc.setToolTipText("Choose directory"); pnlSrc.add(btnSrc, cc.xy(5, 1)); final JPanel panel1 = new JPanel(); panel1.setLayout( new FormLayout("fill:d:noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow", "center:d:noGrow")); parentPanel.add(panel1, cc.xy(1, 11)); btnOK = new JButton(); btnOK.setText("OK"); panel1.add(btnOK, cc.xy(1, 1)); btnCancel = new JButton(); btnCancel.setText("Cancel"); panel1.add(btnCancel, cc.xy(3, 1)); final JPanel panel2 = new JPanel(); panel2.setLayout(new FormLayout("fill:d:grow", "center:d:grow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow")); parentPanel.add(panel2, cc.xy(1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); final JLabel label4 = new JLabel(); label4.setFont(new Font(label4.getFont().getName(), Font.BOLD, label4.getFont().getSize())); label4.setText("Select a name, source and documentation directory for this profile."); panel2.add(label4, cc.xy(1, 3)); progressBar = new JProgressBar(); progressBar.setVerifyInputWhenFocusTarget(true); progressBar.setVisible(false); panel2.add(progressBar, cc.xy(1, 5, CellConstraints.FILL, CellConstraints.DEFAULT)); lblStatus = new JLabel(); lblStatus.setText("Preparing to parse..."); lblStatus.setVisible(false); panel2.add(lblStatus, cc.xy(1, 7)); final Spacer spacer2 = new Spacer(); parentPanel.add(spacer2, cc.xy(1, 3, CellConstraints.DEFAULT, CellConstraints.FILL)); }
From source file:com.fisbein.joan.gui.ImapCopyGui.java
License:Open Source License
private void initGUI() { try {/*from w ww .j ava 2 s .c om*/ FormLayout thisLayout = new FormLayout("max(p;5dlu), 83dlu, 78dlu, max(p;5dlu)", "max(p;5dlu), max(p;5dlu), max(p;5dlu), max(p;5dlu), max(p;15dlu)"); getContentPane().setLayout(thisLayout); this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); this.setTitle("Imap Copy"); this.setPreferredSize(new java.awt.Dimension(474, 128)); this.setResizable(false); { labelImapSource = new JLabel(); getContentPane().add(labelImapSource, new CellConstraints("1, 1, 1, 1, default, default")); labelImapSource.setText("Source Account:"); } { labelImapTarget = new JLabel(); getContentPane().add(labelImapTarget, new CellConstraints("1, 2, 1, 1, default, default")); labelImapTarget.setText("Target Account:"); } { textImapSource = new JTextField(); getContentPane().add(textImapSource, new CellConstraints("2, 1, 2, 1, default, default")); } { textImapTarget = new JTextField(); getContentPane().add(textImapTarget, new CellConstraints("2, 2, 2, 1, default, default")); } { btnEditImapTarget = new JButton(); getContentPane().add(btnEditImapTarget, new CellConstraints("4, 2, 1, 1, default, default")); btnEditImapTarget.setText("..."); btnEditImapTarget.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { btnEditImapTargetActionPerformed(evt); } }); } { btnEditImapSource = new JButton(); getContentPane().add(btnEditImapSource, new CellConstraints("4, 1, 1, 1, default, default")); btnEditImapSource.setText("..."); btnEditImapSource.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { btnEditImapSourceActionPerformed(evt); } }); } { btnCopy = new JButton(); FlowLayout btnCopyLayout = new FlowLayout(); btnCopy.setLayout(btnCopyLayout); getContentPane().add(btnCopy, new CellConstraints("2, 4, 1, 1, default, default")); btnCopy.setText("Copy"); btnCopy.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { btnCopyActionPerformed(evt); } }); } { labelLog = new JLabel(); getContentPane().add(labelLog, new CellConstraints("2, 3, 3, 1, default, default")); labelLog.setText("log"); } { btnStop = new JButton(); FlowLayout btnStopLayout = new FlowLayout(); btnStop.setLayout(btnStopLayout); getContentPane().add(btnStop, new CellConstraints("3, 4, 1, 1, default, default")); btnStop.setText("Stop"); btnStop.setEnabled(false); btnStop.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { btnStopActionPerformed(evt); } }); } this.setSize(474, 128); } catch (Exception e) { log.error(e.getMessage(), e); } }
From source file:com.fisbein.joan.gui.imapUrlCreatorDialog.java
License:Open Source License
private void initGUI() { try {/*from w ww .ja va 2 s . co m*/ FormLayout thisLayout = new FormLayout("max(p;5dlu), 26dlu, 96dlu", "max(p;5dlu), max(p;5dlu), max(p;5dlu), max(p;5dlu), max(p;15dlu)"); getContentPane().setLayout(thisLayout); this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); this.setResizable(false); { jLabel1 = new JLabel(); getContentPane().add(jLabel1, new CellConstraints("1, 1, 1, 1, default, default")); jLabel1.setText("Use SSL:"); } { jLabel2 = new JLabel(); getContentPane().add(jLabel2, new CellConstraints("1, 2, 1, 1, default, default")); jLabel2.setText("Username:"); } { jLabel3 = new JLabel(); getContentPane().add(jLabel3, new CellConstraints("1, 3, 1, 1, default, default")); jLabel3.setText("Password:"); } { jLabel4 = new JLabel(); getContentPane().add(jLabel4, new CellConstraints("1, 4, 1, 1, default, default")); jLabel4.setText("Server:"); } { textUsername = new JTextField(); getContentPane().add(textUsername, new CellConstraints("2, 2, 2, 1, default, default")); } { textPassword = new JTextField(); getContentPane().add(textPassword, new CellConstraints("2, 3, 2, 1, default, default")); } { textServer = new JTextField(); getContentPane().add(textServer, new CellConstraints("2, 4, 2, 1, default, default")); } { radioSSLYes = new JRadioButton(); getContentPane().add(radioSSLYes, new CellConstraints("2, 1, 1, 1, default, default")); radioSSLYes.setText("Yes"); getButtonGroupSSL().add(radioSSLYes); } { radioSSLNo = new JRadioButton(); getContentPane().add(radioSSLNo, new CellConstraints("3, 1, 1, 1, default, default")); radioSSLNo.setText("No"); getButtonGroupSSL().add(radioSSLNo); } { btnOk = new JButton(); getContentPane().add(btnOk, new CellConstraints("2, 5, 2, 1, default, default")); btnOk.setText("Ok"); btnOk.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { btnOkActionPerformed(evt); } }); } this.setSize(340, 150); } catch (Exception e) { e.printStackTrace(); } }
From source file:com.floreantpos.ui.dialog.DiscountListDialog.java
License:Open Source License
/** * Method generated by IntelliJ IDEA GUI Designer * >>> IMPORTANT!! <<< * DO NOT edit this method OR call it in your code! * * @noinspection ALL/* ww w . ja va 2s . c om*/ */ private void $$$setupUI$$$() { contentPane = new JPanel(); contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1)); final JPanel panel1 = new JPanel(); panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1)); contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_SOUTH, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false)); final Spacer spacer1 = new Spacer(); panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false)); final JPanel panel2 = new JPanel(); panel2.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5)); panel1.add(panel2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); btnDeleteSelected = new PosButton(); btnDeleteSelected.setIcon(IconFactory.getIcon("/ui_icons/", "delete.png")); //$NON-NLS-1$ //$NON-NLS-2$ btnDeleteSelected.setPreferredSize(new Dimension(140, 50)); btnDeleteSelected.setText(Messages.getString("DiscountListDialog.5")); //$NON-NLS-1$ panel2.add(btnDeleteSelected); buttonOK = new PosButton(); buttonOK.setIcon(IconFactory.getIcon("/ui_icons/", "finish.png")); //$NON-NLS-1$ //$NON-NLS-2$ buttonOK.setPreferredSize(new Dimension(120, 50)); buttonOK.setText(com.floreantpos.POSConstants.OK); panel2.add(buttonOK); buttonCancel = new PosButton(); buttonCancel.setIcon(IconFactory.getIcon("/ui_icons/", "cancel.png")); //$NON-NLS-1$ //$NON-NLS-2$ buttonCancel.setPreferredSize(new Dimension(120, 50)); buttonCancel.setText(com.floreantpos.POSConstants.CANCEL); panel2.add(buttonCancel); final JPanel panel3 = new JPanel(); panel3.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1)); contentPane.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(458, 310), null, 0, false)); final JScrollPane scrollPane1 = new JScrollPane(); panel3.add(scrollPane1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false)); tableDiscounts = new JTable(); scrollPane1.setViewportView(tableDiscounts); final JPanel panel4 = new JPanel(); panel4.setLayout(new FormLayout("fill:p:grow", "center:d:grow,top:4dlu:noGrow,center:d:grow")); //$NON-NLS-1$ //$NON-NLS-2$ panel3.add(panel4, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false)); btnScrollUp = new PosButton(); btnScrollUp.setIcon(IconFactory.getIcon("/ui_icons/", "up.png")); //$NON-NLS-1$ //$NON-NLS-2$ btnScrollUp.setPreferredSize(new Dimension(50, 50)); btnScrollUp.setText(""); //$NON-NLS-1$ CellConstraints cc = new CellConstraints(); panel4.add(btnScrollUp, cc.xy(1, 1, CellConstraints.CENTER, CellConstraints.BOTTOM)); btnScrollDown = new PosButton(); btnScrollDown.setIcon(IconFactory.getIcon("/ui_icons/", "down.png")); //$NON-NLS-1$ //$NON-NLS-2$ btnScrollDown.setPreferredSize(new Dimension(50, 50)); btnScrollDown.setText(""); //$NON-NLS-1$ panel4.add(btnScrollDown, cc.xy(1, 3, CellConstraints.CENTER, CellConstraints.TOP)); }