List of usage examples for com.jgoodies.forms.layout CellConstraints LEFT
Alignment LEFT
To view the source code for com.jgoodies.forms.layout CellConstraints LEFT.
Click Source Link
From source file:com.t3.client.ui.tokenpanel.InitiativeListCellRenderer.java
License:Open Source License
/** * @see javax.swing.ListCellRenderer#getListCellRendererComponent(javax.swing.JList, java.lang.Object, int, boolean, * boolean)/*from w ww . ja va 2 s . c o m*/ */ @Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { // Set the background by type Token token = null; TokenInitiative ti = (TokenInitiative) value; if (ti != null) token = ti.getToken(); if (token == null) { // Can happen when deleting a token before all events have propagated currentIndicator.setIcon(null); name.setText(null); name.setIcon(null); setBorder(UNSELECTED_BORDER); return this; } // endif backgroundImageLabel = token.isVisible() ? token.getType() == Token.Type.NPC ? GraphicsUtil.BLUE_LABEL : GraphicsUtil.GREY_LABEL : GraphicsUtil.DARK_GREY_LABEL; name.setForeground(Color.BLACK); // Show the indicator? int currentIndex = panel.getList().getCurrent(); if (currentIndex >= 0 && ti == panel.getList().getTokenInitiative(currentIndex)) { currentIndicator.setIcon(CURRENT_INDICATOR_ICON); } else { currentIndicator.setIcon(null); } // endif // Get the name string, add the state if displayed, then get the icon if needed boolean initStateSecondLine = panel.isInitStateSecondLine() && panel.isShowInitState(); String sName = (initStateSecondLine ? "<html>" : "") + ti.getToken().getName(); if (TabletopTool.getFrame().getInitiativePanel().hasGMPermission() && token.getGMName() != null && token.getGMName().trim().length() != 0) sName += " (" + token.getGMName().trim() + ")"; if (panel.isShowInitState() && ti.getState() != null) sName += (initStateSecondLine ? "<br>" : " = ") + ti.getState(); if (initStateSecondLine) sName += "</html>"; Icon icon = null; if (panel.isShowTokens()) { icon = ti.getDisplayIcon(); if (icon == null) { icon = new InitiativeListIcon(ti); ti.setDisplayIcon(icon); } // endif } // endif name.setText(sName); name.setIcon(icon); // Align it properly Alignment alignment = ti.isHolding() ? CellConstraints.RIGHT : CellConstraints.LEFT; FormLayout layout = (FormLayout) getLayout(); layout.setConstraints(name, new CellConstraints(4, 1, alignment, CellConstraints.CENTER)); if (alignment == CellConstraints.RIGHT) { name.setHorizontalTextPosition(SwingConstants.LEFT); } else { name.setHorizontalTextPosition(SwingConstants.RIGHT); } // endif // Selected? if (isSelected) { setBorder(SELECTED_BORDER); } else { setBorder(UNSELECTED_BORDER); } // endif return this; }
From source file:com.tcay.slalom.UI.RegisterRacer.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 w w . j a v a 2s . c o m*/ */ private void $$$setupUI$$$() { createUIComponents(); mainPanel = new JPanel(); mainPanel.setLayout(new GridLayoutManager(9, 4, new Insets(0, 0, 0, 0), -1, -1)); mainPanel.setBorder(BorderFactory.createTitledBorder("Register Racer")); final JLabel label1 = new JLabel(); label1.setText("First Name"); mainPanel.add(label1, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); final JLabel label2 = new JLabel(); label2.setText("Last Name"); mainPanel.add(label2, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); final Spacer spacer1 = new Spacer(); mainPanel.add(spacer1, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false)); final JLabel label3 = new JLabel(); label3.setText("Birthdate"); mainPanel.add(label3, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); final JLabel label4 = new JLabel(); label4.setText("Email Address"); mainPanel.add(label4, new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); firstName = new JTextField(); mainPanel.add(firstName, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); lastName = new JTextField(); mainPanel.add(lastName, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); birthdate = new JTextField(); mainPanel.add(birthdate, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); email = new JTextField(); mainPanel.add(email, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); federationNbr = new JTextField(); mainPanel.add(federationNbr, new GridConstraints(5, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); final JLabel label5 = new JLabel(); label5.setText("Federation#"); mainPanel.add(label5, new GridConstraints(5, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); final JLabel label6 = new JLabel(); label6.setText("Sex"); mainPanel.add(label6, new GridConstraints(4, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); sex = new JTextField(); mainPanel.add(sex, new GridConstraints(4, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); final JLabel label7 = new JLabel(); label7.setText("Bib Nbr"); mainPanel.add(label7, new GridConstraints(2, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); bibNbr = new JTextField(); mainPanel.add(bibNbr, new GridConstraints(2, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); paidCheckBox = new JCheckBox(); paidCheckBox.setText("Paid"); mainPanel.add(paidCheckBox, new GridConstraints(1, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); mainPanel.add(racerListComboBox, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); final JLabel label8 = new JLabel(); label8.setText("Lookup Racer"); mainPanel.add(label8, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); selectButton = new JButton(); selectButton.setText("Select"); mainPanel.add(selectButton, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); tshirtSize = new JTextField(); mainPanel.add(tshirtSize, new GridConstraints(7, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); final JLabel label9 = new JLabel(); label9.setText("Shirt size"); mainPanel.add(label9, new GridConstraints(7, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); mobilePhone = new JTextField(); mainPanel.add(mobilePhone, new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); final JLabel label10 = new JLabel(); label10.setText("Mobile Phone"); mainPanel.add(label10, new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); final JLabel label11 = new JLabel(); label11.setText("Club/Country"); mainPanel.add(label11, new GridConstraints(6, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); clubCountry = new JTextField(); mainPanel.add(clubCountry, new GridConstraints(6, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); final JPanel panel1 = new JPanel(); panel1.setLayout(new FormLayout("fill:d:grow,left:4dlu:noGrow,fill:max(d;4px):noGrow", "center:d:grow")); mainPanel.add(panel1, new GridConstraints(8, 0, 1, 4, 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)); saveButton = new JButton(); saveButton.setHorizontalAlignment(0); saveButton.setText("Save"); CellConstraints cc = new CellConstraints(); panel1.add(saveButton, cc.xy(1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); cancelButton = new JButton(); cancelButton.setText("Cancel"); panel1.add(cancelButton, cc.xy(3, 1)); }
From source file:coursescheduleapp.view.PrefSetView.java
License:Open Source License
/** This method is called from within the constructor to * initialize the form.//from w w w . j ava 2 s . c om * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { coursePrefView1 = new CoursePrefView(); FormLayout thisLayout = new FormLayout("max(p;5dlu), max(p;5dlu), max(p;5dlu), max(p;5dlu)", "max(p;5dlu), max(p;5dlu), max(p;5dlu), max(p;5dlu)"); this.setLayout(thisLayout); this.add(coursePrefView1, new CellConstraints(2, 1, 1, 1, CellConstraints.LEFT, CellConstraints.TOP, new Insets(0, 0, 0, 4))); { schedPrefView1 = new SchedPrefView(); this.add(schedPrefView1, new CellConstraints("3, 1, 1, 1, fill, top")); } }
From source file:cz.vity.freerapid.gui.dialogs.SubmitErrorDialog.java
@SuppressWarnings({ "deprecation" }) private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner Open Source Project license - unknown JPanel dialogPane = new JPanel(); JPanel contentPanel = new JPanel(); JLabel labelName = new JLabel(); fieldName = ComponentFactory.getTextField(); JLabel labelEmail = new JLabel(); fieldEmail = ComponentFactory.getTextField(); JLabel labelComment = new JLabel(); JScrollPane scrollPane1 = new JScrollPane(); commentTextArea = ComponentFactory.getTextArea(); JLabel labelDescribeInfo = new JLabel(); JPanel buttonBar = new JPanel(); btnConnection = new JButton(); btnOk = new JButton(); btnCancel = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== dialogPane ======== {// w w w . j av a 2 s. c o m dialogPane.setBorder(Borders.DIALOG); dialogPane.setName("dialogPane"); dialogPane.setLayout(new BorderLayout()); //======== contentPanel ======== { contentPanel.setName("contentPanel"); //---- labelName ---- labelName.setLabelFor(fieldName); labelName.setName("labelName"); //---- fieldName ---- fieldName.setColumns(15); fieldName.setName("fieldName"); //---- labelEmail ---- labelEmail.setLabelFor(fieldEmail); labelEmail.setName("labelEmail"); //---- fieldEmail ---- fieldEmail.setColumns(15); fieldEmail.setName("fieldEmail"); //---- labelComment ---- labelComment.setLabelFor(commentTextArea); labelComment.setName("labelComment"); //======== scrollPane1 ======== { scrollPane1.setName("scrollPane1"); //---- commentTextArea ---- commentTextArea.setRows(10); commentTextArea.setLineWrap(true); commentTextArea.setName("commentTextArea"); scrollPane1.setViewportView(commentTextArea); } //---- labelDescribeInfo ---- labelDescribeInfo.setName("labelDescribeInfo"); PanelBuilder contentPanelBuilder = new PanelBuilder(new FormLayout( new ColumnSpec[] { FormSpecs.DEFAULT_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC }, new RowSpec[] { FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormSpecs.LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC }), contentPanel); contentPanelBuilder.add(labelName, cc.xy(1, 1)); contentPanelBuilder.add(fieldName, cc.xy(3, 1)); contentPanelBuilder.add(labelEmail, cc.xy(5, 1)); contentPanelBuilder.add(fieldEmail, cc.xy(7, 1)); contentPanelBuilder.add(labelComment, cc.xywh(1, 3, 1, 1, CellConstraints.DEFAULT, CellConstraints.TOP)); contentPanelBuilder.add(scrollPane1, cc.xywh(3, 3, 5, 1)); contentPanelBuilder.add(labelDescribeInfo, cc.xywh(3, 5, 5, 1)); } dialogPane.add(contentPanel, BorderLayout.CENTER); //======== buttonBar ======== { buttonBar.setBorder(Borders.BUTTON_BAR_PAD); buttonBar.setName("buttonBar"); //---- button1 ---- btnConnection.setName("btnConnection"); //---- okButton ---- btnOk.setName("okButton"); //---- cancelButton ---- btnCancel.setName("cancelButton"); PanelBuilder buttonBarBuilder = new PanelBuilder(new FormLayout( new ColumnSpec[] { FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, ColumnSpec.decode("max(min;10dlu):grow"), FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.BUTTON_COLSPEC, FormSpecs.RELATED_GAP_COLSPEC, ComponentFactory.BUTTON_COLSPEC }, RowSpec.decodeSpecs("pref")), buttonBar); buttonBarBuilder.add(btnConnection, cc.xywh(2, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); buttonBarBuilder.add(btnOk, cc.xy(6, 1)); buttonBarBuilder.add(btnCancel, cc.xy(8, 1)); } dialogPane.add(buttonBar, BorderLayout.SOUTH); } contentPane.add(dialogPane, BorderLayout.CENTER); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:de.dfki.dmas.owls2wsdl.gui.ConfigurationFrame.java
License:Open Source License
private JPanel buildSubPanel4ApplicationConfigs(boolean debugmode) { FormLayout layout = new FormLayout("10dlu, right:pref, 10px, fill:pref:grow, 5px, pref"); DefaultFormBuilder builder = null;// w w w . j a v a 2s . c om if (debugmode) builder = new DefaultFormBuilder(layout, new FormDebugPanel()); else builder = new DefaultFormBuilder(layout); builder.setDefaultDialogBorder(); builder.setLeadingColumnOffset(1); builder.appendSeparator("Application Properties"); builder.append("Application path", this.applPathField, this.applPathBrowseButton); builder.append("Export directory", this.exportDirectoryField, this.exportDirectoryBrowseButton); builder.append("Log file", this.logPathField, 3); builder.append("Persistent datatype directory", this.persistentDatatypeDirectoryField, 3); builder.append("Project directory", this.persistentProjectDirectoryField, 3); builder.append("Persistence", this.persistentDatatypeCheckBox, 3); builder.append("JConsole", this.jconsoleCheckBox, 3); // builder.append("", this.buildRelativePathCheckBox, 1); builder.appendSeparator("Language"); JPanel langPanel = new JPanel(); langPanel.add(this.deLangButton); langPanel.add(this.enLangButton); builder.setHAlignment(CellConstraints.LEFT); builder.append("", langPanel, 3); builder.appendSeparator("Look and Feel"); JPanel lfPanel = new JPanel(); lfPanel.add(this.plasticLfButton); lfPanel.add(this.windowsLfButton); lfPanel.add(this.motifLfButton); builder.setHAlignment(CellConstraints.LEFT); builder.append("", lfPanel, 3); if (debugmode) FormDebugUtils.dumpAll(builder.getPanel()); return builder.getPanel(); }
From source file:de.fhwedel.coinflip.gui.UserInterface.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner Evaluation license - Mervyn McCreight DefaultComponentFactory compFactory = DefaultComponentFactory.getInstance(); label1 = compFactory.createLabel("Server IP:"); ipTextField = new JTextField(); label2 = compFactory.createLabel("Server Port:"); portTextField = new JTextField(); playButton = new JButton(); protocolProgessBar = new JProgressBar(); progressLabel = new JLabel(); separator1 = compFactory.createSeparator("Available Players", SwingConstants.CENTER); scrollPane1 = new JScrollPane(); playerMap = new JTable(); refreshButton = new JButton(); CellConstraints cc = new CellConstraints(); // ======== this ======== setTitle("SRA CoinFlip Client"); setResizable(false);//from w w w. j a v a2 s . c o m Container contentPane = getContentPane(); contentPane .setLayout(new FormLayout("default, $lcgap, 40dlu, $lcgap, 62dlu, $lcgap, 41dlu, $lcgap, default", "8*(default, $lgap), $lgap, 10dlu, default, $lgap, 64dlu, 2*($lgap, default)")); // ---- label1 ---- label1.setText("Server IP:"); label1.setLabelFor(ipTextField); contentPane.add(label1, cc.xy(3, 3, CellConstraints.LEFT, CellConstraints.DEFAULT)); // ---- ipTextField ---- ipTextField.setToolTipText("Enter Server-IP here ..."); contentPane.add(ipTextField, cc.xywh(5, 3, 3, 1)); // ---- label2 ---- label2.setLabelFor(portTextField); contentPane.add(label2, cc.xy(3, 5, CellConstraints.LEFT, CellConstraints.DEFAULT)); // ---- portTextField ---- portTextField.setToolTipText("Enter Server-Port here..."); contentPane.add(portTextField, cc.xywh(5, 5, 3, 1)); // ---- playButton ---- playButton.setText("Play"); playButton.setFocusable(false); playButton.setFocusPainted(false); playButton.addActionListener(this::playButtonOnClick); contentPane.add(playButton, cc.xy(5, 9)); // ---- protocolProgessBar ---- protocolProgessBar.setMaximum(9); protocolProgessBar.setStringPainted(true); protocolProgessBar.setFocusable(false); contentPane.add(protocolProgessBar, cc.xywh(3, 13, 5, 1)); // ---- progressLabel ---- progressLabel.setText("Waiting..."); progressLabel.setFont(UIManager.getFont("Label.font")); progressLabel.setHorizontalAlignment(SwingConstants.CENTER); contentPane.add(progressLabel, cc.xywh(3, 15, 6, 1)); contentPane.add(separator1, cc.xywh(1, 18, 9, 1)); // ======== scrollPane1 ======== { // ---- playerMap ---- playerMap.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); playerMap.setShowVerticalLines(false); playerMap.setShowHorizontalLines(false); scrollPane1.setViewportView(playerMap); } contentPane.add(scrollPane1, cc.xywh(3, 21, 5, 1)); // ---- refreshButton ---- refreshButton.setText("Refresh"); refreshButton.addActionListener(this::refreshButtonClick); contentPane.add(refreshButton, cc.xy(5, 23)); pack(); setLocationRelativeTo(getOwner()); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:de.luschny.apps.factorial.BenchmarkForm.java
License:Open Source License
@SuppressWarnings("unchecked") private void initComponents() { checkBoxArray = new JCheckBox[21]; JMenuBar menuBar = new JMenuBar(); JMenu benchMenu = new JMenu(); recommededMenu = new JMenuItem(); JMenuItem parallelMenu = new JMenuItem(); primeMenu = new JMenuItem(); simpleMenu = new JMenuItem(); JMenuItem lameMenu = new JMenuItem(); JMenu ectMenu = new JMenu(); sanityMenu = new JMenuItem(); JMenuItem aboutMenu = new JMenuItem(); JLabel algoLabel = new JLabel(); logToFileCheckBox = new JCheckBox(); showValueCheckBox = new JCheckBox(); verboseCheckBox = new JCheckBox(); JLabel startLabel = new JLabel(); startField = new JTextField(); JLabel stepLabel = new JLabel(); stepBox = new JComboBox(); cancelButton = new JButton(); JLabel lenghtLabel = new JLabel(); lenghtSpinner = new JSpinner(); benchmarkButton = new JButton(); JPanel algoSelection = new JPanel(); JScrollPane scrollPane = new JScrollPane(); textArea = new JTextArea(); infoLabel = new JLabel(); progressBar = new JProgressBar(); CellConstraints cc = new CellConstraints(); // ======== benchForm ======== setTitle("Factorial Algorithm Benchmark"); setFont(new Font("Verdana", Font.BOLD, 16)); Container benchFormContentPane = getContentPane(); benchFormContentPane.setLayout(new FormLayout( "6dlu, $lcgap, 4dlu, $lcgap, 82dlu, 10dlu, 6dlu, center:46dlu, $lcgap, 42dlu, $lcgap, 18dlu, $lcgap, center:58dlu, 6dlu, left:12dlu", "2dlu, $lgap, default, $lgap, top:176dlu, $lgap, default, $lgap, 16dlu, $lgap, 18dlu, $lgap, 16dlu, $lgap, 18dlu, $lgap, 4dlu")); ((FormLayout) benchFormContentPane.getLayout()).setRowGroups(new int[][] { { 9, 11, 13 } }); JCheckBox checkBox = new JCheckBox(); Font font = benchMenu.getFont().deriveFont(benchMenu.getFont().getStyle() | Font.BOLD, benchMenu.getFont().getSize() - 1f); Font labelFont = algoLabel.getFont().deriveFont(algoLabel.getFont().getStyle() | Font.BOLD, algoLabel.getFont().getSize() - 1f); Font checkFont = checkBox.getFont().deriveFont(checkBox.getFont().getStyle() | Font.BOLD, checkBox.getFont().getSize() - 1f); Font buttonFont = cancelButton.getFont().deriveFont(cancelButton.getFont().getStyle() | Font.BOLD); // ======== benchMenu ======== benchMenu.setText("Benchmark"); benchMenu.setFont(font);//w w w. j a v a 2 s. c o m // ---- recommendedMenu ---- recommededMenu.setText("Recommended"); recommededMenu.setFont(font); recommededMenu.addActionListener((ActionEvent e) -> toptenMenuActionPerformed(e)); benchMenu.add(recommededMenu); // ---- primeMenu ---- primeMenu.setText("Prime"); primeMenu.setFont(font); primeMenu.addActionListener((ActionEvent e) -> primeMenuActionPerformed(e)); benchMenu.add(primeMenu); // ---- parallelMenu ---- parallelMenu.setText("Parallel"); parallelMenu.setFont(font); parallelMenu.addActionListener((ActionEvent e) -> parallelMenuActionPerformed(e)); benchMenu.add(parallelMenu); // ---- simpleMenu ---- simpleMenu.setText("Simple"); simpleMenu.setFont(font); simpleMenu.addActionListener((ActionEvent e) -> simpleMenuActionPerformed(e)); benchMenu.add(simpleMenu); // ---- lameMenu ---- lameMenu.setText("Lame"); lameMenu.setFont(font); lameMenu.addActionListener((ActionEvent e) -> lameMenuActionPerformed(e)); benchMenu.add(lameMenu); menuBar.add(benchMenu); // ======== ectMenu ======== ectMenu.setText("Ecetera"); ectMenu.setFont(font); // ---- sanityMenu ---- sanityMenu.setText("Sanity Check"); sanityMenu.setFont(font); sanityMenu.addActionListener((ActionEvent e) -> sanityMenuActionPerformed(e)); ectMenu.add(sanityMenu); ectMenu.addSeparator(); // ---- aboutMenu ---- aboutMenu.setText("About"); aboutMenu.setFont(font); aboutMenu.addActionListener((ActionEvent e) -> aboutMenuActionPerformed(e)); ectMenu.add(aboutMenu); menuBar.add(ectMenu); setJMenuBar(menuBar); // ---- algoLabel ---- algoLabel.setText("Algorithm"); algoLabel.setFont(labelFont); benchFormContentPane.add(algoLabel, new CellConstraints(5, 3, 1, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT, new Insets(0, 12, 0, 0))); // ---- logToFileCheckBox ---- logToFileCheckBox.setText("Log To File"); logToFileCheckBox.setFont(checkFont); benchFormContentPane.add(logToFileCheckBox, new CellConstraints(8, 3, 3, 1, CellConstraints.LEFT, CellConstraints.DEFAULT, new Insets(0, 8, 0, 0))); // ---- showValueCheckBox ---- showValueCheckBox.setText("Show Value"); showValueCheckBox.setFont(checkFont); benchFormContentPane.add(showValueCheckBox, cc.xywh(10, 3, 3, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); // ---- verboseCheckBox ---- verboseCheckBox.setText("Verbose"); verboseCheckBox.setFont(checkFont); benchFormContentPane.add(verboseCheckBox, new CellConstraints(14, 3, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT, new Insets(0, 4, 0, 0))); // ---- startLabel ---- startLabel.setText("Start"); startLabel.setFont(labelFont); benchFormContentPane.add(startLabel, cc.xywh(8, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); // ---- startField ---- startField.setToolTipText("Enter start value of n"); startField.setText("8000"); benchFormContentPane.add(startField, cc.xy(10, 9)); // ---- stepLabel ---- stepLabel.setText("Stepfactor"); stepLabel.setFont(labelFont); benchFormContentPane.add(stepLabel, cc.xywh(8, 11, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); // ---- stepBox ---- stepBox.setEditable(true); DefaultComboBoxModel dcbm = new DefaultComboBoxModel(new String[] { "1.5", "2.0", "2.5", "3.0" }); stepBox.setModel(dcbm); stepBox.setSelectedIndex(1); benchFormContentPane.add(stepBox, cc.xy(10, 11)); // ---- cancelButton ---- cancelButton.setText("Cancel"); cancelButton.setEnabled(false); cancelButton.setBackground(SystemColor.activeCaption); cancelButton.setForeground(SystemColor.window); cancelButton.setFont(buttonFont); cancelButton.addActionListener((ActionEvent e) -> cancelButtonActionPerformed(e)); benchFormContentPane.add(cancelButton, cc.xywh(14, 11, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); // ---- lenghtLabel ---- lenghtLabel.setText("Length"); lenghtLabel.setFont(labelFont); benchFormContentPane.add(lenghtLabel, cc.xywh(8, 13, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); // ---- lenghtSpinner ---- lenghtSpinner.setModel(new SpinnerListModel(new String[] { "1", "2", "3", "4", "5", "6", "7", "8", "9" })); benchFormContentPane.add(lenghtSpinner, cc.xy(10, 13)); // ---- benchmarkButton ---- benchmarkButton.setText("Benchmark!"); benchmarkButton.setFont(buttonFont); benchmarkButton.addActionListener((ActionEvent e) -> benchmarkButtonActionPerformed(e)); benchFormContentPane.add(benchmarkButton, cc.xywh(14, 13, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); // ======== AlgoSelection ======== algoSelection.setPreferredSize(new Dimension(47, 550)); algoSelection.setBackground(SystemColor.window); algoSelection.setLayout(new FormLayout("left:default:grow", "21*(fill:default)")); for (int i = 0; i < checkBoxArray.length; i++) { checkBox = new JCheckBox(); checkBox.setText(FactorialTest.getNames()[i]); checkBox.setBackground(SystemColor.window); checkBox.setMargin(new Insets(3, 4, 1, 0)); algoSelection.add(checkBox, cc.xy(1, i + 1)); checkBox.setFont(checkFont); checkBoxArray[i] = checkBox; } benchFormContentPane.add(algoSelection, cc.xywh(3, 5, 3, 9)); // ---- textArea ---- textArea.setLineWrap(true); textArea.setEditable(false); textArea.setDisabledTextColor(SystemColor.windowText); textArea.setBackground(SystemColor.window); textArea.setFont(new Font("Courier New", Font.PLAIN, 12)); // ======== scrollPane ======== scrollPane.setViewportView(textArea); benchFormContentPane.add(scrollPane, cc.xywh(7, 5, 9, 3)); // ---- infoLabel ---- infoLabel.setText("(c) 2008 Peter Luschny"); infoLabel.setFont(labelFont); benchFormContentPane.add(infoLabel, cc.xywh(3, 15, 3, 1)); benchFormContentPane.add(progressBar, cc.xywh(7, 15, 9, 1)); pack(); setLocationRelativeTo(getOwner()); }
From source file:demo.MainScreen.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner Evaluation license - Travis Holt watch = new StopWatch(); TeamTitleLabel = new JLabel(); FilterItemLabel = new JLabel(); separator1 = new JSeparator(); panel2 = new JPanel(); comboBox1 = new JComboBox(); textField1 = new JTextField(); startTiming = new JButton(); beingTimed = false;/*from w ww .ja v a2 s . c o m*/ panel1 = new JPanel(); DockButton_Jacket = new JButton(); DockButton_CShirt = new JButton(); DockButton_TShirt = new JButton(); DockButton_TTop = new JButton(); DockButton_Dress = new JButton(); DockButton_Pants = new JButton(); DockButton_Uwear = new JButton(); DockLabel_Jacket = new JLabel(); DockLabel_CShirt = new JLabel(); DockLabel_TShirt = new JLabel(); DockLabel_TTop = new JLabel(); DockLabel_Dress = new JLabel(); DockLabel_Pants = new JLabel(); DockLabel_UWear = new JLabel(); separator2 = new JSeparator(); Frame_ShirtFilter = new JInternalFrame(); Label_Options = new JLabel(); vSpacer2 = new JPanel(null); Label_SizeSelection = new JLabel(); splitPane2 = new JSplitPane(); Label_SizeStatus = new JLabel(); SizeButton_Clear = new JButton(); ColorPalette_Clear = new JButton(); panel6 = new JPanel(); SizeButton_XS = new JButton(); SizeButton_S = new JButton(); SizeButton_M = new JButton(); SizeButton_L = new JButton(); SizeButton_XL = new JButton(); vSpacer1 = new JPanel(null); Label_ColorSelection = new JLabel(); splitPane1 = new JSplitPane(); Label_ColorStatus = new JButton(); ColorButton_Clear = new JButton(); colorPalette = new JPanel(); Button_Black = new JButton(); Button_Pink = new JButton(); Button_Blue = new JButton(); Button_Green = new JButton(); ButtonLightBlue = new JButton(); Button_Red = new JButton(); Button_Purple = new JButton(); Button_Grey = new JButton(); Button_Yellow = new JButton(); Button_White = new JButton(); vSpacer3 = new JPanel(null); Label_PriceSelection = new JLabel(); splitPane3 = new JSplitPane(); Label_PriceStatus = new JLabel(); PriceButton_Clear = new JButton(); panel8 = new JPanel(); bPrice26_50 = new JButton(); bPrice51_75 = new JButton(); bPrice76_100 = new JButton(); bprice101_125 = new JButton(); DesignB = new JInternalFrame(); label1 = new JLabel(); label2 = new JLabel(); sizeButtonPanel = new JPanel(); Toggle_XS = new JToggleButton(); Toggle_S = new JToggleButton(); Toggle_M = new JToggleButton(); Toggle_L = new JToggleButton(); Toggle_XL = new JToggleButton(); vSpacer4 = new JPanel(null); colorLabelPalette = new JLabel(); panel4 = new JPanel(); primaryColorChooser = new ColorChooser(); vSpacer5 = new JPanel(null); priceRangeLabel = new JLabel(); rangeMinLabel = new JTextField(); rangeSlider1 = new RangeSlider(); rangeMaxLabel = new JTextField(); CellConstraints cc = new CellConstraints(); //======== this ======== setTitle("Fashion Sensible"); Container contentPane = getContentPane(); contentPane.setLayout( new FormLayout("default, $lcgap, 195dlu, $lcgap, default, $lcgap, 149dlu, $lcgap, default", "7*(default, $lgap), 253dlu, 2*($lgap, default)")); //---- TeamTitleLabel ---- TeamTitleLabel.setText("Fashion Sensible"); TeamTitleLabel.setFont(new Font("Dialog", Font.PLAIN, 16)); contentPane.add(TeamTitleLabel, cc.xywh(5, 3, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- FilterItemLabel ---- FilterItemLabel.setText("Filtering Items"); contentPane.add(FilterItemLabel, cc.xywh(5, 5, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); contentPane.add(separator1, cc.xy(5, 7)); //======== panel2 ======== { // JFormDesigner evaluation mark panel2.setBorder(new javax.swing.border.CompoundBorder( new javax.swing.border.TitledBorder(new javax.swing.border.EmptyBorder(0, 0, 0, 0), "JFormDesigner Evaluation", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.BOTTOM, new java.awt.Font("Dialog", java.awt.Font.BOLD, 12), java.awt.Color.red), panel2.getBorder())); panel2.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent e) { if ("border".equals(e.getPropertyName())) throw new RuntimeException(); } }); panel2.setLayout(new FormLayout("51dlu, $lcgap, 54dlu", "default, $lgap, default")); //---- comboBox1 ---- comboBox1.setModel(new DefaultComboBoxModel(new String[] { "<Design>", "Design A", "Design B" })); comboBox1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { comboBox1ActionPerformed(e); } }); panel2.add(comboBox1, cc.xy(1, 1)); panel2.add(textField1, cc.xy(3, 1)); //---- button1 ---- startTiming.setText("Start"); startTiming.setBackground(Color.green); startTiming.addMouseListener(new MouseListener() { public void mouseReleased(MouseEvent e) { } public void mousePressed(MouseEvent e) { } public void mouseExited(MouseEvent e) { } public void mouseEntered(MouseEvent e) { } public void mouseClicked(MouseEvent e) { if (!beingTimed) { resetDesigns(false); tasksRun++; beingTimed = true; watch.start(); System.out.println("***Task #" + tasksRun); startTiming.setText("Stop"); startTiming.setBackground(Color.red); } else { beingTimed = false; watch.stop(); resetDesigns(true); System.out.println("Time Taken: " + watch.getElapsedTimeSecs() + " seconds"); System.out.println("***End of Task #" + tasksRun + "\n"); startTiming.setBackground(Color.green); startTiming.setText("Start"); } } }); panel2.add(startTiming, cc.xy(1, 3)); } contentPane.add(panel2, cc.xywh(3, 9, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //======== panel1 ======== { panel1.setLayout(new FormLayout("6*(default, $lcgap), default", "2*(default)")); //---- DockButton_Jacket ---- DockButton_Jacket.setIcon(new ImageIcon(getClass().getResource("/Assets/DockItems/Jackets.png"))); DockButton_Jacket.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { DockButton_JacketMouseClicked(e); } }); panel1.add(DockButton_Jacket, cc.xy(1, 1)); //---- DockButton_CShirt ---- DockButton_CShirt .setIcon(new ImageIcon(getClass().getResource("/Assets/DockItems/CollaredShirts.png"))); DockButton_CShirt.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { DockButton_CShirtMouseClicked(e); } }); panel1.add(DockButton_CShirt, cc.xy(3, 1)); //---- DockButton_TShirt ---- DockButton_TShirt.setIcon(new ImageIcon(getClass().getResource("/Assets/DockItems/Shirt.png"))); DockButton_TShirt.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { DockButton_TShirtMouseClicked(e); } }); panel1.add(DockButton_TShirt, cc.xy(5, 1)); //---- DockButton_TTop ---- DockButton_TTop.setIcon(new ImageIcon(getClass().getResource("/Assets/DockItems/TankTop.png"))); DockButton_TTop.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { DockButton_TTopMouseClicked(e); } }); panel1.add(DockButton_TTop, cc.xy(7, 1)); //---- DockButton_Dress ---- DockButton_Dress.setIcon(new ImageIcon(getClass().getResource("/Assets/DockItems/Dresses.png"))); DockButton_Dress.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { DockButton_DressMouseClicked(e); } }); panel1.add(DockButton_Dress, cc.xy(9, 1)); //---- DockButton_Pants ---- DockButton_Pants.setIcon(new ImageIcon(getClass().getResource("/Assets/DockItems/Pants.png"))); DockButton_Pants.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { DockButton_PantsMouseClicked(e); } }); panel1.add(DockButton_Pants, cc.xy(11, 1)); //---- DockButton_Uwear ---- DockButton_Uwear.setIcon(new ImageIcon(getClass().getResource("/Assets/DockItems/underwear.png"))); DockButton_Uwear.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { DockButton_UwearMouseClicked(e); } }); panel1.add(DockButton_Uwear, cc.xy(13, 1)); //---- DockLabel_Jacket ---- DockLabel_Jacket.setText("Jackets"); DockLabel_Jacket.setEnabled(false); panel1.add(DockLabel_Jacket, cc.xywh(1, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- DockLabel_CShirt ---- DockLabel_CShirt.setText("Collared Shirts"); DockLabel_CShirt.setEnabled(false); panel1.add(DockLabel_CShirt, cc.xywh(3, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- DockLabel_TShirt ---- DockLabel_TShirt.setText("T-Shirts"); DockLabel_TShirt.setEnabled(false); panel1.add(DockLabel_TShirt, cc.xywh(5, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- DockLabel_TTop ---- DockLabel_TTop.setText("Tank Tops"); DockLabel_TTop.setEnabled(false); panel1.add(DockLabel_TTop, cc.xywh(7, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- DockLabel_Dress ---- DockLabel_Dress.setText("Dresses"); DockLabel_Dress.setEnabled(false); panel1.add(DockLabel_Dress, cc.xywh(9, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- DockLabel_Pants ---- DockLabel_Pants.setText("Pants"); DockLabel_Pants.setEnabled(false); panel1.add(DockLabel_Pants, cc.xywh(11, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- DockLabel_UWear ---- DockLabel_UWear.setText("Underwear"); DockLabel_UWear.setEnabled(false); panel1.add(DockLabel_UWear, cc.xywh(13, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); } contentPane.add(panel1, cc.xy(5, 9)); contentPane.add(separator2, cc.xy(5, 11)); //======== Frame_ShirtFilter ======== { Frame_ShirtFilter.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE); Frame_ShirtFilter.setTitle("Design A"); Container Frame_ShirtFilterContentPane = Frame_ShirtFilter.getContentPane(); Frame_ShirtFilterContentPane.setLayout(new FormLayout("default, $lcgap, 85dlu, $lcgap, default", "default, $lgap, [8dlu,default], 2*($lgap, default), $lgap, 10dlu, 2*($lgap, default), $lgap, 11dlu, 3*($lgap, default)")); //---- Label_Options ---- Label_Options.setText("Options"); Label_Options.setFont(new Font("Dialog", Font.BOLD, 14)); Frame_ShirtFilterContentPane.add(Label_Options, cc.xy(3, 1)); Frame_ShirtFilterContentPane.add(vSpacer2, cc.xy(3, 3)); //---- Label_SizeSelection ---- Label_SizeSelection.setText("Size:"); Frame_ShirtFilterContentPane.add(Label_SizeSelection, cc.xy(1, 5)); //======== splitPane2 ======== { //---- Label_SizeStatus ---- Label_SizeStatus.setText("--"); splitPane2.setLeftComponent(Label_SizeStatus); //---- SizeButton_Clear ---- SizeButton_Clear.setText("Clear"); SizeButton_Clear.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { coverFlow().resetSizes(true); Label_SizeStatus.setText("--"); } }); splitPane2.setRightComponent(SizeButton_Clear); } Frame_ShirtFilterContentPane.add(splitPane2, cc.xywh(3, 5, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //======== panel6 ======== { panel6.setLayout(new FormLayout("[16dlu,min], [16dlu,default], 3*([16dlu,min])", "default")); //---- SizeButton_XS ---- SizeButton_XS.setText("XS"); SizeButton_XS.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { SizeButton_XSMouseClicked(e); } }); panel6.add(SizeButton_XS, cc.xy(1, 1)); //---- SizeButton_S ---- SizeButton_S.setText("S"); SizeButton_S.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { SizeButton_SMouseClicked(e); } }); panel6.add(SizeButton_S, cc.xy(2, 1)); //---- SizeButton_M ---- SizeButton_M.setText("M"); SizeButton_M.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { SizeButton_MMouseClicked(e); } }); panel6.add(SizeButton_M, cc.xy(3, 1)); //---- SizeButton_L ---- SizeButton_L.setText("L"); SizeButton_L.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { SizeButton_LMouseClicked(e); } }); panel6.add(SizeButton_L, cc.xy(4, 1)); //---- SizeButton_XL ---- SizeButton_XL.setText("XL"); SizeButton_XL.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { SizeButton_XLMouseClicked(e); } }); panel6.add(SizeButton_XL, cc.xy(5, 1)); } Frame_ShirtFilterContentPane.add(panel6, cc.xywh(3, 7, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); Frame_ShirtFilterContentPane.add(vSpacer1, cc.xy(3, 9)); //---- Label_ColorSelection ---- Label_ColorSelection.setText("Color:"); Frame_ShirtFilterContentPane.add(Label_ColorSelection, cc.xy(1, 11)); //======== splitPane1 ======== { //---- Label_ColorStatus ---- Label_ColorStatus.setText(" "); Label_ColorStatus.setEnabled(false); splitPane1.setLeftComponent(Label_ColorStatus); //---- ColorButton_Clear ---- ColorButton_Clear.setText("Clear"); ColorButton_Clear.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { ColorButton_ClearMouseClicked(e); } }); splitPane1.setRightComponent(ColorButton_Clear); } Frame_ShirtFilterContentPane.add(splitPane1, cc.xywh(3, 11, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //======== panel7 ======== { colorPalette.setLayout(new FormLayout("9*(default)", "2*(default)")); //---- Button_Black ---- Button_Black.setText(" "); Button_Black.setBackground(Color.black); Button_Black.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { Button_BlackMouseClicked(e); } }); colorPalette.add(Button_Black, cc.xy(1, 1)); //---- Button_White ---- Button_White.setText(" "); Button_White.setBackground(Color.white); Button_White.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { Button_WhiteMouseClicked(e); } }); colorPalette.add(Button_White, cc.xy(1, 2)); //---- Button_Red ---- Button_Red.setText(" "); Button_Red.setBackground(Color.red); Button_Red.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { Button_RedMouseClicked(e); } }); colorPalette.add(Button_Red, cc.xy(3, 1)); //---- Button_Pink ---- Button_Pink.setText(" "); Button_Pink.setBackground(new Color(255, 31, 229)); Button_Pink.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { ButtonPinkButtonClicked(e); } }); colorPalette.add(Button_Pink, cc.xy(2, 2)); //---- Button_Purple ---- Button_Purple.setText(" "); Button_Purple.setBackground(new Color(94, 61, 155)); Button_Purple.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { Button_PurpleMouseClicked(e); } }); colorPalette.add(Button_Purple, cc.xy(5, 2)); //---- Button_Yellow ---- Button_Yellow.setText(" "); Button_Yellow.setBackground(Color.yellow); Button_Yellow.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { Button_YellowMouseClicked(e); } }); colorPalette.add(Button_Yellow, cc.xy(3, 2)); //---- Button_Green ---- Button_Green.setText(" "); Button_Green.setBackground(new Color(54, 127, 31)); Button_Green.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { Button_GreenMouseClicked(e); } }); colorPalette.add(Button_Green, cc.xy(4, 1)); //---- Button Light Blue ---- ButtonLightBlue.setText(" "); ButtonLightBlue.setBackground(new Color(111, 247, 255)); ButtonLightBlue.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { ButtonLightBlue(e); } }); colorPalette.add(ButtonLightBlue, cc.xy(4, 2)); //---- Button_Blue ---- Button_Blue.setText(" "); Button_Blue.setBackground(Color.blue); Button_Blue.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { Button_BlueMouseClicked(e); } }); colorPalette.add(Button_Blue, cc.xy(5, 1)); Button_Grey.setText(" "); Button_Grey.setBackground(new Color(198, 198, 198)); Button_Grey.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { Button_GreyMouseClicked(e); } }); colorPalette.add(Button_Grey, cc.xy(2, 1)); } Frame_ShirtFilterContentPane.add(colorPalette, cc.xy(3, 13)); Frame_ShirtFilterContentPane.add(vSpacer3, cc.xy(3, 15)); //---- Label_PriceSelection ---- Label_PriceSelection.setText("Price:"); Frame_ShirtFilterContentPane.add(Label_PriceSelection, cc.xy(1, 17)); //======== splitPane3 ======== { //---- Label_PriceStatus ---- Label_PriceStatus.setText("------------"); splitPane3.setLeftComponent(Label_PriceStatus); //---- PriceButton_Clear ---- PriceButton_Clear.setText("Clear"); PriceButton_Clear.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { PriceButton_ClearMouseClicked(e); } }); splitPane3.setRightComponent(PriceButton_Clear); } Frame_ShirtFilterContentPane.add(splitPane3, cc.xywh(3, 17, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //======== panel8 ======== { panel8.setLayout(new FormLayout("default", "3*(default, $lgap), default")); //---- Button_Price25_49 ---- bPrice26_50.setText("$26-$50"); bPrice26_50.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { setPrice26_50(e); } }); panel8.add(bPrice26_50, cc.xy(1, 1)); //---- Button_Price51_75 ---- bPrice51_75.setText("$51-$75"); bPrice51_75.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { setPrice51_75(e); } }); panel8.add(bPrice51_75, cc.xy(1, 3)); //---- Button_Price 76-100---- bPrice76_100.setText("$76-$100"); bPrice76_100.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { setPrice76_100(e); } }); panel8.add(bPrice76_100, cc.xy(1, 5)); //---- Button_PriceMore100 ---- bprice101_125.setText("$101-$125"); bprice101_125.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { setPrice101_125(e); } }); panel8.add(bprice101_125, cc.xy(1, 7)); } Frame_ShirtFilterContentPane.add(panel8, cc.xy(3, 19)); } contentPane.add(Frame_ShirtFilter, cc.xywh(3, 13, 1, 5)); //======== internalFrame1 ======== { DesignB.setTitle("Design B"); Container internalFrame1ContentPane = DesignB.getContentPane(); internalFrame1ContentPane.setLayout(new FormLayout( "2*(default, $lcgap), 20dlu, $lcgap, default, $lcgap, 22dlu, 4*($lcgap, default)", "4*(default, $lgap), 47dlu, 2*($lgap, default), $lgap, 26dlu, 10*($lgap, default)")); //---- label1 ---- label1.setText("Options"); internalFrame1ContentPane.add(label1, cc.xy(3, 3)); //---- label2 ---- label2.setText("Size"); internalFrame1ContentPane.add(label2, cc.xy(3, 5)); //======== Size Toggle Panel ======== { sizeButtonPanel.setLayout(new FormLayout("16dlu, 4*([16dlu,default])", "default")); //---- Toggle_XS ---- Toggle_XS.setText("XS"); Toggle_XS.addMouseListener(new MouseListener() { public void mouseReleased(MouseEvent e) { } public void mousePressed(MouseEvent e) { } public void mouseExited(MouseEvent e) { } public void mouseEntered(MouseEvent e) { } public void mouseClicked(MouseEvent e) { if (Toggle_XS.getSelectedObjects() != null) { coverFlow().addFilterSize("XS"); } else { coverFlow().removeFilterSize("XS"); } } }); sizeButtonPanel.add(Toggle_XS, cc.xy(1, 1)); //---- Toggle_S ---- Toggle_S.setText("S"); Toggle_S.addMouseListener(new MouseListener() { public void mouseReleased(MouseEvent e) { } public void mousePressed(MouseEvent e) { } public void mouseExited(MouseEvent e) { } public void mouseEntered(MouseEvent e) { } public void mouseClicked(MouseEvent e) { if (Toggle_S.getSelectedObjects() != null) { coverFlow().addFilterSize("S"); } else { coverFlow().removeFilterSize("S"); } } }); sizeButtonPanel.add(Toggle_S, cc.xy(2, 1)); //---- Toggle_M ---- Toggle_M.setText("M"); Toggle_M.addMouseListener(new MouseListener() { public void mouseReleased(MouseEvent e) { } public void mousePressed(MouseEvent e) { } public void mouseExited(MouseEvent e) { } public void mouseEntered(MouseEvent e) { } public void mouseClicked(MouseEvent e) { if (Toggle_M.getSelectedObjects() != null) { coverFlow().addFilterSize("M"); } else { coverFlow().removeFilterSize("M"); } } }); sizeButtonPanel.add(Toggle_M, cc.xy(3, 1)); //---- Toggle_L ---- Toggle_L.setText("L"); Toggle_L.addMouseListener(new MouseListener() { public void mouseReleased(MouseEvent e) { } public void mousePressed(MouseEvent e) { } public void mouseExited(MouseEvent e) { } public void mouseEntered(MouseEvent e) { } public void mouseClicked(MouseEvent e) { if (Toggle_L.getSelectedObjects() != null) { coverFlow().addFilterSize("L"); } else { coverFlow().removeFilterSize("L"); } } }); sizeButtonPanel.add(Toggle_L, cc.xy(4, 1)); //---- Toggle_XL ---- Toggle_XL.setText("XL"); Toggle_XL.addMouseListener(new MouseListener() { public void mouseReleased(MouseEvent e) { } public void mousePressed(MouseEvent e) { } public void mouseExited(MouseEvent e) { } public void mouseEntered(MouseEvent e) { } public void mouseClicked(MouseEvent e) { if (Toggle_XL.getSelectedObjects() != null) { coverFlow().addFilterSize("XL"); } else { coverFlow().removeFilterSize("XL"); } } }); sizeButtonPanel.add(Toggle_XL, cc.xy(5, 1)); } internalFrame1ContentPane.add(sizeButtonPanel, cc.xy(7, 5)); internalFrame1ContentPane.add(vSpacer4, cc.xy(7, 7)); //---- Color Label Palette ---- colorLabelPalette.setText("Color Palette"); internalFrame1ContentPane.add(colorLabelPalette, cc.xy(3, 9)); //======== panel4 ======== { panel4.setLayout(new FormLayout("23dlu, $lcgap, default", "22dlu, $lgap, default")); //---- Color Chooser #1 ---- primaryColorChooser.setToolTipText("Click and hold to select a color from the rainbow palette"); primaryColorChooser.setColor(Color.gray); primaryColorChooser.addPropertyChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { try { Color color = (Color) evt.getNewValue(); coverFlow().resetColors(false); coverFlow().addFilterColor(colorToString(color), false); } catch (Exception e) { } } }); primaryColorChooser.addMouseListener(new MouseListener() { @Override public void mouseReleased(MouseEvent e) { coverFlow().incrementRouteCounter(); } @Override public void mousePressed(MouseEvent e) { // TODO Auto-generated method stub } @Override public void mouseExited(MouseEvent e) { // TODO Auto-generated method stub } @Override public void mouseEntered(MouseEvent e) { // TODO Auto-generated method stub } @Override public void mouseClicked(MouseEvent e) { // TODO Auto-generated method stub } }); panel4.add(primaryColorChooser, cc.xy(1, 1)); ColorPalette_Clear.setText("Clear"); ColorPalette_Clear.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { primaryColorChooser.setColor(Color.gray); coverFlow().resetColors(true); } }); panel4.add(ColorPalette_Clear, cc.xy(3, 1)); } internalFrame1ContentPane.add(panel4, cc.xywh(7, 9, 1, 1, CellConstraints.DEFAULT, CellConstraints.BOTTOM)); internalFrame1ContentPane.add(vSpacer5, cc.xy(7, 11)); //---- label4 ---- priceRangeLabel.setText("Price Range"); internalFrame1ContentPane.add(priceRangeLabel, cc.xy(3, 15)); //---- textField2 ---- rangeMinLabel.setText("25"); rangeMinLabel.setEditable(false); internalFrame1ContentPane.add(rangeMinLabel, cc.xy(5, 15)); //---- rangeSlider1 ---- rangeSlider1.setMaximum(125); rangeSlider1.setMinimum(25); rangeSlider1.setHighValue(125); rangeSlider1.setLowValue(25); rangeSlider1.setPaintTicks(true); rangeSlider1.setPaintLabels(true); rangeSlider1.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent e) { rangeSlider1StateChanged(e); } }); rangeSlider1.addMouseListener(new MouseListener() { @Override public void mouseReleased(MouseEvent e) { coverFlow().incrementRouteCounter(); } @Override public void mousePressed(MouseEvent e) { // TODO Auto-generated method stub } @Override public void mouseExited(MouseEvent e) { // TODO Auto-generated method stub } @Override public void mouseEntered(MouseEvent e) { // TODO Auto-generated method stub } @Override public void mouseClicked(MouseEvent e) { // TODO Auto-generated method stub } }); internalFrame1ContentPane.add(rangeSlider1, cc.xy(7, 15)); //---- RangeMaxLabel ---- rangeMaxLabel.setText("125"); rangeMaxLabel.setEditable(false); internalFrame1ContentPane.add(rangeMaxLabel, cc.xy(9, 15)); } contentPane.add(DesignB, cc.xywh(3, 15, 1, 1, CellConstraints.DEFAULT, CellConstraints.TOP)); setSize(1475, 715); setLocationRelativeTo(getOwner()); // JFormDesigner - End of component initialization //GEN-END:initComponents setupCoverFlows(this, cc); }
From source file:editor.SettingsDialog.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner Evaluation license - sz gajek panel1 = new JPanel(); horSize_lab = new JLabel(); horSize_TF = new JTextField(); vertSize_lab = new JLabel(); vertSize_TF = new JTextField(); gridSize_lab = new JLabel(); gridSize_TF = new JTextField(); gridMeters_lab = new JLabel(); gridMeters_TF = new JTextField(); sensorRange_lab = new JLabel(); sensorRange_TF = new JTextField(); panel3 = new JPanel(); dashedLineLab = new JLabel(); dashedModeACC_radio = new JRadioButton(); label1 = new JLabel(); dashedModeVIS_radio = new JRadioButton(); panel4 = new JPanel(); floorsNumberLab = new JLabel(); floorNumberComboBox = new JComboBox(); label4 = new JLabel(); panel2 = new JPanel(); applyAndReset = new JButton(); apply_button = new JButton(); cancel_button = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setTitle("Settings"); setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); Container contentPane = getContentPane(); contentPane.setLayout(new FormLayout("105dlu:grow", "2*(default, $lgap), 31dlu, $lgap, bottom:46dlu:grow, $lgap, bottom:default, $lgap, 9dlu")); //======== panel1 ======== {/*from w w w .j a va 2s . c o m*/ // JFormDesigner evaluation mark panel1.setBorder(new javax.swing.border.CompoundBorder( new javax.swing.border.TitledBorder(new javax.swing.border.EmptyBorder(0, 0, 0, 0), "JFormDesigner Evaluation", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.BOTTOM, new java.awt.Font("Dialog", java.awt.Font.BOLD, 12), java.awt.Color.red), panel1.getBorder())); panel1.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent e) { if ("border".equals(e.getPropertyName())) throw new RuntimeException(); } }); panel1.setLayout(new FormLayout("29dlu, $lcgap, 67dlu, $lcgap, 91dlu, $lcgap, 133dlu", "4*(default, $lgap), default")); //---- horSize_lab ---- horSize_lab.setText("Horizontal Size"); panel1.add(horSize_lab, cc.xy(3, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- horSize_TF ---- horSize_TF.addCaretListener(new CaretListener() { @Override public void caretUpdate(CaretEvent e) { horSize_TFCaretUpdate(e); } }); panel1.add(horSize_TF, cc.xy(5, 1)); //---- vertSize_lab ---- vertSize_lab.setText("Vertical Size"); panel1.add(vertSize_lab, cc.xy(3, 3, CellConstraints.CENTER, CellConstraints.CENTER)); //---- vertSize_TF ---- vertSize_TF.addCaretListener(new CaretListener() { @Override public void caretUpdate(CaretEvent e) { vertSize_TFCaretUpdate(e); } }); panel1.add(vertSize_TF, cc.xy(5, 3)); //---- gridSize_lab ---- gridSize_lab.setText("Grid size[px]"); panel1.add(gridSize_lab, cc.xy(3, 5, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- gridSize_TF ---- gridSize_TF.addCaretListener(new CaretListener() { @Override public void caretUpdate(CaretEvent e) { gridSize_TFCaretUpdate(e); } }); panel1.add(gridSize_TF, cc.xy(5, 5)); //---- gridMeters_lab ---- gridMeters_lab.setText("Grid size[m]"); panel1.add(gridMeters_lab, cc.xy(3, 7, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- gridMeters_TF ---- gridMeters_TF.addCaretListener(new CaretListener() { @Override public void caretUpdate(CaretEvent e) { gridMeters_TFCaretUpdate(e); } }); panel1.add(gridMeters_TF, cc.xy(5, 7)); //---- sensorRange_lab ---- sensorRange_lab.setText("Sensor range[m]"); panel1.add(sensorRange_lab, cc.xy(3, 9)); //---- sensorRange_TF ---- sensorRange_TF.setText("6"); sensorRange_TF.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { sensorRange_TFFocusLost(e); } }); panel1.add(sensorRange_TF, cc.xy(5, 9)); } contentPane.add(panel1, cc.xy(1, 3, CellConstraints.LEFT, CellConstraints.TOP)); //======== panel3 ======== { panel3.setLayout(new FormLayout("22dlu, $lcgap, 73dlu, $lcgap, 95dlu, $lcgap, 129dlu", "2*(default)")); //---- dashedLineLab ---- dashedLineLab.setText("Dashed Line Meaning"); panel3.add(dashedLineLab, cc.xy(3, 1)); //---- dashedModeACC_radio ---- dashedModeACC_radio.setText("Accesibility"); dashedModeACC_radio.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { dashedModeACC_radioItemStateChanged(e); } }); panel3.add(dashedModeACC_radio, cc.xy(5, 1)); //---- label1 ---- label1.setText("(requires reset)"); panel3.add(label1, cc.xy(7, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //---- dashedModeVIS_radio ---- dashedModeVIS_radio.setText("Visibility and Adjency"); dashedModeVIS_radio.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { dashedModeVIS_radioItemStateChanged(e); } }); panel3.add(dashedModeVIS_radio, cc.xy(5, 2)); } contentPane.add(panel3, cc.xy(1, 5, CellConstraints.LEFT, CellConstraints.TOP)); //======== panel4 ======== { panel4.setLayout(new FormLayout("27dlu, $lcgap, 67dlu, $lcgap, 95dlu, $lcgap, 125dlu", "3*(default, $lgap), default")); //---- floorsNumberLab ---- floorsNumberLab.setText("Floors number"); panel4.add(floorsNumberLab, cc.xy(3, 1)); //---- floorNumberComboBox ---- floorNumberComboBox.setModel(new DefaultComboBoxModel(new String[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "15", "20", "25", "30" })); floorNumberComboBox.setSelectedIndex(2); floorNumberComboBox.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { floorNumberComboBoxItemStateChanged(e); } }); panel4.add(floorNumberComboBox, cc.xy(5, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //---- label4 ---- label4.setText("(requires reset)"); panel4.add(label4, cc.xy(7, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); } contentPane.add(panel4, cc.xy(1, 7, CellConstraints.LEFT, CellConstraints.TOP)); //======== panel2 ======== { panel2.setLayout(new FormLayout("3*(default:grow, $lcgap), 43dlu:grow, 2*($lcgap, 43dlu), $lcgap, 3dlu", "default")); //---- applyAndReset ---- applyAndReset.setText("Apply and Reset"); applyAndReset.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { applyAndResetActionPerformed(e); } }); panel2.add(applyAndReset, cc.xy(7, 1)); //---- apply_button ---- apply_button.setText("Apply"); apply_button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { apply_buttonActionPerformed(e); } }); panel2.add(apply_button, cc.xy(9, 1)); //---- cancel_button ---- cancel_button.setText("Cancel"); cancel_button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { cancel_buttonActionPerformed(e); } }); panel2.add(cancel_button, cc.xy(11, 1)); } contentPane.add(panel2, cc.xy(1, 9, CellConstraints.FILL, CellConstraints.BOTTOM)); setSize(520, 375); setLocationRelativeTo(getOwner()); //---- dashedMeaning_BG ---- ButtonGroup dashedMeaning_BG = new ButtonGroup(); dashedMeaning_BG.add(dashedModeACC_radio); dashedMeaning_BG.add(dashedModeVIS_radio); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:edu.byu.plugins.editors.ArchDescPhysicalDescFields.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license repositoryInfo = new JPanel(); panel21 = new JPanel(); label_resourcesExtentNumber = new JLabel(); resourcesExtentNumber = ATBasicComponentFactory.createDoubleField(detailsModel, ArchDescriptionPhysicalDescriptions.PROPERTYNAME_EXTENT_NUMBER); extentType2 = ATBasicComponentFactory.createComboBox(detailsModel, ArchDescriptionPhysicalDescriptions.PROPERTYNAME_EXTENT_TYPE, ArchDescriptionPhysicalDescriptions.class); label_resourcesExtentDescription = new JLabel(); scrollPane422 = new JScrollPane(); containerSummary = ATBasicComponentFactory.createTextArea( detailsModel.getModel(ArchDescriptionPhysicalDescriptions.PROPERTYNAME_CONTAINER_SUMMARY), false); label_resourcesExtentDescription2 = new JLabel(); scrollPane423 = new JScrollPane(); containerSummary2 = ATBasicComponentFactory.createTextArea( detailsModel.getModel(ArchDescriptionPhysicalDescriptions.PROPERTYNAME_PHYSICAL_DETAILS), false); label_resourcesExtentDescription3 = new JLabel(); scrollPane424 = new JScrollPane(); containerSummary3 = ATBasicComponentFactory.createTextArea( detailsModel.getModel(ArchDescriptionPhysicalDescriptions.PROPERTYNAME_DIMENSIONS), false); CellConstraints cc = new CellConstraints(); //======== this ======== setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); setBackground(new Color(200, 205, 232)); setLayout(new FormLayout("default:grow", "top:default:grow")); //======== repositoryInfo ======== {/*from w w w .ja v a 2 s .com*/ repositoryInfo.setBorder(Borders.DLU4_BORDER); repositoryInfo.setOpaque(false); repositoryInfo.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); repositoryInfo.setBackground(new Color(200, 205, 232)); repositoryInfo.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec("max(default;400px):grow") }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //======== panel21 ======== { panel21.setOpaque(false); panel21.setLayout( new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- label_resourcesExtentNumber ---- label_resourcesExtentNumber.setText("Extent"); label_resourcesExtentNumber.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesExtentNumber, ArchDescriptionPhysicalDescriptions.class, ArchDescriptionPhysicalDescriptions.PROPERTYNAME_EXTENT_NUMBER); panel21.add(label_resourcesExtentNumber, cc.xywh(1, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //---- resourcesExtentNumber ---- resourcesExtentNumber.setColumns(4); resourcesExtentNumber.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel21.add(resourcesExtentNumber, cc.xywh(3, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //---- extentType2 ---- extentType2.setOpaque(false); extentType2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel21.add(extentType2, new CellConstraints(5, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT, new Insets(0, 5, 5, 5))); } repositoryInfo.add(panel21, cc.xywh(1, 1, 3, 1)); //---- label_resourcesExtentDescription ---- label_resourcesExtentDescription.setText("Container Summary"); label_resourcesExtentDescription.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesExtentDescription, ArchDescriptionPhysicalDescriptions.class, ArchDescriptionPhysicalDescriptions.PROPERTYNAME_CONTAINER_SUMMARY); repositoryInfo.add(label_resourcesExtentDescription, cc.xywh(1, 3, 3, 1)); //======== scrollPane422 ======== { scrollPane422.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane422.setOpaque(false); scrollPane422.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); //---- containerSummary ---- containerSummary.setRows(4); containerSummary.setWrapStyleWord(true); containerSummary.setLineWrap(true); containerSummary.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); scrollPane422.setViewportView(containerSummary); } repositoryInfo.add(scrollPane422, cc.xywh(1, 5, 3, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- label_resourcesExtentDescription2 ---- label_resourcesExtentDescription2.setText("Other Physical Details"); label_resourcesExtentDescription2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesExtentDescription2, ArchDescriptionPhysicalDescriptions.class, ArchDescriptionPhysicalDescriptions.PROPERTYNAME_PHYSICAL_DETAILS); repositoryInfo.add(label_resourcesExtentDescription2, cc.xywh(1, 7, 3, 1)); //======== scrollPane423 ======== { scrollPane423.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane423.setOpaque(false); scrollPane423.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); //---- containerSummary2 ---- containerSummary2.setRows(4); containerSummary2.setWrapStyleWord(true); containerSummary2.setLineWrap(true); containerSummary2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); scrollPane423.setViewportView(containerSummary2); } repositoryInfo.add(scrollPane423, cc.xywh(1, 9, 3, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- label_resourcesExtentDescription3 ---- label_resourcesExtentDescription3.setText("Container Summary"); label_resourcesExtentDescription3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesExtentDescription3, ArchDescriptionPhysicalDescriptions.class, ArchDescriptionPhysicalDescriptions.PROPERTYNAME_DIMENSIONS); repositoryInfo.add(label_resourcesExtentDescription3, cc.xywh(1, 11, 3, 1)); //======== scrollPane424 ======== { scrollPane424.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane424.setOpaque(false); scrollPane424.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); //---- containerSummary3 ---- containerSummary3.setRows(4); containerSummary3.setWrapStyleWord(true); containerSummary3.setLineWrap(true); containerSummary3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); scrollPane424.setViewportView(containerSummary3); } repositoryInfo.add(scrollPane424, cc.xywh(1, 13, 3, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); } add(repositoryInfo, cc.xy(1, 1)); // JFormDesigner - End of component initialization //GEN-END:initComponents }