List of usage examples for com.jgoodies.forms.layout CellConstraints xywh
public CellConstraints xywh(int col, int row, int colSpan, int rowSpan)
Examples:
cc.xywh(1, 3, 2, 1); cc.xywh(1, 3, 7, 3);
From source file:anl.verdi.plot.gui.ObsOverlayDialog.java
protected void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license DefaultComponentFactory compFactory = DefaultComponentFactory.getInstance(); dialogPane = new JPanel(); contentPanel = new JPanel(); statusLbl = new JLabel(); separator1 = compFactory.createSeparator("Observation Details"); scrollPane1 = new JScrollPane(); varList = new JList(); label1 = new JLabel(); strokeSpn = new JSpinner(); label2 = new JLabel(); shapeSpn = new JSpinner(); buttonBar = new JPanel(); okButton = new JButton(); cancelButton = new JButton(); String verdiHome = Tools.getVerdiHome(); // 2014 new method for reading in an image file String separator = "/"; // use forward slash only for constructor ImageIcon(String filename); String pathName = verdiHome + separator + "plugins" + separator + "core" + separator + "icons" + separator; String fileCircle = new String(pathName + "circle.png"); String fileDiamond = new String(pathName + "diamond.png"); String fileSquare = new String(pathName + "square.png"); String fileStar = new String(pathName + "star.png"); String fileSun = new String(pathName + "sun.png"); String fileTriangle = new String(pathName + "triangle.png"); names = new Symbol[] { Symbol.CIRCLE, Symbol.DIAMOND, Symbol.SQUARE, Symbol.STAR, Symbol.SUN, Symbol.TRIANGLE };//ww w.j a va 2 s. c o m symbols = new Icon[] { new ImageIcon(fileCircle), new ImageIcon(fileDiamond), new ImageIcon(fileSquare), new ImageIcon(fileStar), new ImageIcon(fileSun), new ImageIcon(fileTriangle) // new ImageIcon(getClass().getResource("/circle.png")), // new ImageIcon(getClass().getResource("/diamond.png")), // new ImageIcon(getClass().getResource("/square.png")), // new ImageIcon(getClass().getResource("/star.png")), // new ImageIcon(getClass().getResource("/sun.png")), // new ImageIcon(getClass().getResource("/triangle.png")) }; symList = new JComboBox(names); label3 = new JLabel(); symPanel = new JPanel(new BorderLayout()); selectedImg = new JLabel(); selectedImg.setIcon(symbols[0]); symPanel.add(selectedImg, BorderLayout.LINE_START); symPanel.add(symList, BorderLayout.LINE_END); symList.addActionListener(new AbstractAction() { private static final long serialVersionUID = -5121239000837587642L; @Override public void actionPerformed(ActionEvent e) { int index = ((JComboBox) e.getSource()).getSelectedIndex(); selectedImg.setIcon(symbols[index]); } }); CellConstraints cc = new CellConstraints(); //======== this ======== setTitle("Observation Dialog"); setModal(true); setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== dialogPane ======== { dialogPane.setBorder(Borders.DIALOG_BORDER); dialogPane.setLayout(new BorderLayout()); //======== contentPanel ======== { // 2014 ColumnSpec aColumnSpec = new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, 0.6); ColumnSpec bColumnSpec = new ColumnSpec(ColumnSpec.FILL, Sizes.PREFERRED, 0.5); contentPanel.setLayout(new FormLayout( new ColumnSpec[] { aColumnSpec, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, bColumnSpec }, new RowSpec[] { FormFactory.PREF_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, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); // new ColumnSpec[] { // new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, 0.6), // FormFactory.LABEL_COMPONENT_GAP_COLSPEC, // FormFactory.RELATED_GAP_COLSPEC, // new ColumnSpec(ColumnSpec.FILL, Sizes.PREFERRED, 0.5) // }, // new RowSpec[] { // FormFactory.PREF_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, // FormFactory.LINE_GAP_ROWSPEC, // FormFactory.DEFAULT_ROWSPEC // })); //---- statusLbl ---- statusLbl.setForeground(Color.red); contentPanel.add(statusLbl, cc.xywh(1, 1, 4, 1)); contentPanel.add(separator1, cc.xywh(1, 3, 4, 1)); //======== scrollPane1 ======== { //---- varList ---- varList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); scrollPane1.setViewportView(varList); } contentPanel.add(scrollPane1, cc.xywh(1, 5, 1, 11)); //---- label1 ---- label1.setText("Stroke Size:"); contentPanel.add(label1, cc.xywh(3, 5, 2, 1)); //---- strokeSpn ---- strokeSpn.setModel(new SpinnerNumberModel(1, 1, null, 1)); contentPanel.add(strokeSpn, cc.xy(4, 7)); //---- label2 ---- label2.setText("Shape Size:"); contentPanel.add(label2, cc.xywh(3, 9, 2, 1)); //---- shapeSpn ---- shapeSpn.setModel(new SpinnerNumberModel(8, 1, null, 1)); contentPanel.add(shapeSpn, cc.xy(4, 11)); //---- label3 ---- label3.setText("Symbol:"); contentPanel.add(label3, cc.xywh(3, 13, 2, 1)); //---- symPanel ---- contentPanel.add(symPanel, cc.xy(4, 15)); } dialogPane.add(contentPanel, BorderLayout.CENTER); //======== buttonBar ======== { buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER); RowSpec[] aRowSpec = RowSpec.decodeSpecs("pref"); buttonBar .setLayout( new FormLayout( new ColumnSpec[] { FormFactory.GLUE_COLSPEC, FormFactory.BUTTON_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC }, aRowSpec)); // buttonBar.setLayout(new FormLayout( // new ColumnSpec[] { // FormFactory.GLUE_COLSPEC, // FormFactory.BUTTON_COLSPEC, // FormFactory.RELATED_GAP_COLSPEC, // FormFactory.BUTTON_COLSPEC // }, // RowSpec.decodeSpecs("pref"))); //---- okButton ---- okButton.setText("OK"); buttonBar.add(okButton, cc.xy(2, 1)); //---- cancelButton ---- cancelButton.setText("Cancel"); buttonBar.add(cancelButton, cc.xy(4, 1)); } dialogPane.add(buttonBar, BorderLayout.SOUTH); } contentPane.add(dialogPane, BorderLayout.CENTER); setSize(400, 260); setLocationRelativeTo(getOwner()); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:anl.verdi.plot.gui.ScatterDialog.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license DefaultComponentFactory compFactory = DefaultComponentFactory.getInstance(); dialogPane = new JPanel(); contentPanel = new JPanel(); separator2 = compFactory.createSeparator("Select Formulas for Axes"); scrollPane1 = new JScrollPane(); formulaList = new JList(); label1 = new JLabel(); fldX = new JTextField(); label2 = new JLabel(); fldY = new JTextField(); btnX = new JButton(); btnY = new JButton(); separator1 = compFactory.createSeparator(""); buttonBar = new JPanel(); okButton = new JButton(); cancelButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setModal(true);/*from w w w .j a v a 2 s . c om*/ Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== dialogPane ======== { dialogPane.setBorder(Borders.DIALOG_BORDER); dialogPane.setLayout(new BorderLayout()); //======== contentPanel ======== { // 2014 ColumnSpec[] aColumnSpec = ColumnSpec.decodeSpecs("min(min;5dlu):grow"); ColumnSpec[] bColumnSpec = ColumnSpec.decodeSpecs("max(min;75dlu)"); contentPanel.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.PREF_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.PREF_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, aColumnSpec[0], FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, bColumnSpec[0] }, 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, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); // contentPanel.setLayout(new FormLayout( // new ColumnSpec[] { // FormFactory.PREF_COLSPEC, // FormFactory.LABEL_COMPONENT_GAP_COLSPEC, // FormFactory.PREF_COLSPEC, // FormFactory.LABEL_COMPONENT_GAP_COLSPEC, // new ColumnSpec("min(min;5dlu):grow"), // FormFactory.LABEL_COMPONENT_GAP_COLSPEC, // FormFactory.RELATED_GAP_COLSPEC, // FormFactory.LABEL_COMPONENT_GAP_COLSPEC, // new ColumnSpec("max(min;75dlu)") // }, // 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, // FormFactory.LINE_GAP_ROWSPEC, // FormFactory.DEFAULT_ROWSPEC // })); contentPanel.add(separator2, cc.xywh(1, 1, 9, 1)); //======== scrollPane1 ======== { scrollPane1.setViewportView(formulaList); } contentPanel.add(scrollPane1, cc.xywh(1, 3, 5, 9)); //---- label1 ---- label1.setText("X-Axis:"); contentPanel.add(label1, cc.xywh(8, 3, 2, 1)); //---- fldX ---- fldX.setEditable(false); contentPanel.add(fldX, cc.xy(9, 5)); //---- label2 ---- label2.setText("Y-Axis:"); contentPanel.add(label2, cc.xywh(8, 7, 2, 1)); //---- fldY ---- fldY.setEditable(false); contentPanel.add(fldY, cc.xy(9, 9)); //---- btnX ---- btnX.setText("X-Axis"); contentPanel.add(btnX, cc.xy(1, 13)); //---- btnY ---- btnY.setText("Y-Axis"); contentPanel.add(btnY, cc.xy(3, 13)); contentPanel.add(separator1, cc.xywh(1, 15, 9, 1)); } dialogPane.add(contentPanel, BorderLayout.CENTER); //======== buttonBar ======== { buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER); RowSpec[] aRowSpec = RowSpec.decodeSpecs("pref"); buttonBar .setLayout( new FormLayout( new ColumnSpec[] { FormFactory.GLUE_COLSPEC, FormFactory.BUTTON_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC }, aRowSpec)); // buttonBar.setLayout(new FormLayout( // new ColumnSpec[] { // FormFactory.GLUE_COLSPEC, // FormFactory.BUTTON_COLSPEC, // FormFactory.RELATED_GAP_COLSPEC, // FormFactory.BUTTON_COLSPEC // }, // RowSpec.decodeSpecs("pref"))); //---- okButton ---- okButton.setText("OK"); buttonBar.add(okButton, cc.xy(2, 1)); //---- cancelButton ---- cancelButton.setText("Cancel"); buttonBar.add(cancelButton, cc.xy(4, 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:anl.verdi.plot.gui.VectorDialog.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license DefaultComponentFactory compFactory = DefaultComponentFactory.getInstance(); dialogPane = new JPanel(); contentPanel = new JPanel(); statusLbl = new JLabel(); separator2 = compFactory.createSeparator("Select Components"); scrollPane1 = new JScrollPane(); formulaList = new JList(); label1 = new JLabel(); fldX = new JTextField(); label2 = new JLabel(); fldY = new JTextField(); label3 = new JLabel(); fldTile = new JTextField(); clearTileBtn = new JButton(); panel1 = new JPanel(); btnX = new JButton(); btnY = new JButton(); tileBtn = new JButton(); separator1 = compFactory.createSeparator(""); buttonBar = new JPanel(); okButton = new JButton(); cancelButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setModal(true);/*from www . j a v a 2 s . c om*/ setTitle("Vector Plot"); Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== dialogPane ======== { dialogPane.setBorder(Borders.DIALOG_BORDER); dialogPane.setLayout(new BorderLayout()); //======== contentPanel ======== { // 2014 ColumnSpec[] aColumnSpec = ColumnSpec.decodeSpecs("min(min;5dlu):grow"); ColumnSpec[] bColumnSpec = ColumnSpec.decodeSpecs("max(min;75dlu)"); contentPanel.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.PREF_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.PREF_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, aColumnSpec[0], FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, bColumnSpec[0], FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, new RowSpec[] { FormFactory.PREF_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, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); // contentPanel.setLayout(new FormLayout( // new ColumnSpec[] { // FormFactory.PREF_COLSPEC, // FormFactory.LABEL_COMPONENT_GAP_COLSPEC, // FormFactory.PREF_COLSPEC, // FormFactory.LABEL_COMPONENT_GAP_COLSPEC, // new ColumnSpec("min(min;5dlu):grow"), // FormFactory.LABEL_COMPONENT_GAP_COLSPEC, // FormFactory.RELATED_GAP_COLSPEC, // FormFactory.LABEL_COMPONENT_GAP_COLSPEC, // new ColumnSpec("max(min;75dlu)"), // FormFactory.LABEL_COMPONENT_GAP_COLSPEC, // FormFactory.DEFAULT_COLSPEC // }, // new RowSpec[] { // FormFactory.PREF_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, // FormFactory.LINE_GAP_ROWSPEC, // FormFactory.DEFAULT_ROWSPEC, // FormFactory.LINE_GAP_ROWSPEC, // FormFactory.DEFAULT_ROWSPEC, // FormFactory.LINE_GAP_ROWSPEC, // FormFactory.DEFAULT_ROWSPEC // })); //---- statusLbl ---- statusLbl.setForeground(Color.red); statusLbl.setText(" "); contentPanel.add(statusLbl, cc.xywh(1, 1, 9, 1)); contentPanel.add(separator2, cc.xywh(1, 3, 9, 1)); //======== scrollPane1 ======== { scrollPane1.setViewportView(formulaList); } contentPanel.add(scrollPane1, cc.xywh(1, 5, 5, 11)); //---- label1 ---- label1.setText("Horizontal Component:"); contentPanel.add(label1, cc.xywh(8, 5, 2, 1)); //---- fldX ---- fldX.setEditable(false); contentPanel.add(fldX, cc.xywh(9, 7, 3, 1)); //---- label2 ---- label2.setText("Vertical Component:"); contentPanel.add(label2, cc.xywh(8, 9, 2, 1)); //---- fldY ---- fldY.setEditable(false); contentPanel.add(fldY, cc.xywh(9, 11, 3, 1)); //---- label3 ---- label3.setText("Tile (Optional):"); contentPanel.add(label3, cc.xywh(8, 13, 2, 1)); //---- fldTile ---- fldTile.setBackground(new Color(224, 223, 227)); fldTile.setEditable(false); contentPanel.add(fldTile, cc.xy(9, 15)); //---- clearTileBtn ---- clearTileBtn.setText("-"); clearTileBtn.setToolTipText("Clear Tile"); contentPanel.add(clearTileBtn, cc.xy(11, 15)); //======== panel1 ======== { // 2014 RowSpec[] aRowSpec = RowSpec.decodeSpecs("default"); panel1.setLayout( new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, aRowSpec)); // panel1.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"))); //---- btnX ---- btnX.setText("Horiz."); panel1.add(btnX, cc.xy(1, 1)); //---- btnY ---- btnY.setText("Vert."); panel1.add(btnY, cc.xy(3, 1)); //---- tileBtn ---- tileBtn.setText("Tile"); panel1.add(tileBtn, cc.xy(5, 1)); } contentPanel.add(panel1, cc.xywh(1, 17, 5, 1)); contentPanel.add(separator1, cc.xywh(1, 19, 11, 1)); } dialogPane.add(contentPanel, BorderLayout.CENTER); //======== buttonBar ======== { buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER); // 2014 RowSpec[] bRowSpec = RowSpec.decodeSpecs("pref"); buttonBar .setLayout( new FormLayout( new ColumnSpec[] { FormFactory.GLUE_COLSPEC, FormFactory.BUTTON_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC }, bRowSpec)); // buttonBar.setLayout(new FormLayout( // new ColumnSpec[] { // FormFactory.GLUE_COLSPEC, // FormFactory.BUTTON_COLSPEC, // FormFactory.RELATED_GAP_COLSPEC, // FormFactory.BUTTON_COLSPEC // }, // RowSpec.decodeSpecs("pref"))); //---- okButton ---- okButton.setText("OK"); buttonBar.add(okButton, cc.xy(2, 1)); //---- cancelButton ---- cancelButton.setText("Cancel"); buttonBar.add(cancelButton, cc.xy(4, 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:anl.verdi.plot.gui.VectorOverlayDialog.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license DefaultComponentFactory compFactory = DefaultComponentFactory.getInstance(); dialogPane = new JPanel(); contentPanel = new JPanel(); statusLbl = new JLabel(); separator2 = compFactory.createSeparator("Select Components"); scrollPane1 = new JScrollPane(); formulaList = new JList(); label1 = new JLabel(); labelV = new JLabel(); // 2015 text "Vector Sampling Increment" fldV = new JFormattedTextField(NumberFormat.getIntegerInstance()); // 2015 field for user-entered input fldV.setColumns(3);/*ww w . ja va 2s .c o m*/ fldX = new JTextField(); label2 = new JLabel(); fldY = new JTextField(); // panel1 = new JPanel(); btnX = new JButton(); btnY = new JButton(); separator1 = compFactory.createSeparator(""); separatorV = compFactory.createSeparator(""); buttonBar = new JPanel(); okButton = new JButton(); cancelButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setModal(true); setTitle("Vector Overlay"); Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== dialogPane ======== { dialogPane.setBorder(Borders.DIALOG_BORDER); dialogPane.setLayout(new BorderLayout()); //======== contentPanel ======== { // 2014 ColumnSpec[] aColumnSpec = ColumnSpec.decodeSpecs("min(min;5dlu):grow"); ColumnSpec[] bColumnSpec = ColumnSpec.decodeSpecs("max(min;100dlu)"); // CHANGED 75 TO 100 contentPanel.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.PREF_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.PREF_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, aColumnSpec[0], FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, bColumnSpec[0], FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, new RowSpec[] { FormFactory.PREF_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, 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, 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, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- statusLbl ---- statusLbl.setForeground(Color.red); statusLbl.setText(" "); contentPanel.add(statusLbl, cc.xywh(1, 1, 9, 1)); contentPanel.add(separator2, cc.xywh(1, 3, 9, 1)); //======== scrollPane1 ======== { scrollPane1.setViewportView(formulaList); } contentPanel.add(scrollPane1, cc.xywh(1, 5, 5, 8)); //---- label1 ---- label1.setText("Horizontal (X) Component:"); contentPanel.add(label1, cc.xywh(8, 5, 2, 1)); //---- fldX ---- fldX.setEditable(false); contentPanel.add(fldX, cc.xywh(9, 7, 3, 1)); //---- label2 ---- label2.setText("Vertical (Y) Component:"); contentPanel.add(label2, cc.xywh(8, 9, 2, 1)); //---- fldY ---- fldY.setEditable(false); contentPanel.add(fldY, cc.xywh(9, 11, 3, 1)); // //======== panel1 ======== // { // // 2014 // RowSpec[] aRowSpec = RowSpec.decodeSpecs("default"); // panel1.setLayout(new FormLayout( // new ColumnSpec[]{ // FormFactory.DEFAULT_COLSPEC, // FormFactory.LABEL_COMPONENT_GAP_COLSPEC, // FormFactory.DEFAULT_COLSPEC, // FormFactory.LABEL_COMPONENT_GAP_COLSPEC, // FormFactory.DEFAULT_COLSPEC // }, // new RowSpec[]{ // FormFactory.PREF_ROWSPEC, // FormFactory.LINE_GAP_ROWSPEC, // FormFactory.DEFAULT_ROWSPEC, // FormFactory.LINE_GAP_ROWSPEC, // FormFactory.DEFAULT_ROWSPEC, // FormFactory.LINE_GAP_ROWSPEC} // )); //---- btnX ---- btnX.setText("Horizontal"); contentPanel.add(btnX, cc.xywh(1, 13, 1, 1)); //---- btnY ---- btnY.setText("Vertical"); contentPanel.add(btnY, cc.xywh(3, 13, 1, 1)); // } // contentPanel.add(panel1, cc.xywh(1, 15, 5, 1)); contentPanel.add(separator1, cc.xywh(1, 19, 11, 1)); labelV.setText("Vector Sampling Increment: "); contentPanel.add(labelV, cc.xy(1, 21)); fldV.setEditable(true); fldV.setToolTipText("Enter 1 to show all vectors, 5 for every 5th vector, etc."); fldV.setSize(20, 10); // trying to make the box larger int anInt = 1; fldV.setValue(new Integer(anInt)); // default value is 1 (show all vectors) fldV.addPropertyChangeListener("value", this); contentPanel.add(fldV, cc.xywh(3, 21, 1, 1)); // 2 columns, 1 row contentPanel.add(separatorV, cc.xywh(1, 23, 11, 1)); pack(); dialogPane.add(contentPanel, BorderLayout.CENTER); //======== buttonBar ======== { buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER); // 2014 RowSpec[] bRowSpec = RowSpec.decodeSpecs("pref"); buttonBar .setLayout(new FormLayout( new ColumnSpec[] { FormFactory.GLUE_COLSPEC, FormFactory.BUTTON_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC }, bRowSpec)); //---- okButton ---- okButton.setText("OK"); buttonBar.add(okButton, cc.xy(2, 1)); //---- cancelButton ---- cancelButton.setText("Cancel"); buttonBar.add(cancelButton, cc.xy(4, 1)); } dialogPane.add(buttonBar, BorderLayout.SOUTH); pack(); } contentPane.add(dialogPane, BorderLayout.CENTER); pack(); setLocationRelativeTo(getOwner()); // JFormDesigner - End of component initialization //GEN-END:initComponents } }
From source file:anl.verdi.plot.gui.VerticalCrossDialog.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license DefaultComponentFactory compFactory = DefaultComponentFactory.getInstance(); dialogPane = new JPanel(); contentPanel = new JPanel(); separator1 = compFactory.createSeparator("Select Cross Section"); rbX = new JRadioButton(); lblColumn = new JLabel(); xSpinner = new JSpinner(); rbY = new JRadioButton(); lblRow = new JLabel(); ySpinner = new JSpinner(); separator2 = compFactory.createSeparator(""); buttonBar = new JPanel(); okButton = new JButton(); cancelButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setModal(true);//w w w . jav a 2 s . c om Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== dialogPane ======== { dialogPane.setBorder(Borders.DIALOG_BORDER); dialogPane.setLayout(new BorderLayout()); //======== contentPanel ======== { // 2014 ColumnSpec[] aColumnSpec = ColumnSpec.decodeSpecs("max(default;50dlu)"); ColumnSpec bColumnSpec = new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW); contentPanel.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, aColumnSpec[0], FormFactory.LABEL_COMPONENT_GAP_COLSPEC, bColumnSpec }, 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 })); // contentPanel.setLayout(new FormLayout( // new ColumnSpec[] { // FormFactory.DEFAULT_COLSPEC, // FormFactory.LABEL_COMPONENT_GAP_COLSPEC, // FormFactory.DEFAULT_COLSPEC, // FormFactory.LABEL_COMPONENT_GAP_COLSPEC, // new ColumnSpec("max(default;50dlu)"), // FormFactory.LABEL_COMPONENT_GAP_COLSPEC, // new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_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 // })); contentPanel.add(separator1, cc.xywh(1, 1, 7, 1)); //---- rbX ---- rbX.setText("X-Axis Cross Section"); contentPanel.add(rbX, cc.xywh(1, 3, 5, 1)); //---- lblColumn ---- lblColumn.setText("Column:"); contentPanel.add(lblColumn, cc.xy(3, 5)); contentPanel.add(xSpinner, cc.xy(5, 5)); //---- rbY ---- rbY.setText("Y-Axis Cross Section"); contentPanel.add(rbY, cc.xywh(1, 7, 5, 1)); //---- lblRow ---- lblRow.setText("Row:"); contentPanel.add(lblRow, cc.xy(3, 9)); contentPanel.add(ySpinner, cc.xy(5, 9)); contentPanel.add(separator2, cc.xywh(1, 11, 7, 1)); } dialogPane.add(contentPanel, BorderLayout.CENTER); //======== buttonBar ======== { buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER); // 2014 RowSpec[] aRowSpec = RowSpec.decodeSpecs("pref"); buttonBar .setLayout( new FormLayout( new ColumnSpec[] { FormFactory.GLUE_COLSPEC, FormFactory.BUTTON_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC }, aRowSpec)); // buttonBar.setLayout(new FormLayout( // new ColumnSpec[] { // FormFactory.GLUE_COLSPEC, // FormFactory.BUTTON_COLSPEC, // FormFactory.RELATED_GAP_COLSPEC, // FormFactory.BUTTON_COLSPEC // }, // RowSpec.decodeSpecs("pref"))); //---- okButton ---- okButton.setText("OK"); buttonBar.add(okButton, cc.xy(2, 1)); //---- cancelButton ---- cancelButton.setText("Cancel"); buttonBar.add(cancelButton, cc.xy(4, 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:au.gov.nla.atplugin.multiplecomponentidentifiers.panel.ResourceComponentBasicInfoPanel.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license panel7 = new JPanel(); label_resourcesTitle = new JLabel(); scrollPane42 = new JScrollPane(); resourcesTitle = ATBasicComponentFactory .createTextArea(detailsModel.getModel(ArchDescription.PROPERTYNAME_TITLE), false); tagApplicatorPanel = new JPanel(); insertInlineTag = ATBasicComponentFactory .createUnboundComboBox(InLineTagsUtils.getInLineTagList(InLineTagsUtils.TITLE)); panel38 = new JPanel(); panel35 = new JPanel(); label_resourcesDateExpression = new JLabel(); resourcesDateExpression = ATBasicComponentFactory .createTextField(detailsModel.getModel(ArchDescription.PROPERTYNAME_DATE_EXPRESSION), false); Date1Label1 = new JLabel(); label_resourcesDateBegin = new JLabel(); resourcesDateBegin = ATBasicComponentFactory.createIntegerField(detailsModel, ArchDescription.PROPERTYNAME_DATE_BEGIN); label_resourcesDateEnd = new JLabel(); resourcesDateEnd = ATBasicComponentFactory.createIntegerField(detailsModel, ArchDescription.PROPERTYNAME_DATE_END); BulkDatesLabel = new JLabel(); label_resourcesBulkDateBegin = new JLabel(); resourcesBulkDateBegin = ATBasicComponentFactory.createIntegerField(detailsModel, Resources.PROPERTYNAME_BULK_DATE_BEGIN); label_resourcesBulkDateEnd = new JLabel(); resourcesBulkDateEnd = ATBasicComponentFactory.createIntegerField(detailsModel, Resources.PROPERTYNAME_BULK_DATE_END); panel9 = new JPanel(); label_resourcesLanguageCode2 = new JLabel(); resourcesLanguageCode = ATBasicComponentFactory.createComboBox(detailsModel, ResourcesComponents.PROPERTYNAME_LANGUAGE_CODE, ResourcesComponents.class); panel5 = new JPanel(); panel20 = new JPanel(); ExtentLabel = new JLabel(); panel21 = new JPanel(); label_resourcesExtentNumber = new JLabel(); resourcesExtentNumber = ATBasicComponentFactory.createDoubleField(detailsModel, Resources.PROPERTYNAME_EXTENT_NUMBER); extentType = ATBasicComponentFactory.createComboBox(detailsModel, Resources.PROPERTYNAME_EXTENT_TYPE, Resources.class); label_resourcesExtentDescription = new JLabel(); scrollPane422 = new JScrollPane(); containerSummary = ATBasicComponentFactory .createTextArea(detailsModel.getModel(Resources.PROPERTYNAME_CONTAINER_SUMMARY), false); panel23 = new JPanel(); label_resourcesLanguageNote2 = new JLabel(); scrollPane423 = new JScrollPane(); resourcesLanguageNote = ATBasicComponentFactory.createTextArea( detailsModel.getModel(ResourcesComponents.PROPERTYNAME_REPOSITORY_PROCESSING_NOTE), false); separator2 = new JSeparator(); panel10 = new JPanel(); panel3 = new JPanel(); label_resourcesLevel = new JLabel(); resourcesLevel = ATBasicComponentFactory.createComboBox(detailsModel, ResourcesComponents.PROPERTYNAME_LEVEL, ResourcesComponents.class); label3 = new JLabel(); resourcesDateBegin2 = ATBasicComponentFactory .createTextField(detailsModel.getModel(ResourcesComponents.PROPERTYNAME_PERSISTENT_ID)); label_otherLevel = new JLabel(); resourcesOtherLevel = ATBasicComponentFactory .createTextField(detailsModel.getModel(ResourcesComponents.PROPERTYNAME_OTHER_LEVEL), false); label_repositoryName5 = new JLabel(); scrollPane9 = new JScrollPane(); identifiersTable = new DomainSortableTable(); panel25 = new JPanel(); addIdentifier = new JButton(); removeIdentifier = new JButton(); label1 = new JLabel(); scrollPane4 = new JScrollPane(); instancesTable = new DomainSortableTable(ArchDescriptionInstances.class, ArchDescriptionInstances.PROPERTYNAME_INSTANCE_TYPE); panel24 = new JPanel(); addInstanceButton = new JButton(); removeInstanceButton = new JButton(); panel4 = new JPanel(); restrictionsApply2 = ATBasicComponentFactory.createCheckBox(detailsModel, ResourcesComponents.PROPERTYNAME_INTERNAL_ONLY, ResourcesComponents.class); resourcesRestrictionsApply = ATBasicComponentFactory.createCheckBox(detailsModel, ArchDescription.PROPERTYNAME_RESTRICTIONS_APPLY, ResourcesComponents.class); CellConstraints cc = new CellConstraints(); //======== this ======== setBackground(new Color(200, 205, 232)); setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, 0.5), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec("max(default;350px):grow") }, RowSpec.decodeSpecs("default"))); //======== panel7 ======== {// w ww . j a v a 2 s.c o m panel7.setOpaque(false); panel7.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel7.setBorder(Borders.DLU2_BORDER); panel7.setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC }, new RowSpec[] { new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), 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, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) })); //---- label_resourcesTitle ---- label_resourcesTitle.setText("Title"); label_resourcesTitle.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesTitle, ResourcesComponents.class, ResourcesComponents.PROPERTYNAME_TITLE); panel7.add(label_resourcesTitle, cc.xy(1, 1)); //======== scrollPane42 ======== { scrollPane42.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane42.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); //---- resourcesTitle ---- resourcesTitle.setRows(4); resourcesTitle.setLineWrap(true); resourcesTitle.setWrapStyleWord(true); resourcesTitle.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); scrollPane42.setViewportView(resourcesTitle); } panel7.add(scrollPane42, cc.xywh(1, 3, 2, 1)); //======== tagApplicatorPanel ======== { tagApplicatorPanel.setOpaque(false); tagApplicatorPanel .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"))); //---- insertInlineTag ---- insertInlineTag.setOpaque(false); insertInlineTag.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); insertInlineTag.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { insertInlineTagActionPerformed(); } }); tagApplicatorPanel.add(insertInlineTag, cc.xy(1, 1)); } panel7.add(tagApplicatorPanel, cc.xywh(1, 5, 2, 1)); //======== panel38 ======== { panel38.setBorder(new BevelBorder(BevelBorder.LOWERED)); panel38.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel38.setBackground(new Color(182, 187, 212)); panel38.setLayout(new FormLayout("60px:grow", "fill:default:grow")); //======== panel35 ======== { panel35.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel35.setOpaque(false); panel35.setBorder(Borders.DLU2_BORDER); panel35.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, 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.DEFAULT_ROWSPEC })); //---- label_resourcesDateExpression ---- label_resourcesDateExpression.setText("Date Expression"); label_resourcesDateExpression.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesDateExpression, Resources.class, Resources.PROPERTYNAME_DATE_EXPRESSION); panel35.add(label_resourcesDateExpression, cc.xywh(2, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //---- resourcesDateExpression ---- resourcesDateExpression.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel35.add(resourcesDateExpression, new CellConstraints(4, 1, 5, 1, CellConstraints.DEFAULT, CellConstraints.TOP, new Insets(0, 0, 0, 5))); //---- Date1Label1 ---- Date1Label1.setText("Inclusive Dates"); Date1Label1.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel35.add(Date1Label1, new CellConstraints(2, 3, 1, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT, new Insets(0, 5, 0, 0))); //---- label_resourcesDateBegin ---- label_resourcesDateBegin.setText("Begin"); label_resourcesDateBegin.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesDateBegin, Resources.class, Resources.PROPERTYNAME_DATE_BEGIN); panel35.add(label_resourcesDateBegin, cc.xy(4, 3)); //---- resourcesDateBegin ---- resourcesDateBegin.setColumns(4); resourcesDateBegin.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel35.add(resourcesDateBegin, cc.xywh(6, 3, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //---- label_resourcesDateEnd ---- label_resourcesDateEnd.setText("End"); label_resourcesDateEnd.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesDateEnd, Resources.class, Resources.PROPERTYNAME_DATE_END); panel35.add(label_resourcesDateEnd, cc.xy(8, 3)); //---- resourcesDateEnd ---- resourcesDateEnd.setColumns(4); resourcesDateEnd.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel35.add(resourcesDateEnd, new CellConstraints(10, 3, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT, new Insets(0, 0, 0, 5))); //---- BulkDatesLabel ---- BulkDatesLabel.setText("Bulk Dates"); BulkDatesLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel35.add(BulkDatesLabel, new CellConstraints(2, 5, 1, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT, new Insets(0, 5, 0, 0))); //---- label_resourcesBulkDateBegin ---- label_resourcesBulkDateBegin.setText("Begin"); label_resourcesBulkDateBegin.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesBulkDateBegin, Resources.class, Resources.PROPERTYNAME_BULK_DATE_BEGIN); panel35.add(label_resourcesBulkDateBegin, cc.xy(4, 5)); //---- resourcesBulkDateBegin ---- resourcesBulkDateBegin.setColumns(4); resourcesBulkDateBegin.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel35.add(resourcesBulkDateBegin, cc.xywh(6, 5, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //---- label_resourcesBulkDateEnd ---- label_resourcesBulkDateEnd.setText("End"); label_resourcesBulkDateEnd.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesBulkDateEnd, Resources.class, Resources.PROPERTYNAME_BULK_DATE_END); panel35.add(label_resourcesBulkDateEnd, cc.xy(8, 5)); //---- resourcesBulkDateEnd ---- resourcesBulkDateEnd.setColumns(4); resourcesBulkDateEnd.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel35.add(resourcesBulkDateEnd, new CellConstraints(10, 5, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT, new Insets(0, 0, 0, 5))); } panel38.add(panel35, cc.xy(1, 1)); } panel7.add(panel38, cc.xywh(1, 7, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //======== panel9 ======== { panel9.setOpaque(false); panel9.setLayout(new FormLayout(new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec("left:min(default;200px)") }, RowSpec.decodeSpecs("default"))); //---- label_resourcesLanguageCode2 ---- label_resourcesLanguageCode2.setText("Lanaguage"); label_resourcesLanguageCode2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesLanguageCode2, ResourcesComponents.class, ResourcesComponents.PROPERTYNAME_LANGUAGE_CODE); panel9.add(label_resourcesLanguageCode2, cc.xy(1, 1)); //---- resourcesLanguageCode ---- resourcesLanguageCode.setMaximumSize(new Dimension(150, 32767)); resourcesLanguageCode.setOpaque(false); resourcesLanguageCode.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel9.add(resourcesLanguageCode, cc.xywh(3, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); } panel7.add(panel9, cc.xy(1, 9)); //======== panel5 ======== { panel5.setBackground(new Color(182, 187, 212)); panel5.setBorder(new BevelBorder(BevelBorder.LOWERED)); panel5.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel5.setLayout(new FormLayout("default:grow", "fill:default:grow")); //======== panel20 ======== { panel20.setOpaque(false); panel20.setBorder(Borders.DLU2_BORDER); panel20.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.UNRELATED_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) })); //---- ExtentLabel ---- ExtentLabel.setText("Extent"); ExtentLabel.setForeground(new Color(0, 0, 102)); ExtentLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel20.add(ExtentLabel, cc.xywh(1, 1, 2, 1)); //======== 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, Resources.class, Resources.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)); //---- extentType ---- extentType.setOpaque(false); extentType.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel21.add(extentType, new CellConstraints(5, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT, new Insets(0, 5, 5, 5))); } panel20.add(panel21, cc.xy(2, 3)); //---- label_resourcesExtentDescription ---- label_resourcesExtentDescription.setText("Container Summary"); label_resourcesExtentDescription.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesExtentDescription, Resources.class, Resources.PROPERTYNAME_CONTAINER_SUMMARY); panel20.add(label_resourcesExtentDescription, cc.xy(2, 5)); //======== 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); } panel20.add(scrollPane422, new CellConstraints(1, 7, 2, 1, CellConstraints.DEFAULT, CellConstraints.FILL, new Insets(0, 15, 5, 5))); } panel5.add(panel20, cc.xywh(1, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); } panel7.add(panel5, cc.xy(1, 11)); //======== panel23 ======== { panel23.setOpaque(false); panel23.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel23.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"), new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) })); //---- label_resourcesLanguageNote2 ---- label_resourcesLanguageNote2.setText("Repository Processing Note"); label_resourcesLanguageNote2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesLanguageNote2, ResourcesComponents.class, ResourcesComponents.PROPERTYNAME_REPOSITORY_PROCESSING_NOTE); panel23.add(label_resourcesLanguageNote2, new CellConstraints(1, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT, new Insets(0, 10, 0, 0))); //======== scrollPane423 ======== { scrollPane423.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane423.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); //---- resourcesLanguageNote ---- resourcesLanguageNote.setRows(4); resourcesLanguageNote.setWrapStyleWord(true); resourcesLanguageNote.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); scrollPane423.setViewportView(resourcesLanguageNote); } panel23.add(scrollPane423, new CellConstraints(1, 3, 1, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT, new Insets(0, 10, 0, 0))); } panel7.add(panel23, cc.xy(1, 13)); } add(panel7, cc.xywh(1, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //---- separator2 ---- separator2.setForeground(new Color(147, 131, 86)); separator2.setOrientation(SwingConstants.VERTICAL); add(separator2, cc.xywh(3, 1, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //======== panel10 ======== { panel10.setOpaque(false); panel10.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel10.setBorder(Borders.DLU2_BORDER); panel10.setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC }, 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, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //======== panel3 ======== { panel3.setOpaque(false); panel3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel3.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.MIN_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.RIGHT, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- label_resourcesLevel ---- label_resourcesLevel.setText("Level"); label_resourcesLevel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesLevel, ResourcesComponents.class, ResourcesComponents.PROPERTYNAME_LEVEL); panel3.add(label_resourcesLevel, cc.xywh(1, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //---- resourcesLevel ---- resourcesLevel.setOpaque(false); resourcesLevel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); resourcesLevel.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { resourcesLevelActionPerformed(); } }); panel3.add(resourcesLevel, cc.xywh(3, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //---- label3 ---- label3.setText("Persistent ID"); label3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label3, ResourcesComponents.class, ResourcesComponents.PROPERTYNAME_PERSISTENT_ID); panel3.add(label3, cc.xy(1, 3)); //---- resourcesDateBegin2 ---- resourcesDateBegin2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); resourcesDateBegin2.setEditable(false); resourcesDateBegin2.setOpaque(false); panel3.add(resourcesDateBegin2, cc.xywh(3, 3, 3, 1)); //---- label_otherLevel ---- label_otherLevel.setText("Other Level"); label_otherLevel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_otherLevel, ResourcesComponents.class, ResourcesComponents.PROPERTYNAME_OTHER_LEVEL); panel3.add(label_otherLevel, cc.xywh(1, 5, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //---- resourcesOtherLevel ---- resourcesOtherLevel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel3.add(resourcesOtherLevel, cc.xywh(3, 5, 3, 1)); } panel10.add(panel3, cc.xywh(1, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- label_repositoryName5 ---- label_repositoryName5.setText("Identifiers"); label_repositoryName5.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel10.add(label_repositoryName5, cc.xy(1, 3)); //======== scrollPane9 ======== { scrollPane9.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane9.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); scrollPane9.setPreferredSize(new Dimension(200, 104)); //---- identifiersTable ---- identifiersTable.setPreferredScrollableViewportSize(new Dimension(200, 100)); identifiersTable.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { identifiersMouseClicked(e); } }); scrollPane9.setViewportView(identifiersTable); } panel10.add(scrollPane9, cc.xywh(1, 5, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //======== panel25 ======== { panel25.setBackground(new Color(231, 188, 251)); panel25.setOpaque(false); panel25.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel25.setMinimumSize(new Dimension(100, 29)); panel25.setLayout( new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- addIdentifier ---- addIdentifier.setText("Add Identifier"); addIdentifier.setOpaque(false); addIdentifier.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); addIdentifier.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { addIdentifierActionPerformed(); } }); panel25.add(addIdentifier, cc.xy(1, 1)); //---- removeIdentifier ---- removeIdentifier.setText("Remove Identifier"); removeIdentifier.setOpaque(false); removeIdentifier.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); removeIdentifier.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { removeIdentifierActionPerformed(); } }); panel25.add(removeIdentifier, cc.xy(3, 1)); } panel10.add(panel25, cc.xywh(1, 7, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- label1 ---- label1.setText("Instances"); label1.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); label1.setBackground(new Color(238, 238, 238)); ATFieldInfo.assignLabelInfo(label1, ResourcesComponents.class, ResourcesComponents.PROPERTYNAME_INSTANCES); panel10.add(label1, cc.xywh(1, 9, 2, 1)); //======== scrollPane4 ======== { scrollPane4.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane4.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); //---- instancesTable ---- instancesTable.setPreferredScrollableViewportSize(new Dimension(200, 75)); instancesTable.setRowHeight(20); instancesTable.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { instancesTableMouseClicked(e); } }); scrollPane4.setViewportView(instancesTable); } panel10.add(scrollPane4, cc.xy(1, 11)); //======== panel24 ======== { panel24.setBackground(new Color(231, 188, 251)); panel24.setOpaque(false); panel24.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel24.setMinimumSize(new Dimension(100, 29)); panel24.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"))); //---- addInstanceButton ---- addInstanceButton.setBackground(new Color(231, 188, 251)); addInstanceButton.setText("Add Instance"); addInstanceButton.setOpaque(false); addInstanceButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); addInstanceButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { addInstanceButtonActionPerformed(); } }); panel24.add(addInstanceButton, cc.xy(1, 1)); //---- removeInstanceButton ---- removeInstanceButton.setBackground(new Color(231, 188, 251)); removeInstanceButton.setText("Remove Instance"); removeInstanceButton.setOpaque(false); removeInstanceButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); removeInstanceButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { removeInstanceButtonActionPerformed(); } }); panel24.add(removeInstanceButton, cc.xy(3, 1)); } panel10.add(panel24, cc.xywh(1, 13, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //======== panel4 ======== { panel4.setOpaque(false); panel4.setLayout( new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- restrictionsApply2 ---- restrictionsApply2.setBackground(new Color(231, 188, 251)); restrictionsApply2.setText("Internal Only"); restrictionsApply2.setOpaque(false); restrictionsApply2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); restrictionsApply2.setText(ATFieldInfo.getLabel(ResourcesComponents.class, ResourcesComponents.PROPERTYNAME_INTERNAL_ONLY)); panel4.add(restrictionsApply2, cc.xy(1, 1)); //---- resourcesRestrictionsApply ---- resourcesRestrictionsApply.setBackground(new Color(231, 188, 251)); resourcesRestrictionsApply.setText("Restrictions Apply"); resourcesRestrictionsApply.setOpaque(false); resourcesRestrictionsApply.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); resourcesRestrictionsApply.setText(ATFieldInfo.getLabel(ResourcesComponents.class, ArchDescription.PROPERTYNAME_RESTRICTIONS_APPLY)); panel4.add(resourcesRestrictionsApply, cc.xy(3, 1)); } panel10.add(panel4, cc.xy(1, 15)); } add(panel10, cc.xywh(5, 1, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:biz.artemis.roadrunner.ui.RoadRunnerGUI.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents MainFrame = new JFrame(); mainPanel = new JPanel(); mainTabbedPane = new JTabbedPane(); startSyncPanel = new JPanel(); rrIconLabel = new JLabel(); startSyncButton = new JButton(); refreshSyncButton = new JButton(); confluenceServersPanel = new JPanel(); serverListPanel = new JPanel(); scrollPane1 = new JScrollPane(); serverTable = new JTable(); serverInfoFormPanel = new JPanel(); serverAliasLabel = new JLabel(); serverAliasField = new JTextField(); label6 = new JLabel(); urlLabel = new JLabel(); urlField = new JTextField(); label2 = new JLabel(); loginLabel = new JLabel(); loginField = new JTextField(); passwordLabel = new JLabel(); passwordField = new JPasswordField(); label9 = new JLabel(); panel8 = new JPanel(); removeServerButton = new JButton(); serverTestConnectionButton = new JButton(); addServerButton = new JButton(); spacesPanel = new JPanel(); label1 = new JLabel(); remoteServerListPanel = new JLabel(); spacesToSyncListLabel = new JLabel(); localServerSelectLabel = new JLabel(); scrollPane2 = new JScrollPane(); remoteServerList = new JList(); arrowLabel = new JLabel(); scrollPane3 = new JScrollPane(); spacesToSyncList = new JList(); arrowLabel2 = new JLabel(); localServerComboBox = new JComboBox(); spaceRefreshButton = new JButton(); saveSyncButton = new JButton(); selectedSyncLabel = new JLabel(); scrollPane4 = new JScrollPane(); selectedSyncsList = new JList(); panel1 = new JPanel(); panel2 = new JPanel(); pageCopyLabel1 = new JLabel(); pageCopyLabel2 = new JLabel(); pageCopyLocalServerComboBox = new JComboBox(); pageCopyLabel3 = new JLabel(); pageCopyRemoteServerComboBox = new JComboBox(); panel4 = new JPanel(); scrollPane8 = new JScrollPane(); pageCopyJTree = new JTree(); panel3 = new JPanel(); pageCopyRefreshTreeButton = new JButton(); panel5 = new JPanel(); pageCopySendPagesButton2 = new JButton(); pageCopySendPagesAndAttachmentsButton = new JButton(); scrollPane9 = new JScrollPane(); pageCopySelectedListTextArea = new JTextArea(); historyPanel = new JPanel(); syncHistoryLabel = new JLabel(); scrollPane5 = new JScrollPane(); syncHistoryList = new JList(); syncHistoryDetailsLabel = new JLabel(); scrollPane6 = new JScrollPane(); textArea1 = new JTextArea(); CellConstraints cc = new CellConstraints(); //======== MainFrame ======== {/*from w w w . j a v a2 s .c o m*/ MainFrame.setTitle("RoadRunner For Confluence v0.5.0"); MainFrame.setIconImage( new ImageIcon("/Users/brendan/Desktop/projects/roadrunner/devel/FreeMindWindowIcon.png") .getImage()); Container MainFrameContentPane = MainFrame.getContentPane(); MainFrameContentPane.setLayout(new BorderLayout()); //======== mainPanel ======== { mainPanel.setPreferredSize(new Dimension(660, 442)); mainPanel.setLayout(new BorderLayout()); //======== mainTabbedPane ======== { mainTabbedPane.setBackground(new Color(238, 238, 238)); //======== startSyncPanel ======== { startSyncPanel.setBackground(Color.white); startSyncPanel.setLayout(new GridBagLayout()); ((GridBagLayout) startSyncPanel.getLayout()).columnWidths = new int[] { 6, 78, 6, 0 }; ((GridBagLayout) startSyncPanel.getLayout()).rowHeights = new int[] { 0, 5, 32, 0, 0, 0 }; ((GridBagLayout) startSyncPanel.getLayout()).columnWeights = new double[] { 0.0, 1.0, 0.0, 1.0E-4 }; ((GridBagLayout) startSyncPanel.getLayout()).rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 1.0E-4 }; //---- rrIconLabel ---- rrIconLabel.setIcon(new ImageIcon(getClass().getResource("/rr-logo-v2.png"))); startSyncPanel.add(rrIconLabel, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); //---- startSyncButton ---- startSyncButton.setText(" Start Sync "); startSyncButton.setBackground(new Color(0, 204, 0)); startSyncButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { startSyncButtonActionPerformed(e); } }); startSyncPanel.add(startSyncButton, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); //---- refreshSyncButton ---- refreshSyncButton.setText("Refresh Sync"); refreshSyncButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { refreshSyncButtonActionPerformed(e); } }); startSyncPanel.add(refreshSyncButton, new GridBagConstraints(1, 4, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), 0, 0)); } mainTabbedPane.addTab("Start Sync", startSyncPanel); //======== confluenceServersPanel ======== { confluenceServersPanel.setLayout(new FormLayout("default:grow", "default, $lgap, 176dlu")); //======== serverListPanel ======== { serverListPanel.setLayout(new FormLayout("default:grow", "fill:80dlu:grow")); //======== scrollPane1 ======== { //---- serverTable ---- serverTable.setModel(new DefaultTableModel(new Object[][] { { null, null }, }, new String[] { "Server Alias", "Server URL" }) { Class[] columnTypes = new Class[] { String.class, String.class }; boolean[] columnEditable = new boolean[] { false, false }; @Override public Class<?> getColumnClass(int columnIndex) { return columnTypes[columnIndex]; } @Override public boolean isCellEditable(int rowIndex, int columnIndex) { return columnEditable[columnIndex]; } }); serverTable.setShowHorizontalLines(false); serverTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); serverTable.addPropertyChangeListener("selectedRow", new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent e) { serverTablePropertyChange(e); } }); scrollPane1.setViewportView(serverTable); } serverListPanel.add(scrollPane1, cc.xy(1, 1)); } confluenceServersPanel.add(serverListPanel, cc.xy(1, 1)); //======== serverInfoFormPanel ======== { serverInfoFormPanel.setBorder(new TitledBorder(null, "Confluence Server Settings", TitledBorder.LEADING, TitledBorder.TOP)); serverInfoFormPanel.setLayout( new FormLayout("2*(default, $lcgap), [80dlu,default]:grow, 2*($lcgap, default)", "4*(default, $lgap), default")); //---- serverAliasLabel ---- serverAliasLabel.setText("server alias"); serverInfoFormPanel.add(serverAliasLabel, cc.xy(3, 1)); //---- serverAliasField ---- serverAliasField.setColumns(4); serverAliasField.setPreferredSize(new Dimension(83, 28)); serverInfoFormPanel.add(serverAliasField, cc.xywh(5, 1, 2, 1)); //---- label6 ---- label6.setText("a name that identifies the server: my server"); serverInfoFormPanel.add(label6, cc.xy(9, 1)); //---- urlLabel ---- urlLabel.setText("URL"); serverInfoFormPanel.add(urlLabel, cc.xy(3, 3)); serverInfoFormPanel.add(urlField, cc.xywh(5, 3, 4, 1)); //---- label2 ---- label2.setText("base url of server i.e. http://localhost:8080"); serverInfoFormPanel.add(label2, cc.xy(9, 3)); //---- loginLabel ---- loginLabel.setText("login"); serverInfoFormPanel.add(loginLabel, cc.xy(3, 5)); serverInfoFormPanel.add(loginField, cc.xywh(5, 5, 2, 1)); //---- passwordLabel ---- passwordLabel.setText("password"); serverInfoFormPanel.add(passwordLabel, cc.xy(3, 7)); serverInfoFormPanel.add(passwordField, cc.xy(5, 7)); //---- label9 ---- label9.setText("you can leave this blank and will be prompted"); serverInfoFormPanel.add(label9, cc.xy(9, 7)); //======== panel8 ======== { panel8.setLayout(new FlowLayout(FlowLayout.CENTER, 7, 7)); //---- removeServerButton ---- removeServerButton.setText("Remove"); removeServerButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { removeServerButtonActionPerformed(e); } }); panel8.add(removeServerButton); //---- serverTestConnectionButton ---- serverTestConnectionButton.setText("Test Connection"); serverTestConnectionButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { serverTestConnectionButtonActionPerformed(e); } }); panel8.add(serverTestConnectionButton); //---- addServerButton ---- addServerButton.setText("Add / Update"); addServerButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { button3ActionPerformed(e); addServerButtonActionPerformed(e); } }); panel8.add(addServerButton); } serverInfoFormPanel.add(panel8, cc.xywh(5, 9, 5, 1)); } confluenceServersPanel.add(serverInfoFormPanel, cc.xy(1, 3)); } mainTabbedPane.addTab("Confluence Servers", confluenceServersPanel); //======== spacesPanel ======== { spacesPanel.setBorder(new TitledBorder(null, "Synchronization Select", TitledBorder.LEADING, TitledBorder.TOP)); spacesPanel.setLayout(new FormLayout( "default:grow, $lcgap, 20dlu, $lcgap, default:grow, $lcgap, 21dlu, $lcgap, default:grow", "5*(default, $lgap), fill:113dlu:grow")); //---- label1 ---- label1.setText( "Please select the remote server and spaces to synchronize with your local server."); label1.setForeground(new Color(0, 0, 153)); spacesPanel.add(label1, cc.xywh(1, 1, 9, 1)); //---- remoteServerListPanel ---- remoteServerListPanel.setText("remote server(s)"); spacesPanel.add(remoteServerListPanel, cc.xy(1, 3)); //---- spacesToSyncListLabel ---- spacesToSyncListLabel.setText("spaces to sync"); spacesPanel.add(spacesToSyncListLabel, cc.xy(5, 3)); //---- localServerSelectLabel ---- localServerSelectLabel.setText("local server"); spacesPanel.add(localServerSelectLabel, cc.xy(9, 3)); //======== scrollPane2 ======== { //---- remoteServerList ---- remoteServerList.setModel(new AbstractListModel() { String[] values = { "my local server, ", "department server", "corporate server," }; public int getSize() { return values.length; } public Object getElementAt(int i) { return values[i]; } }); remoteServerList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); remoteServerList.addListSelectionListener(new ListSelectionListener() { public void valueChanged(ListSelectionEvent e) { remoteServerListValueChanged(e); remoteServerListValueChanged(e); } }); scrollPane2.setViewportView(remoteServerList); } spacesPanel.add(scrollPane2, cc.xy(1, 5)); //---- arrowLabel ---- arrowLabel.setText(">>"); arrowLabel.setHorizontalAlignment(SwingConstants.CENTER); spacesPanel.add(arrowLabel, cc.xy(3, 5)); //======== scrollPane3 ======== { //---- spacesToSyncList ---- spacesToSyncList.setModel(new AbstractListModel() { String[] values = { " " }; public int getSize() { return values.length; } public Object getElementAt(int i) { return values[i]; } }); scrollPane3.setViewportView(spacesToSyncList); } spacesPanel.add(scrollPane3, cc.xy(5, 5)); //---- arrowLabel2 ---- arrowLabel2.setText(">>"); arrowLabel2.setHorizontalAlignment(SwingConstants.CENTER); spacesPanel.add(arrowLabel2, cc.xy(7, 5)); //---- localServerComboBox ---- localServerComboBox.setModel(new DefaultComboBoxModel(new String[] { "localhost" })); spacesPanel.add(localServerComboBox, cc.xy(9, 5)); //---- spaceRefreshButton ---- spaceRefreshButton.setText("Refresh"); spaceRefreshButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { spaceRefreshButtonActionPerformed(e); } }); spacesPanel.add(spaceRefreshButton, cc.xy(5, 7)); //---- saveSyncButton ---- saveSyncButton.setText("Save Sync"); saveSyncButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { saveSyncButtonActionPerformed(e); saveSyncButtonActionPerformed(e); } }); spacesPanel.add(saveSyncButton, cc.xy(9, 7)); //---- selectedSyncLabel ---- selectedSyncLabel.setText( "synchronizations selected (these are the spaces RoadRunner will synchronize)"); spacesPanel.add(selectedSyncLabel, cc.xywh(1, 9, 9, 1)); //======== scrollPane4 ======== { //---- selectedSyncsList ---- selectedSyncsList.setModel(new AbstractListModel() { String[] values = { "department server >> ALL Spaces >> my local server (includes new spaces)", "corporate server >> Technology >> my local server" }; public int getSize() { return values.length; } public Object getElementAt(int i) { return values[i]; } }); selectedSyncsList.addKeyListener(new KeyAdapter() { @Override public void keyPressed(KeyEvent e) { selectedSyncsListKeyPressed(e); } }); scrollPane4.setViewportView(selectedSyncsList); } spacesPanel.add(scrollPane4, cc.xywh(1, 11, 9, 1)); } mainTabbedPane.addTab("Spaces", spacesPanel); //======== panel1 ======== { panel1.setBackground(new Color(238, 238, 238)); panel1.setLayout(new FormLayout("2*(default, $lcgap), 50dlu:grow, 2*($lcgap, default)", "default, $lgap, default:grow, 2*($lgap, default), $lgap, 47dlu:grow")); //======== panel2 ======== { panel2.setLayout(new FormLayout("default:grow, $lcgap, default, $lcgap, default:grow", "default, $lgap, default")); //---- pageCopyLabel1 ---- pageCopyLabel1.setText("from server"); panel2.add(pageCopyLabel1, cc.xy(1, 1)); //---- pageCopyLabel2 ---- pageCopyLabel2.setText("to server"); panel2.add(pageCopyLabel2, cc.xy(5, 1)); panel2.add(pageCopyLocalServerComboBox, cc.xy(1, 3)); //---- pageCopyLabel3 ---- pageCopyLabel3.setText(">>"); panel2.add(pageCopyLabel3, cc.xy(3, 3)); panel2.add(pageCopyRemoteServerComboBox, cc.xy(5, 3)); } panel1.add(panel2, cc.xy(5, 1)); //======== panel4 ======== { panel4.setBorder(new TitledBorder(null, "local page tree", TitledBorder.LEADING, TitledBorder.TOP)); panel4.setLayout(new FormLayout("2*(default, $lcgap), 50dlu:grow, 2*($lcgap, default)", "default:grow")); //======== scrollPane8 ======== { scrollPane8.setViewportView(pageCopyJTree); } panel4.add(scrollPane8, cc.xywh(1, 1, 9, 1)); } panel1.add(panel4, cc.xywh(1, 3, 9, 1)); //======== panel3 ======== { panel3.setLayout(new FormLayout("default:grow, $lcgap, default, $lcgap, default:grow", "default")); //---- pageCopyRefreshTreeButton ---- pageCopyRefreshTreeButton.setText("Refresh Tree"); pageCopyRefreshTreeButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { pageCopyRefreshTreeButtonActionPerformed(e); } }); panel3.add(pageCopyRefreshTreeButton, cc.xy(3, 1)); } panel1.add(panel3, cc.xywh(5, 5, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //======== panel5 ======== { panel5.setLayout(new FormLayout("2*(default, $lcgap), default", "default")); //---- pageCopySendPagesButton2 ---- pageCopySendPagesButton2.setText(" Send Pages "); pageCopySendPagesButton2.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { pageCopySendPagesButton2ActionPerformed(e); } }); panel5.add(pageCopySendPagesButton2, cc.xywh(3, 1, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- pageCopySendPagesAndAttachmentsButton ---- pageCopySendPagesAndAttachmentsButton.setText("Send Pages And Attachments"); pageCopySendPagesAndAttachmentsButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { pageCopySendPagesAndAttachmentsButtonActionPerformed(e); } }); panel5.add(pageCopySendPagesAndAttachmentsButton, cc.xy(5, 1)); } panel1.add(panel5, cc.xywh(5, 7, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //======== scrollPane9 ======== { //---- pageCopySelectedListTextArea ---- pageCopySelectedListTextArea.setPreferredSize(new Dimension(0, 48)); scrollPane9.setViewportView(pageCopySelectedListTextArea); } panel1.add(scrollPane9, cc.xywh(1, 9, 9, 1)); } mainTabbedPane.addTab("Pages", panel1); //======== historyPanel ======== { historyPanel .setLayout(new FormLayout("default:grow", "4*(default, $lgap), fill:40dlu:grow")); //---- syncHistoryLabel ---- syncHistoryLabel.setText("Synchronization history"); historyPanel.add(syncHistoryLabel, cc.xy(1, 1)); //======== scrollPane5 ======== { //---- syncHistoryList ---- syncHistoryList.setModel(new AbstractListModel() { String[] values = { "Jan 5, 2008 - 4:53 p.m.,", "Jan 15, 2008 - 4:53 p.m.,", "Jan 17, 2008 - 4:53 p.m.,", "Jan 25, 2008 - 4:53 p.m.,", "Feb 4, 2008 - 4:53 p.m." }; public int getSize() { return values.length; } public Object getElementAt(int i) { return values[i]; } }); scrollPane5.setViewportView(syncHistoryList); } historyPanel.add(scrollPane5, cc.xy(1, 3)); //---- syncHistoryDetailsLabel ---- syncHistoryDetailsLabel.setText("Sync Details"); historyPanel.add(syncHistoryDetailsLabel, cc.xy(1, 7)); //======== scrollPane6 ======== { //---- textArea1 ---- textArea1.setText( "Starting Synch Jan 17th, 2008 - 4:53p.m.\nServer 'Corporate Server'\nChecking space 'Technology' for updates\nFound 6 page updates\nChecking space 'Other' for updates\n\tNo updates found."); scrollPane6.setViewportView(textArea1); } historyPanel.add(scrollPane6, cc.xy(1, 9)); } mainTabbedPane.addTab("History", historyPanel); } mainPanel.add(mainTabbedPane, BorderLayout.CENTER); } MainFrameContentPane.add(mainPanel, BorderLayout.CENTER); MainFrame.pack(); MainFrame.setLocationRelativeTo(MainFrame.getOwner()); } // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:brainflow.colormap.ColorIntervalEditor.java
private void setupLayout() { FormLayout layout = new FormLayout( "2dlu, l:max(p;25dlu), 5dlu, max(p;15dlu), 5dlu, max(p;15dlu), 5dlu, max(p;15dlu), 5dlu, max(p;15dlu), 2dlu", "2dlu, p, 4dlu, p, 4dlu, p, 2dlu"); layout.addGroupedColumn(4);//from w ww . j a va 2s. c o m layout.addGroupedColumn(6); layout.addGroupedColumn(8); layout.addGroupedColumn(10); setLayout(layout); CellConstraints cc = new CellConstraints(); JLabel redLabel = new JLabel("R"); redLabel.setToolTipText("Red"); add(redLabel, cc.xy(4, 2)); JLabel greenLabel = new JLabel("G"); greenLabel.setToolTipText("Green"); add(greenLabel, cc.xy(6, 2)); JLabel blueLabel = new JLabel("B"); blueLabel.setToolTipText("Blue"); add(blueLabel, cc.xy(8, 2)); JLabel alphaLabel = new JLabel("A"); alphaLabel.setToolTipText("Alpha/Opacity"); add(alphaLabel, cc.xy(10, 2)); add(new JideButton(colorIcon), cc.xy(2, 4)); add(new JLabel(" Range: "), cc.xy(2, 6)); add(new JLabel("" + interval.getRed()), cc.xy(4, 4)); add(new JLabel("" + interval.getGreen()), cc.xy(6, 4)); add(new JLabel("" + interval.getBlue()), cc.xy(8, 4)); add(new JLabel("" + interval.getAlpha()), cc.xy(10, 4)); NumberFormat format = DecimalFormat.getNumberInstance(); format.setMaximumFractionDigits(2); lowField = new JFormattedTextField(format); highField = new JFormattedTextField(format); lowField.setValue(interval.getMinimum()); highField.setValue(interval.getMaximum()); if (!isEditable) { lowField.setEditable(false); highField.setEditable(false); } add(lowField, cc.xywh(4, 6, 3, 1)); //add(new JLabel(JideIconsFactory.getImageIcon(JideIconsFactory.Arrow.RIGHT)), cc.xy(6,6)); add(highField, cc.xywh(8, 6, 3, 1)); }
From source file:ca.phon.app.prefs.PathListPanel.java
License:Open Source License
private void init() { setLayout(new BorderLayout()); FormLayout layout = new FormLayout("fill:pref:grow, pref, pref, pref", "pref, pref, pref, pref, fill:pref:grow"); CellConstraints cc = new CellConstraints(); setLayout(layout);/*w ww . j a v a 2s .co m*/ pathList = new JList(new PathListModel()); pathList.setVisibleRowCount(6); JScrollPane pathScroller = new JScrollPane(pathList); add(pathScroller, cc.xywh(1, 2, 3, 4)); add(getMoveUpButton(), cc.xy(4, 2)); add(getMoveDownButton(), cc.xy(4, 3)); add(getRemovePathButton(), cc.xy(2, 1)); add(getAddPathButton(), cc.xy(3, 1)); }
From source file:ca.phon.app.project.NewSessionPanel.java
License:Open Source License
public JPanel createPanel() { JPanel jpanel1 = new JPanel(); FormLayout formlayout1 = new FormLayout("CENTER:25PX:NONE,FILL:DEFAULT:GROW(1.0),CENTER:DEFAULT:NONE", "CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:20PX:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:20PX:NONE,CENTER:DEFAULT:NONE"); CellConstraints cc = new CellConstraints(); jpanel1.setLayout(formlayout1);/*from w ww. j a v a2 s . co m*/ jpanel1.setBorder(new EmptyBorder(5, 5, 5, 5)); DefaultComponentFactory fac = DefaultComponentFactory.getInstance(); JComponent titledseparator1 = fac.createSeparator("Step 1"); jpanel1.add(titledseparator1, cc.xywh(1, 1, 3, 1)); JComponent titledseparator2 = fac.createSeparator("Step 2"); jpanel1.add(titledseparator2, cc.xywh(1, 5, 3, 1)); JLabel jlabel1 = new JLabel(); jlabel1.setText("Enter a name for the new session:"); jpanel1.add(jlabel1, cc.xywh(2, 2, 2, 1)); txtName.setName("txtName"); jpanel1.add(txtName, cc.xywh(2, 3, 2, 1)); cmbCorpus.setName("cmbCorpus"); jpanel1.add(cmbCorpus, cc.xy(2, 7)); // ImageFactory imgFactory = ImageFactory.getInstance(); // ImageIcon im = new ImageIcon(imgFactory.getImage("new_corpus", 16, 16)); ImageIcon im = IconManager.getInstance().getIcon("actions/list-add", IconSize.SMALL); btnCreateCorpus.setIcon(im); btnCreateCorpus.setName("btnCreateCorpus"); btnCreateCorpus.addActionListener(new CreateCorpusListener()); jpanel1.add(btnCreateCorpus, cc.xy(3, 7)); JLabel jlabel2 = new JLabel(); jlabel2.setText("Select a corpus to use for this session:"); jpanel1.add(jlabel2, cc.xy(2, 6)); addFillComponents(jpanel1, new int[] { 2, 3 }, new int[] { 2, 3, 4, 6, 7, 8 }); return jpanel1; }