List of usage examples for com.jgoodies.forms.layout CellConstraints FILL
Alignment FILL
To view the source code for com.jgoodies.forms.layout CellConstraints FILL.
Click Source Link
From source file:edu.yale.plugins.tasks.YaleAnalogInstancesFields.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license panel2 = new JDialog(); fields = new JPanel(); label_subjectSource4 = new JLabel(); containerLabel3 = new JTextField(); separator3 = new JSeparator(); label_subjectTermType3 = new JLabel(); container3Type = new JComboBox(); label_subjectSource7 = new JLabel(); container3Type2 = new JComboBox(); separator2 = new JSeparator(); panel1 = new JPanel(); rights3 = new JCheckBox(); rights2 = new JCheckBox(); panel3 = new JPanel(); cancel = new JButton(); CellConstraints cc = new CellConstraints(); //======== panel2 ======== {/*from ww w . j a v a 2 s.c o m*/ Container panel2ContentPane = panel2.getContentPane(); panel2ContentPane.setLayout(new BorderLayout()); //======== fields ======== { fields.setBorder(Borders.DLU4_BORDER); fields.setBackground(new Color(234, 201, 250)); fields.setOpaque(false); fields.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); fields.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 })); //---- label_subjectSource4 ---- label_subjectSource4.setText("Barcode"); label_subjectSource4.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_subjectSource4, ArchDescriptionAnalogInstances.class, ArchDescriptionAnalogInstances.PROPERTYNAME_BARCODE); fields.add(label_subjectSource4, cc.xy(1, 1)); //---- containerLabel3 ---- containerLabel3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); fields.add(containerLabel3, cc.xy(3, 1)); //---- separator3 ---- separator3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); separator3.setForeground(new Color(147, 131, 86)); fields.add(separator3, cc.xywh(1, 3, 3, 1)); //---- label_subjectTermType3 ---- label_subjectTermType3.setText("Container 3 Type"); label_subjectTermType3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_subjectTermType3, ArchDescriptionAnalogInstances.class, ArchDescriptionAnalogInstances.PROPERTYNAME_CONTAINER3_TYPE); fields.add(label_subjectTermType3, cc.xy(1, 5)); //---- container3Type ---- container3Type.setOpaque(false); container3Type.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); fields.add(container3Type, cc.xywh(3, 5, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //---- label_subjectSource7 ---- label_subjectSource7.setText("User Defined String 2"); label_subjectSource7.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_subjectSource7, ArchDescriptionAnalogInstances.class, ArchDescriptionAnalogInstances.PROPERTYNAME_USER_DEFINED_STRING2); fields.add(label_subjectSource7, cc.xy(1, 7)); //---- container3Type2 ---- container3Type2.setOpaque(false); container3Type2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); fields.add(container3Type2, cc.xywh(3, 7, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //---- separator2 ---- separator2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); separator2.setForeground(new Color(147, 131, 86)); fields.add(separator2, cc.xywh(1, 9, 3, 1)); //======== panel1 ======== { panel1.setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, RowSpec.decodeSpecs("default"))); //---- rights3 ---- rights3.setText("User Defined Boolean 1"); rights3.setOpaque(false); rights3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); rights3.setText(ATFieldInfo.getLabel(ArchDescriptionAnalogInstances.class, ArchDescriptionAnalogInstances.PROPERTYNAME_USER_DEFINED_BOOLEAN1)); panel1.add(rights3, cc.xywh(1, 1, 2, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //---- rights2 ---- rights2.setText("User Defined Boolean 2"); rights2.setOpaque(false); rights2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); rights2.setText(ATFieldInfo.getLabel(ArchDescriptionAnalogInstances.class, ArchDescriptionAnalogInstances.PROPERTYNAME_USER_DEFINED_BOOLEAN2)); panel1.add(rights2, cc.xywh(3, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); } fields.add(panel1, cc.xywh(1, 11, 3, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //======== panel3 ======== { panel3.setLayout( new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- cancel ---- cancel.setText("Cancel"); cancel.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { cancelActionPerformed(e); } }); panel3.add(cancel, cc.xy(3, 1)); } fields.add(panel3, cc.xywh(1, 13, 3, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); } panel2ContentPane.add(fields, BorderLayout.CENTER); panel2.pack(); panel2.setLocationRelativeTo(panel2.getOwner()); } // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:edu.yale.plugins.tasks.YaleAssignContainerInformation.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license dialogPane = new JPanel(); contentPanel = new JPanel(); label_subjectSource4 = new JLabel(); barcode = new JTextField(); label_container3Type = new JLabel(); container3Type = ATBasicComponentFactory.createUnboundComboBox(LookupListUtils.getLookupListValues( ArchDescriptionAnalogInstances.class, ArchDescriptionAnalogInstances.PROPERTYNAME_CONTAINER3_TYPE)); label_userDefinedString2 = new JLabel(); userDefinedString2 = ATBasicComponentFactory.createUnboundComboBox(LookupListUtils.getLookupListValues( ArchDescriptionAnalogInstances.class, ArchDescriptionAnalogInstances.PROPERTYNAME_CONTAINER3_TYPE)); panel1 = new JPanel(); panel2 = new JPanel(); label1 = new JLabel(); restrictionNoChange = new JRadioButton(); restrictionSetRestrict = new JRadioButton(); restrictionSetUnrestricted = new JRadioButton(); panel3 = new JPanel(); label2 = new JLabel(); exportedToVoyagerNoChange = new JRadioButton(); exportedToVoyagerSetExported = new JRadioButton(); exportedToVoyagerSetNotExported = new JRadioButton(); buttonBar = new JPanel(); assignValues = new JButton(); cancelButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setModal(true);// ww w . j av a2 s .c o m setBackground(new Color(200, 205, 232)); Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== dialogPane ======== { dialogPane.setBorder(Borders.DIALOG_BORDER); dialogPane.setBackground(new Color(200, 205, 232)); dialogPane.setLayout(new BorderLayout()); //======== contentPanel ======== { contentPanel.setOpaque(false); contentPanel .setLayout( new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, 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 })); //---- label_subjectSource4 ---- label_subjectSource4.setText("Barcode"); label_subjectSource4.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_subjectSource4, ArchDescriptionAnalogInstances.class, ArchDescriptionAnalogInstances.PROPERTYNAME_BARCODE); contentPanel.add(label_subjectSource4, cc.xy(1, 1)); //---- barcode ---- barcode.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); contentPanel.add(barcode, cc.xy(3, 1)); //---- label_container3Type ---- label_container3Type.setText("Container 3 Type"); label_container3Type.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_container3Type, ArchDescriptionAnalogInstances.class, ArchDescriptionAnalogInstances.PROPERTYNAME_CONTAINER3_TYPE); contentPanel.add(label_container3Type, cc.xy(1, 3)); //---- container3Type ---- container3Type.setOpaque(false); container3Type.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); contentPanel.add(container3Type, cc.xywh(3, 3, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //---- label_userDefinedString2 ---- label_userDefinedString2.setText("User Defined String 2"); label_userDefinedString2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_userDefinedString2, ArchDescriptionAnalogInstances.class, ArchDescriptionAnalogInstances.PROPERTYNAME_USER_DEFINED_STRING2); contentPanel.add(label_userDefinedString2, cc.xy(1, 5)); //---- userDefinedString2 ---- userDefinedString2.setOpaque(false); userDefinedString2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); contentPanel.add(userDefinedString2, cc.xywh(3, 5, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //======== panel1 ======== { panel1.setOpaque(false); panel1.setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, RowSpec.decodeSpecs("default"))); //======== panel2 ======== { panel2.setOpaque(false); panel2.setLayout(new FormLayout( new ColumnSpec[] { 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 }, RowSpec.decodeSpecs("default"))); //---- label1 ---- label1.setText("Restrictions:"); panel2.add(label1, cc.xy(1, 1)); //---- restrictionNoChange ---- restrictionNoChange.setText("No change"); restrictionNoChange.setSelected(true); panel2.add(restrictionNoChange, cc.xy(3, 1)); //---- restrictionSetRestrict ---- restrictionSetRestrict.setText("Restrict"); panel2.add(restrictionSetRestrict, cc.xy(5, 1)); //---- restrictionSetUnrestricted ---- restrictionSetUnrestricted.setText("Unrestrict"); panel2.add(restrictionSetUnrestricted, cc.xy(7, 1)); } panel1.add(panel2, cc.xywh(1, 1, 3, 1)); } contentPanel.add(panel1, cc.xywh(1, 7, 3, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //======== panel3 ======== { panel3.setOpaque(false); panel3.setLayout( new FormLayout( new ColumnSpec[] { 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 }, RowSpec.decodeSpecs("default"))); //---- label2 ---- label2.setText("Export to voyager"); panel3.add(label2, cc.xy(1, 1)); //---- exportedToVoyagerNoChange ---- exportedToVoyagerNoChange.setText("No change"); exportedToVoyagerNoChange.setSelected(true); panel3.add(exportedToVoyagerNoChange, cc.xy(3, 1)); //---- exportedToVoyagerSetExported ---- exportedToVoyagerSetExported.setText("Set exported"); panel3.add(exportedToVoyagerSetExported, cc.xy(5, 1)); //---- exportedToVoyagerSetNotExported ---- exportedToVoyagerSetNotExported.setText("Set not exported"); panel3.add(exportedToVoyagerSetNotExported, cc.xy(7, 1)); } contentPanel.add(panel3, cc.xywh(1, 9, 3, 1)); } dialogPane.add(contentPanel, BorderLayout.CENTER); //======== buttonBar ======== { buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER); buttonBar.setOpaque(false); buttonBar.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.GLUE_COLSPEC, FormFactory.BUTTON_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC }, RowSpec.decodeSpecs("pref"))); //---- assignValues ---- assignValues.setText("Assign Values"); assignValues.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { assignValuesActionPerformed(e); } }); buttonBar.add(assignValues, cc.xy(2, 1)); //---- cancelButton ---- cancelButton.setText("Cancel"); cancelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { cancelButtonActionPerformed(e); } }); buttonBar.add(cancelButton, cc.xy(4, 1)); } dialogPane.add(buttonBar, BorderLayout.SOUTH); } contentPane.add(dialogPane, BorderLayout.CENTER); pack(); setLocationRelativeTo(getOwner()); //---- restrictionsButtonGroup ---- ButtonGroup restrictionsButtonGroup = new ButtonGroup(); restrictionsButtonGroup.add(restrictionNoChange); restrictionsButtonGroup.add(restrictionSetRestrict); restrictionsButtonGroup.add(restrictionSetUnrestricted); //---- exportedToVoyagerButtonGroup ---- ButtonGroup exportedToVoyagerButtonGroup = new ButtonGroup(); exportedToVoyagerButtonGroup.add(exportedToVoyagerNoChange); exportedToVoyagerButtonGroup.add(exportedToVoyagerSetExported); exportedToVoyagerButtonGroup.add(exportedToVoyagerSetNotExported); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:fsart.diffTools.gui.DiffToolsMainPanel.java
License:CeCILL license
/** * Method generated by IntelliJ IDEA GUI Designer * >>> IMPORTANT!! <<< * DO NOT edit this method OR call it by your code! * * @noinspection ALL/*from w w w . ja v a2 s. c o m*/ */ private void $$$setupUI$$$() { panel1 = new JPanel(); panel1.setLayout(new BorderLayout(0, 0)); final Spacer spacer1 = new Spacer(); panel1.add(spacer1, BorderLayout.WEST); final Spacer spacer2 = new Spacer(); panel1.add(spacer2, BorderLayout.EAST); final Spacer spacer3 = new Spacer(); panel1.add(spacer3, BorderLayout.SOUTH); final Spacer spacer4 = new Spacer(); panel1.add(spacer4, BorderLayout.NORTH); final JPanel panel2 = new JPanel(); panel2.setLayout(new FormLayout( "left:max(d;4px):noGrow,left:4dlu:noGrow,center:max(d;50px):grow,left:4dlu:noGrow,fill:max(d;4px):noGrow,left:5dlu:noGrow,fill:max(d;4px):noGrow", "top:d:grow,top:4dlu:noGrow,top:d:noGrow,top:4dlu:noGrow,center:max(d;25px):noGrow,top:6dlu:noGrow,top:max(d;4px):noGrow,top:4dlu:noGrow,top:max(d;25px):noGrow,top:7dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,bottom:d:grow")); panel2.putClientProperty("html.disable", Boolean.FALSE); panel1.add(panel2, BorderLayout.CENTER); final Spacer spacer5 = new Spacer(); CellConstraints cc = new CellConstraints(); panel2.add(spacer5, cc.xy(3, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); browseButton = new JButton(); browseButton.setText("Browse"); panel2.add(browseButton, cc.xy(5, 5)); comparedFileLabel = new JLabel(); comparedFileLabel.setText("Compared file :"); panel2.add(comparedFileLabel, cc.xy(3, 7, CellConstraints.LEFT, CellConstraints.TOP)); browseButton1 = new JButton(); browseButton1.setText("Browse"); panel2.add(browseButton1, cc.xy(5, 9, CellConstraints.DEFAULT, CellConstraints.TOP)); final Spacer spacer6 = new Spacer(); panel2.add(spacer6, cc.xy(3, 13, CellConstraints.DEFAULT, CellConstraints.FILL)); final Spacer spacer7 = new Spacer(); panel2.add(spacer7, cc.xy(1, 9, CellConstraints.FILL, CellConstraints.DEFAULT)); final Spacer spacer8 = new Spacer(); panel2.add(spacer8, cc.xy(7, 7, CellConstraints.FILL, CellConstraints.DEFAULT)); final JPanel panel3 = new JPanel(); panel3.setLayout(new FormLayout("fill:d:grow", "center:d:grow")); panel2.add(panel3, cc.xyw(3, 11, 3, CellConstraints.FILL, CellConstraints.FILL)); compareButton = new JButton(); compareButton.setPreferredSize(new Dimension(100, 29)); compareButton.setText("Compare"); panel3.add(compareButton, cc.xy(1, 1, CellConstraints.CENTER, CellConstraints.CENTER)); baseFileLabel = new JLabel(); baseFileLabel.setText("Base file :"); panel2.add(baseFileLabel, cc.xy(3, 3, CellConstraints.FILL, CellConstraints.FILL)); baseFileTxt = new JTextField(); baseFileTxt.setMinimumSize(new Dimension(50, 27)); baseFileTxt.setPreferredSize(new Dimension(50, 27)); panel2.add(baseFileTxt, cc.xy(3, 5, CellConstraints.FILL, CellConstraints.DEFAULT)); comparedFileTxt = new JTextField(); comparedFileTxt.setMinimumSize(new Dimension(50, 27)); comparedFileTxt.setPreferredSize(new Dimension(100, 27)); panel2.add(comparedFileTxt, cc.xy(3, 9, CellConstraints.FILL, CellConstraints.DEFAULT)); outputField = new JTextField(); outputField.setMinimumSize(new Dimension(50, 27)); outputField.setPreferredSize(new Dimension(100, 27)); panel2.add(outputField, cc.xy(3, 15, CellConstraints.FILL, CellConstraints.DEFAULT)); }
From source file:hu.pagavcs.client.gui.commit.CommitGui.java
License:Open Source License
public void display() throws SVNException { logMinSize = 0;/*from w ww .j a va2 s . c o m*/ CellConstraints cc = new CellConstraints(); tmdlCommit = new TableModel<CommitListItem>(new CommitListItem()); tblCommit = new Table<CommitListItem>(tmdlCommit); tblCommit.addMouseListener(new PopupupMouseListener()); tblCommit.setRowSorter(new TableRowSorter<TableModel<CommitListItem>>(tmdlCommit)); tblCommit.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); tblCommit.addKeyListener(new SelectDeselectSelectedKeyListener()); tblCommit.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); pathCellRenderer = new DotTextCellRenderer(); tblCommit.getColumnModel().getColumn(3) .setCellRenderer(new StatusCellRendererForCommitListItem(tblCommit, pathCellRenderer)); SelectDeselectListener selectDeselectListener = new SelectDeselectListener(); tmdlCommit.addTableModelListener(selectDeselectListener); tblCommit.getSelectionModel().addListSelectionListener(selectDeselectListener); new StatusCellRendererForCommitListItem(tblCommit); final JScrollPane spCommitList = new JScrollPane(tblCommit); spCommitList.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); taMessage = new TextArea(); taMessage.setLineWrap(true); taMessage.setWrapStyleWord(true); JScrollPane spMessage = new JScrollPane(taMessage); JSplitPane splMain = new JSplitPane(JSplitPane.VERTICAL_SPLIT, spMessage, spCommitList); splMain.setPreferredSize(new Dimension(300, 300)); lblUrl = new Label(); lblWorkingCopy = new Label(); cboMessage = new JComboBox(); cboMessage.setPreferredSize(new Dimension(100, (int) cboMessage.getPreferredSize().getHeight())); cboMessage.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { if (e.getStateChange() == ItemEvent.SELECTED) { if (e.getItem() != null) { taMessage.setText(((RecentMessageSlot) e.getItem()).message); } } } }); JPanel pnlTop = new JPanel(new FormLayout("r:p,2dlu,p:g", "p,2dlu,p,2dlu,p,2dlu")); pnlTop.add(new Label("Commit to:"), cc.xy(1, 1)); pnlTop.add(lblUrl, cc.xy(3, 1)); pnlTop.add(new Label("Working copy:"), cc.xy(1, 3)); pnlTop.add(lblWorkingCopy, cc.xy(3, 3)); pnlTop.add(new Label("Recent messages:"), cc.xy(1, 5)); pnlTop.add(cboMessage, cc.xy(3, 5)); btnStop = new JButton(new StopAction()); prgWorkinProgress = new ProgressBar(this); lblInfo = new Label(); btnCreatePatch = new JButton(new CreatePatchAction()); btnCreatePatch.setEnabled(false); btnCommit = new JButton(new CommitAction()); btnCommit.setEnabled(false); btnRefresh = new JButton(new RefreshAction()); btnRefresh.setEnabled(false); btnSelectAllNone = new JCheckBox(new SelectAllNoneAction()); lblSelectedInfo = new Label(); cbHelpMerge = new JCheckBox("Merge too"); JPanel pnlCheck = new JPanel(new FormLayout("p,2dlu:g,p,2dlu,p", "p")); pnlCheck.add(btnSelectAllNone, cc.xy(1, 1)); pnlCheck.add(lblSelectedInfo, cc.xy(3, 1)); pnlCheck.add(cbHelpMerge, cc.xy(5, 1)); JPanel pnlBottom = new JPanel(new FormLayout("p,2dlu, 50dlu:g, 2dlu,p, 2dlu,p, 2dlu,p", "p,2dlu,p")); pnlBottom.add(pnlCheck, cc.xywh(1, 1, 9, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); pnlBottom.add(btnRefresh, cc.xy(1, 3)); pnlBottom.add(prgWorkinProgress, cc.xy(3, 3)); pnlBottom.add(btnCreatePatch, cc.xy(5, 3)); pnlBottom.add(btnStop, cc.xy(7, 3)); pnlBottom.add(btnCommit, cc.xy(9, 3)); FormLayout lyMain = new FormLayout("p:g", "p,2dlu,f:max(80dlu;p):g,2dlu,p"); JPanel pnlMain = new JPanel(lyMain); pnlMain.add(pnlTop, cc.xy(1, 1)); pnlMain.add(splMain, cc.xy(1, 3)); pnlMain.add(pnlBottom, cc.xy(1, 5)); frame = GuiHelper.createAndShowFrame(pnlMain, "Commit", "commit-app-icon.png", false); frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { commit.setCancel(true); } }); }
From source file:hu.pagavcs.client.gui.repobrowser.RepoBrowserGui.java
License:Open Source License
public void display() throws SVNException { FormLayout layout = new FormLayout("right:p, 2dlu,p:g,p", "p,2dlu,p,2dlu,p:g,2dlu,p"); JPanel pnlMain = new JPanel(layout); CellConstraints cc = new CellConstraints(); lblWorkingCopy = new Label(); sfUrl = new EditField(); sfUrl.addFocusListener(new FocusListener() { public void focusLost(FocusEvent e) { try { urlChanged();/*from www . java2 s .c o m*/ } catch (Exception ex) { Manager.handle(ex); } } public void focusGained(FocusEvent e) { } }); sfUrl.addKeyListener(new KeyAdapter() { public void keyTyped(KeyEvent e) { if (e.getKeyChar() == '\n') { try { urlChanged(); } catch (Exception ex) { Manager.handle(ex); } } } }); JButton btnRefresh = new JButton(new RefreshNodeAction()); lblStatus = new Label(); tree = new Tree(); tree.addTreeWillExpandListener(this); tree.addMouseListener(new PopupupMouseListener()); tree.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("F5"), "REFRESH_SVN_TREE"); tree.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("control R"), "REFRESH_SVN_TREE"); tree.getActionMap().put("REFRESH_SVN_TREE", new RefreshNodeAction()); tree.setCellRenderer(new RepoTreeCellRender()); treeWorking(); pnlMain.add(new JLabel("URL:"), cc.xywh(1, 1, 1, 1)); pnlMain.add(sfUrl, cc.xywh(3, 1, 1, 1)); pnlMain.add(btnRefresh, cc.xywh(4, 1, 1, 1)); pnlMain.add(new JLabel("Working copy:"), cc.xywh(1, 3, 1, 1)); pnlMain.add(lblWorkingCopy, cc.xywh(3, 3, 1, 1)); pnlMain.add(new JScrollPane(tree), cc.xywh(1, 5, 4, 1, CellConstraints.FILL, CellConstraints.FILL)); pnlMain.add(lblStatus, cc.xywh(4, 7, 1, 1)); frame = GuiHelper.createAndShowFrame(pnlMain, "Repository Browser"); }
From source file:hu.pagavcs.client.gui.ResolveConflictGui.java
License:Open Source License
public void display() throws Exception { new OnSwing() { protected void process() throws Exception { if (!applyPatchConlict && wrkFile == null) { MessagePane.showError(null, "No conflict", "Unable to resolve conflict on a non-conflicted file."); return; }/*from www . j a va 2 s . c om*/ FormLayout layout = new FormLayout("p,1dlu:g,p,2dlu,p", "p,2dlu,fill:200dlu:g,2dlu,p"); JPanel pnlMain = new JPanel(layout); CellConstraints cc = new CellConstraints(); tpConflict = new TextPane(); tpConflict.setBackground(Color.WHITE); tpConflict.setAutoscrolls(true); tpConflict.setPreferredSize(new Dimension(200, 200)); GuiHelper.addUndoRedo(tpConflict); JScrollPane spConflict = new JScrollPane(tpConflict); btnReload = new JButton(new ReloadAction()); btnNextConflict = new JButton(new GotoNextConflictAction()); btnSaveResolved = new JButton(new SaveResolvedAction()); pnlMain.add(new Label(mixedFile.getPath()), cc.xywh(1, 1, 5, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); pnlMain.add(spConflict, cc.xywh(1, 3, 5, 1, CellConstraints.FILL, CellConstraints.FILL)); pnlMain.add(btnReload, cc.xy(1, 5)); pnlMain.add(btnNextConflict, cc.xy(3, 5)); pnlMain.add(btnSaveResolved, cc.xy(5, 5)); setNormalText = new SimpleAttributeSet(); setNormalText.addAttribute(ATTRIBUTE_TYPE_KEY, ATTRIBUTE_NORMAL); setMixedText = new SimpleAttributeSet(); StyleConstants.setBackground(setMixedText, Color.LIGHT_GRAY); StyleConstants.setBold(setMixedText, true); setMixedText.addAttribute(ATTRIBUTE_TYPE_KEY, ATTRIBUTE_MIXED); setConflictWorking = new SimpleAttributeSet(); StyleConstants.setBackground(setConflictWorking, Color.YELLOW); StyleConstants.setBold(setConflictWorking, true); setConflictWorking.addAttribute(ATTRIBUTE_TYPE_KEY, ATTRIBUTE_WORKING); setConflictTheirs = new SimpleAttributeSet(); StyleConstants.setBackground(setConflictTheirs, Color.ORANGE); StyleConstants.setBold(setConflictTheirs, true); setConflictTheirs.addAttribute(ATTRIBUTE_TYPE_KEY, ATTRIBUTE_THEIRS); setOriginal = new SimpleAttributeSet(); StyleConstants.setBackground(setOriginal, Color.CYAN); StyleConstants.setBold(setOriginal, true); setOriginal.addAttribute(ATTRIBUTE_TYPE_KEY, ATTRIBUTE_ORIGINAL); reload(); frame = GuiHelper.createAndShowFrame(pnlMain, "Resolve Conflict"); frame.setTitlePrefix(mixedFile.getPath()); } }.run(); }
From source file:hu.pagavcs.client.gui.SettingsGui.java
License:Open Source License
public void display() throws SVNException, IOException { CellConstraints cc = new CellConstraints(); JButton btnAbout = new JButton(new AboutAction()); JButton btnClearLogin = new JButton(new ClearLoginCacheAction()); JButton btnShowLoginDialogNextTime = new JButton(new ShowLoginDialogNextTimeAction()); JButton btnExitPagavcs = new JButton(new ExitPagavcsAction()); JButton btnSetCommitCompletedMessageTemplates = new JButton(new SetCommitCompletedMessageTemplatesAction()); cbGlobalIgnoreEol = new JCheckBox("Global Ignore EOL"); if (Boolean.TRUE.equals(SettingsStore.getInstance().getGlobalIgnoreEol())) { cbGlobalIgnoreEol.setSelected(true); }/*w w w . j a v a2s.co m*/ cbShowIconsInContextMenu = new JCheckBox(new ShowIconsInContextMenuAction()); cbShowIconsInContextMenu.setSelected(isShowIconsInContextMenus()); taCommitCompleteTemplate = new TextArea(); taCommitCompleteTemplate.setToolTipText("Example: /pagavcs/trunk>>>#{0} trunk.PagaVCS"); taCommitCompleteTemplate.setRows(3); JPanel pnlTemplate = new JPanel(new FormLayout("max(200dlu;p),1dlu:g", "p,2dlu,max(50dlu;p):g")); FormLayout lyMain = new FormLayout("1dlu:g,2dlu,p", "p:g,2dlu,p,2dlu,p,2dlu,p,2dlu,p,2dlu,p,2dlu,p,2dlu,p"); JPanel pnlMain = new JPanel(lyMain); pnlTemplate.add(new Label("Commit-completed message templates:"), cc.xy(1, 1)); pnlTemplate.add(new JScrollPane(taCommitCompleteTemplate), cc.xywh(1, 3, 2, 1, CellConstraints.FILL, CellConstraints.FILL)); pnlMain.add(pnlTemplate, cc.xywh(1, 1, 3, 1, CellConstraints.FILL, CellConstraints.FILL)); pnlMain.add(btnSetCommitCompletedMessageTemplates, cc.xy(3, 3)); pnlMain.add(new JSeparator(), cc.xywh(1, 4, 3, 1, CellConstraints.FILL, CellConstraints.FILL)); pnlMain.add(cbGlobalIgnoreEol, cc.xy(3, 5)); pnlMain.add(cbShowIconsInContextMenu, cc.xy(3, 7)); pnlMain.add(new JSeparator(), cc.xywh(1, 8, 3, 1, CellConstraints.FILL, CellConstraints.FILL)); pnlMain.add(btnClearLogin, cc.xy(3, 9)); pnlMain.add(btnShowLoginDialogNextTime, cc.xy(3, 11)); pnlMain.add(btnExitPagavcs, cc.xy(3, 13)); pnlMain.add(new JSeparator(), cc.xywh(1, 14, 3, 1, CellConstraints.FILL, CellConstraints.FILL)); pnlMain.add(btnAbout, cc.xy(3, 15)); taCommitCompleteTemplate.setText(Manager.getSettings().getCommitCompletedMessageTemplates()); frame = GuiHelper.createAndShowFrame(pnlMain, "Settings", "other-app-icon.png", false); frame.addWindowListener(new WindowAdapter() { public void windowClosed(WindowEvent e) { SettingsStore.getInstance().setGlobalIgnoreEol(cbGlobalIgnoreEol.isSelected()); } }); }
From source file:hu.pagavcs.client.gui.UpdateGui.java
License:Open Source License
public void display() { FormLayout lyTop = new FormLayout("r:p,2dlu,p:g", "p,2dlu,p"); JPanel pnlTop = new JPanel(lyTop); FormLayout lyBottom = new FormLayout("p,2dlu,1dlu:g,2dlu,p", "p"); JPanel pnlBottom = new JPanel(lyBottom); FormLayout lyMain = new FormLayout("max(200dlu;p):g", "p,2dlu,fill:60dlu:g,2dlu,p"); JPanel pnlMain = new JPanel(lyMain); CellConstraints cc = new CellConstraints(); lblWorkingCopy = new Label(); lblRepo = new Label(); tmdlUpdate = new TableModel<UpdateListItem>(new UpdateListItem()); tblUpdate = new Table<UpdateListItem>(tmdlUpdate); tblUpdate.addMouseListener(new PopupupMouseListener()); new StatusCellRendererForUpdateListItem(tblUpdate); tblUpdate.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); pathCellRenderer = new DotTextCellRenderer(); tblUpdate.getColumnModel().getColumn(1) .setCellRenderer(new StatusCellRendererForUpdateListItem(tblUpdate, pathCellRenderer)); JScrollPane scrollPane = new JScrollPane(tblUpdate); lblInfo = new Label(); actStopFinish = new StopExitAction(); btnStopFinish = new JButton(actStopFinish); prgWorking = new JProgressBar(); pnlTop.add(new Label("Working copy:"), cc.xy(1, 1)); pnlTop.add(lblWorkingCopy, cc.xy(3, 1)); pnlTop.add(new Label("URL:"), cc.xy(1, 3)); pnlTop.add(lblRepo, cc.xy(3, 3));/*from w w w. j a va 2 s .c om*/ pnlBottom.add(lblInfo, cc.xy(1, 1)); pnlBottom.add(prgWorking, cc.xywh(3, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); pnlBottom.add(btnStopFinish, cc.xy(5, 1)); pnlMain.add(pnlTop, cc.xy(1, 1)); pnlMain.add(scrollPane, cc.xy(1, 3)); pnlMain.add(pnlBottom, cc.xy(1, 5)); frame = GuiHelper.createAndShowFrame(pnlMain, title, "update-app-icon.png", false); frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { try { update.setCancel(true); } catch (Exception ex) { Manager.handle(ex); } shuttingDown = true; tmrTableRevalidate.purge(); tmrTableRevalidate.cancel(); } public void windowClosed(WindowEvent e) { } }); tmrTableRevalidate = new Timer("Revalidate table"); started = false; numberOfPathUpdated = 0; }
From source file:jflowmap.ui.ControlPanel.java
License:Apache License
/** * Method generated by IntelliJ IDEA GUI Designer * >>> IMPORTANT!! <<< * DO NOT edit this method OR call it in your code! * * @noinspection ALL/* w w w. j a va 2 s . c o m*/ */ private void $$$setupUI$$$() { createUIComponents(); panel1 = new JPanel(); panel1.setLayout(new BorderLayout(0, 0)); tabbedPane1 = new JTabbedPane(); panel1.add(tabbedPane1, BorderLayout.CENTER); final JPanel panel2 = new JPanel(); panel2.setLayout(new FormLayout( "fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:187px:noGrow,left:4dlu:noGrow,fill:20px:noGrow,left:4dlu:noGrow,fill:p:noGrow,left:4dlu:noGrow,fill:119px:noGrow,left:20dlu:noGrow,fill:max(d;4px):grow", "center:d:noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:min(p;200px):grow")); tabbedPane1.addTab("Dataset", panel2); panel2.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10), null)); datasetCombo = new JComboBox(); CellConstraints cc = new CellConstraints(); panel2.add(datasetCombo, cc.xy(3, 1)); final JLabel label1 = new JLabel(); label1.setText("Flow weight attr:"); panel2.add(label1, cc.xy(1, 1)); final JSeparator separator1 = new JSeparator(); separator1.setOrientation(1); panel2.add(separator1, cc.xywh(5, 1, 1, 9, CellConstraints.CENTER, CellConstraints.FILL)); final JLabel label2 = new JLabel(); label2.setEnabled(false); label2.setText("Edge weight field:"); panel2.add(label2, cc.xy(7, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); comboBox4 = new JComboBox(); comboBox4.setEnabled(false); panel2.add(comboBox4, cc.xy(9, 1)); final JLabel label3 = new JLabel(); label3.setEnabled(false); label3.setText("Node label field:"); panel2.add(label3, cc.xy(7, 3, CellConstraints.RIGHT, CellConstraints.DEFAULT)); comboBox6 = new JComboBox(); comboBox6.setEnabled(false); panel2.add(comboBox6, cc.xy(9, 3)); final JSeparator separator2 = new JSeparator(); separator2.setOrientation(1); panel2.add(separator2, cc.xywh(10, 1, 1, 9, CellConstraints.CENTER, CellConstraints.FILL)); final JTabbedPane tabbedPane3 = new JTabbedPane(); tabbedPane3.setTabPlacement(3); panel2.add(tabbedPane3, cc.xywh(11, 1, 1, 9, CellConstraints.DEFAULT, CellConstraints.FILL)); final JScrollPane scrollPane1 = new JScrollPane(); tabbedPane3.addTab("Flows", scrollPane1); scrollPane1.setBorder(BorderFactory.createTitledBorder("")); flowsTable.setPreferredScrollableViewportSize(new Dimension(450, 100)); scrollPane1.setViewportView(flowsTable); final JLabel label4 = new JLabel(); label4.setEnabled(false); label4.setText("Node X coord field:"); panel2.add(label4, cc.xy(7, 5, CellConstraints.RIGHT, CellConstraints.DEFAULT)); comboBox2 = new JComboBox(); comboBox2.setEnabled(false); panel2.add(comboBox2, cc.xy(9, 5)); final JLabel label5 = new JLabel(); label5.setEnabled(false); label5.setText("Node Y coord field:"); panel2.add(label5, cc.xy(7, 7, CellConstraints.RIGHT, CellConstraints.DEFAULT)); comboBox3 = new JComboBox(); comboBox3.setEnabled(false); panel2.add(comboBox3, cc.xy(9, 7)); final JPanel panel3 = new JPanel(); panel3.setLayout(new FormLayout( "right:max(d;4px):noGrow,left:4dlu:noGrow,fill:d:grow(2.0),left:4dlu:noGrow,fill:p:noGrow,left:4dlu:noGrow,fill:20px:noGrow,left:4dlu:noGrow,right:max(d;4px):noGrow,left:4dlu:noGrow,fill:d:grow,left:4dlu:noGrow,fill:p:noGrow", "center:26px:noGrow,top:4dlu:noGrow,center:24px:noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:5dlu:noGrow,center:d:noGrow")); tabbedPane1.addTab("Filter", panel3); panel3.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10), null)); minWeightFilterSpinner = new JSpinner(); panel3.add(minWeightFilterSpinner, cc.xy(5, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); final JSeparator separator3 = new JSeparator(); separator3.setOrientation(1); panel3.add(separator3, cc.xywh(7, 1, 1, 5, CellConstraints.CENTER, CellConstraints.FILL)); final JLabel label6 = new JLabel(); label6.setText("Min length:"); panel3.add(label6, cc.xy(9, 1)); minLengthFilterSlider = new JSlider(); panel3.add(minLengthFilterSlider, cc.xy(11, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); minLengthFilterSpinner = new JSpinner(); panel3.add(minLengthFilterSpinner, cc.xy(13, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); final JLabel label7 = new JLabel(); label7.setText("Max edge weight:"); panel3.add(label7, cc.xy(1, 3)); maxWeightFilterSlider = new JSlider(); panel3.add(maxWeightFilterSlider, cc.xy(3, 3, CellConstraints.FILL, CellConstraints.CENTER)); maxWeightFilterSpinner = new JSpinner(); panel3.add(maxWeightFilterSpinner, cc.xy(5, 3, CellConstraints.FILL, CellConstraints.DEFAULT)); autoAdjustColorScaleCheckBox = new JCheckBox(); autoAdjustColorScaleCheckBox.setEnabled(false); autoAdjustColorScaleCheckBox.setText("Auto adjust color scale"); panel3.add(autoAdjustColorScaleCheckBox, cc.xyw(3, 5, 3)); final JLabel label8 = new JLabel(); label8.setText("Max length:"); panel3.add(label8, cc.xy(9, 3)); maxLengthFilterSlider = new JSlider(); panel3.add(maxLengthFilterSlider, cc.xy(11, 3, CellConstraints.FILL, CellConstraints.DEFAULT)); maxLengthFilterSpinner = new JSpinner(); panel3.add(maxLengthFilterSpinner, cc.xy(13, 3, CellConstraints.FILL, CellConstraints.DEFAULT)); final JPanel panel4 = new JPanel(); panel4.setLayout(new FormLayout("fill:d:grow", "center:d:grow")); panel3.add(panel4, cc.xy(5, 7)); final JLabel label9 = new JLabel(); label9.setText("Min edge weight:"); panel3.add(label9, cc.xy(1, 1)); minWeightFilterSlider = new JSlider(); panel3.add(minWeightFilterSlider, cc.xy(3, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); final JPanel panel5 = new JPanel(); panel5.setLayout(new FormLayout( "fill:d:noGrow,left:p:noGrow,fill:20px:noGrow,left:4dlu:noGrow,fill:p:noGrow,left:20dlu:noGrow,fill:max(d;4px):grow", "center:max(d;4px):noGrow,top:4dlu:noGrow,center:24px:noGrow,top:6dlu:noGrow,top:4dlu:noGrow")); tabbedPane1.addTab("Scales", panel5); panel5.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10), null)); final JSeparator separator4 = new JSeparator(); separator4.setOrientation(1); panel5.add(separator4, cc.xywh(3, 1, 1, 5, CellConstraints.CENTER, CellConstraints.FILL)); useLogWidthScaleCheckbox = new JCheckBox(); useLogWidthScaleCheckbox.setEnabled(true); useLogWidthScaleCheckbox.setText("Use log width scale"); panel5.add(useLogWidthScaleCheckbox, cc.xy(2, 1)); useLogColorScaleCheckbox = new JCheckBox(); useLogColorScaleCheckbox.setEnabled(true); useLogColorScaleCheckbox.setText("Use log color scale"); panel5.add(useLogColorScaleCheckbox, cc.xyw(1, 3, 2)); mapEdgeValueToCheckBox = new JCheckBox(); mapEdgeValueToCheckBox.setEnabled(false); mapEdgeValueToCheckBox.setText("Map edge value to color"); panel5.add(mapEdgeValueToCheckBox, cc.xy(5, 1)); mapEdgeValueToCheckBox1 = new JCheckBox(); mapEdgeValueToCheckBox1.setEnabled(false); mapEdgeValueToCheckBox1.setText("Map edge value to width"); panel5.add(mapEdgeValueToCheckBox1, cc.xy(5, 3)); final JSeparator separator5 = new JSeparator(); separator5.setOrientation(1); panel5.add(separator5, cc.xywh(6, 1, 1, 5, CellConstraints.CENTER, CellConstraints.FILL)); final JPanel panel6 = new JPanel(); panel6.setLayout(new FormLayout( "fill:d:noGrow,left:4dlu:noGrow,fill:110px:noGrow,left:4dlu:noGrow,fill:20px:noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow,fill:20px:noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:max(d;4px):grow,left:4dlu:noGrow,fill:max(m;50px):noGrow", "center:d:noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow")); tabbedPane1.addTab("Aesthetics", panel6); panel6.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10), null)); final JLabel label10 = new JLabel(); label10.setEnabled(true); label10.setText("Color scheme:"); panel6.add(label10, cc.xy(1, 1)); colorSchemeCombo = new JComboBox(); colorSchemeCombo.setEnabled(true); panel6.add(colorSchemeCombo, cc.xy(3, 1)); final JSeparator separator6 = new JSeparator(); separator6.setOrientation(1); panel6.add(separator6, cc.xywh(5, 1, 1, 7, CellConstraints.CENTER, CellConstraints.FILL)); final JLabel label11 = new JLabel(); label11.setText("Edge width:"); panel6.add(label11, cc.xy(10, 1, CellConstraints.RIGHT, CellConstraints.CENTER)); maxEdgeWidthSlider = new JSlider(); maxEdgeWidthSlider.setPaintLabels(false); maxEdgeWidthSlider.setPaintTicks(false); maxEdgeWidthSlider.setPaintTrack(true); panel6.add(maxEdgeWidthSlider, cc.xy(12, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); maxEdgeWidthSpinner = new JSpinner(); panel6.add(maxEdgeWidthSpinner, cc.xy(14, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); final JLabel label12 = new JLabel(); label12.setText("Edge opacity:"); panel6.add(label12, cc.xy(10, 3, CellConstraints.RIGHT, CellConstraints.DEFAULT)); edgeOpacitySlider = new JSlider(); panel6.add(edgeOpacitySlider, cc.xy(12, 3, CellConstraints.FILL, CellConstraints.DEFAULT)); edgeOpacitySpinner = new JSpinner(); panel6.add(edgeOpacitySpinner, cc.xy(14, 3, CellConstraints.FILL, CellConstraints.DEFAULT)); showNodesCheckBox = new JCheckBox(); showNodesCheckBox.setText("Show nodes"); panel6.add(showNodesCheckBox, cc.xy(7, 1)); final JSeparator separator7 = new JSeparator(); separator7.setOrientation(1); panel6.add(separator7, cc.xywh(8, 1, 1, 7, CellConstraints.CENTER, CellConstraints.FILL)); showDirectionMarkersCheckBox = new JCheckBox(); showDirectionMarkersCheckBox.setText("Show direction markers"); panel6.add(showDirectionMarkersCheckBox, cc.xy(7, 5)); fillEdgesWithGradientCheckBox = new JCheckBox(); fillEdgesWithGradientCheckBox.setText("Fill edges with gradient"); panel6.add(fillEdgesWithGradientCheckBox, cc.xy(7, 3)); proportionalDirectionMarkersCheckBox = new JCheckBox(); proportionalDirectionMarkersCheckBox.setText("Proportional direction markers"); panel6.add(proportionalDirectionMarkersCheckBox, cc.xy(7, 7)); edgeMarkerSizeSpinner = new JSpinner(); panel6.add(edgeMarkerSizeSpinner, cc.xy(14, 5, CellConstraints.FILL, CellConstraints.DEFAULT)); edgeMarkerSizeSlider = new JSlider(); panel6.add(edgeMarkerSizeSlider, cc.xy(12, 5, CellConstraints.FILL, CellConstraints.DEFAULT)); edgeMarkerOpacitySpinner = new JSpinner(); panel6.add(edgeMarkerOpacitySpinner, cc.xy(14, 7, CellConstraints.FILL, CellConstraints.DEFAULT)); edgeMarkerOpacitySlider = new JSlider(); panel6.add(edgeMarkerOpacitySlider, cc.xy(12, 7, CellConstraints.FILL, CellConstraints.DEFAULT)); edgeMarkerSizeLabel = new JLabel(); edgeMarkerSizeLabel.setText("Direction marker size:"); panel6.add(edgeMarkerSizeLabel, cc.xy(10, 5, CellConstraints.RIGHT, CellConstraints.DEFAULT)); edgeMarkerOpacityLabel = new JLabel(); edgeMarkerOpacityLabel.setText("Direction marker opacity:"); panel6.add(edgeMarkerOpacityLabel, cc.xy(10, 7, CellConstraints.RIGHT, CellConstraints.DEFAULT)); final JPanel panel7 = new JPanel(); panel7.setLayout(new FormLayout( "fill:d:noGrow,left:6dlu:noGrow,fill:p:noGrow,left:4dlu:noGrow,fill:p:noGrow,left:4dlu:noGrow,fill:p:noGrow,left:4dlu:noGrow,fill:12px:noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:p:noGrow,left:12dlu:noGrow,fill:p:noGrow,fill:d:noGrow,left:d:noGrow", "center:max(d;4px):noGrow,top:4dlu:noGrow,center:25px:noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:d:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow")); tabbedPane1.addTab("Edge bundling", panel7); panel7.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10), null)); final JSeparator separator8 = new JSeparator(); separator8.setOrientation(1); panel7.add(separator8, cc.xywh(9, 1, 1, 8, CellConstraints.CENTER, CellConstraints.FILL)); final JLabel label13 = new JLabel(); label13.setHorizontalAlignment(4); label13.setText("Step damping factor:"); panel7.add(label13, cc.xy(11, 3)); stepDampingFactorSpinner = new JSpinner(); panel7.add(stepDampingFactorSpinner, cc.xy(13, 3, CellConstraints.FILL, CellConstraints.DEFAULT)); stepSizeSpinner = new JSpinner(); panel7.add(stepSizeSpinner, cc.xy(13, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); final JLabel label14 = new JLabel(); label14.setHorizontalAlignment(4); label14.setText("Step size (S):"); panel7.add(label14, cc.xy(11, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); final JLabel label15 = new JLabel(); label15.setHorizontalAlignment(4); label15.setText("Edge stiffness (K):"); panel7.add(label15, cc.xy(5, 3, CellConstraints.RIGHT, CellConstraints.DEFAULT)); edgeStiffnessSpinner = new JSpinner(); panel7.add(edgeStiffnessSpinner, cc.xy(7, 3, CellConstraints.FILL, CellConstraints.DEFAULT)); final JSeparator separator9 = new JSeparator(); separator9.setOrientation(1); panel7.add(separator9, cc.xywh(14, 1, 1, 8, CellConstraints.CENTER, CellConstraints.FILL)); final JLabel label16 = new JLabel(); label16.setHorizontalAlignment(4); label16.setText("Number of cycles:"); panel7.add(label16, cc.xy(5, 1)); numberOfCyclesSpinner = new JSpinner(); panel7.add(numberOfCyclesSpinner, cc.xy(7, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); final JLabel label17 = new JLabel(); label17.setHorizontalAlignment(4); label17.setText("Compatibility threshold:"); panel7.add(label17, cc.xy(5, 5)); edgeCompatibilityThresholdSpinner = new JSpinner(); panel7.add(edgeCompatibilityThresholdSpinner, cc.xy(7, 5, CellConstraints.FILL, CellConstraints.DEFAULT)); final JLabel label18 = new JLabel(); label18.setHorizontalAlignment(4); label18.setText("Steps in 1st cycle (I):"); panel7.add(label18, cc.xy(11, 5)); stepsInCycleSpinner = new JSpinner(); panel7.add(stepsInCycleSpinner, cc.xy(13, 5, CellConstraints.FILL, CellConstraints.DEFAULT)); bundleButton = new JButton(); bundleButton.setText("Bundle"); panel7.add(bundleButton, cc.xy(1, 1)); resetBundlingButton = new JButton(); resetBundlingButton.setText("Reset"); panel7.add(resetBundlingButton, cc.xy(1, 3)); defaultValuesButton = new JButton(); defaultValuesButton.setText("Default Values"); panel7.add(defaultValuesButton, cc.xy(1, 5)); final JSeparator separator10 = new JSeparator(); separator10.setOrientation(1); panel7.add(separator10, cc.xywh(3, 1, 1, 8, CellConstraints.CENTER, CellConstraints.FILL)); repulsiveEdgesCheckBox = new JCheckBox(); repulsiveEdgesCheckBox.setText("Repulsion:"); panel7.add(repulsiveEdgesCheckBox, cc.xy(5, 8, CellConstraints.RIGHT, CellConstraints.DEFAULT)); repulsionSpinner = new JSpinner(); panel7.add(repulsionSpinner, cc.xy(7, 8, CellConstraints.FILL, CellConstraints.DEFAULT)); inverseQuadraticModelCheckBox = new JCheckBox(); inverseQuadraticModelCheckBox.setText("Inverse-quadratic model"); panel7.add(inverseQuadraticModelCheckBox, cc.xyw(11, 8, 3, CellConstraints.LEFT, CellConstraints.DEFAULT)); final JSeparator separator11 = new JSeparator(); panel7.add(separator11, cc.xyw(1, 7, 2, CellConstraints.FILL, CellConstraints.FILL)); aggregateEdgesButton = new JButton(); aggregateEdgesButton.setText("Aggregate edges"); panel7.add(aggregateEdgesButton, cc.xy(1, 8)); directionAffectsCompatibilityCheckBox = new JCheckBox(); directionAffectsCompatibilityCheckBox.setText("Direction affects compatibility"); panel7.add(directionAffectsCompatibilityCheckBox, cc.xy(17, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); edgeValueAffectsAttractionCheckBox = new JCheckBox(); edgeValueAffectsAttractionCheckBox.setText("Edge value affects attraction"); panel7.add(edgeValueAffectsAttractionCheckBox, cc.xy(17, 3)); simpleCompatibilityMeasureCheckBox = new JCheckBox(); simpleCompatibilityMeasureCheckBox.setText("Simple compatibility measure"); panel7.add(simpleCompatibilityMeasureCheckBox, cc.xy(17, 5, CellConstraints.LEFT, CellConstraints.DEFAULT)); binaryCompatibilityCheckBox = new JCheckBox(); binaryCompatibilityCheckBox.setText("Binary compatibility"); panel7.add(binaryCompatibilityCheckBox, cc.xy(17, 8, CellConstraints.LEFT, CellConstraints.DEFAULT)); final JPanel panel8 = new JPanel(); panel8.setLayout(new FormLayout( "fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:20px:noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:d:noGrow,left:4dlu:noGrow,fill:max(d;4px):grow,left:4dlu:noGrow,fill:max(p;75px):noGrow,left:10dlu:noGrow,fill:1px:noGrow,left:10dlu:noGrow,fill:max(p;200px):noGrow", "center:max(p;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:m:noGrow,top:d:noGrow,center:max(d;6px):noGrow,center:d:noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:min(p;200px):grow")); tabbedPane1.addTab("Node clustering", panel8); panel8.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10), null)); panel8.add(distanceMeasureCombo, cc.xyw(7, 1, 5, CellConstraints.LEFT, CellConstraints.DEFAULT)); final JLabel label19 = new JLabel(); label19.setText("Distance measure:"); panel8.add(label19, cc.xy(5, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); tabbedPane2 = new JTabbedPane(); tabbedPane2.setTabPlacement(3); panel8.add(tabbedPane2, cc.xywh(15, 1, 1, 14, CellConstraints.DEFAULT, CellConstraints.FILL)); final JPanel panel9 = new JPanel(); panel9.setLayout(new FormLayout("fill:d:grow", "center:d:grow")); tabbedPane2.addTab("Clusters", panel9); final JScrollPane scrollPane2 = new JScrollPane(); panel9.add(scrollPane2, cc.xy(1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); scrollPane2.setBorder(BorderFactory.createTitledBorder("")); clustersTable.setPreferredScrollableViewportSize(new Dimension(450, 100)); scrollPane2.setViewportView(clustersTable); final JScrollPane scrollPane3 = new JScrollPane(); tabbedPane2.addTab("Nodes", scrollPane3); scrollPane3.setBorder(BorderFactory.createTitledBorder("")); clusterNodesTable.setPreferredScrollableViewportSize(new Dimension(450, 100)); scrollPane3.setViewportView(clusterNodesTable); final JScrollPane scrollPane4 = new JScrollPane(); tabbedPane2.addTab("Distances", scrollPane4); scrollPane4.setBorder(BorderFactory.createTitledBorder("")); clusterDistancesTable.setPreferredScrollableViewportSize(new Dimension(450, 100)); scrollPane4.setViewportView(clusterDistancesTable); final JSeparator separator12 = new JSeparator(); separator12.setOrientation(1); panel8.add(separator12, cc.xywh(13, 1, 1, 14, CellConstraints.CENTER, CellConstraints.FILL)); final JLabel label20 = new JLabel(); label20.setText("Linkage:"); panel8.add(label20, cc.xy(5, 3, CellConstraints.RIGHT, CellConstraints.DEFAULT)); panel8.add(linkageComboBox, cc.xy(7, 3, CellConstraints.LEFT, CellConstraints.DEFAULT)); maxClusterDistanceSlider = new JSlider(); maxClusterDistanceSlider.setEnabled(false); panel8.add(maxClusterDistanceSlider, cc.xyw(6, 8, 4, CellConstraints.FILL, CellConstraints.DEFAULT)); euclideanMaxClusterDistanceSlider = new JSlider(); euclideanMaxClusterDistanceSlider.setEnabled(false); panel8.add(euclideanMaxClusterDistanceSlider, cc.xyw(6, 10, 4, CellConstraints.FILL, CellConstraints.DEFAULT)); maxClusterDistanceSpinner = new JSpinner(); maxClusterDistanceSpinner.setEnabled(false); panel8.add(maxClusterDistanceSpinner, cc.xy(11, 8, CellConstraints.FILL, CellConstraints.DEFAULT)); euclideanMaxClusterDistanceSpinner = new JSpinner(); euclideanMaxClusterDistanceSpinner.setEnabled(false); panel8.add(euclideanMaxClusterDistanceSpinner, cc.xy(11, 10, CellConstraints.FILL, CellConstraints.DEFAULT)); euclideanMaxClusterDistanceLabel = new JLabel(); euclideanMaxClusterDistanceLabel.setEnabled(false); euclideanMaxClusterDistanceLabel.setText("Euclidean max cluster distance:"); panel8.add(euclideanMaxClusterDistanceLabel, cc.xy(5, 10, CellConstraints.RIGHT, CellConstraints.DEFAULT)); maxClusterDistanceLabel = new JLabel(); maxClusterDistanceLabel.setEnabled(false); maxClusterDistanceLabel.setText("Max cluster distance:"); panel8.add(maxClusterDistanceLabel, cc.xy(5, 8, CellConstraints.RIGHT, CellConstraints.DEFAULT)); final JSeparator separator13 = new JSeparator(); separator13.setOrientation(1); panel8.add(separator13, cc.xywh(3, 1, 1, 4, CellConstraints.FILL, CellConstraints.FILL)); clusterButton = new JButton(); clusterButton.setText("Cluster"); panel8.add(clusterButton, cc.xy(1, 1)); final JSeparator separator14 = new JSeparator(); panel8.add(separator14, cc.xyw(1, 5, 12, CellConstraints.FILL, CellConstraints.FILL)); numberOfClustersLabel = new JLabel(); numberOfClustersLabel.setEnabled(false); numberOfClustersLabel.setText("Number of clusters:"); panel8.add(numberOfClustersLabel, cc.xy(5, 12, CellConstraints.RIGHT, CellConstraints.DEFAULT)); numberOfClustersValueLabel = new JLabel(); numberOfClustersValueLabel.setText(""); panel8.add(numberOfClustersValueLabel, cc.xy(7, 12)); joinClusterEdgesButton = new JButton(); joinClusterEdgesButton.setEnabled(true); joinClusterEdgesButton.setText("Join edges"); panel8.add(joinClusterEdgesButton, cc.xy(1, 8)); resetClustersButton = new JButton(); resetClustersButton.setEnabled(true); resetClustersButton.setText("Reset"); panel8.add(resetClustersButton, cc.xy(1, 3)); resetJoinedEdgesButton = new JButton(); resetJoinedEdgesButton.setText("Reset"); panel8.add(resetJoinedEdgesButton, cc.xy(1, 10)); final JSeparator separator15 = new JSeparator(); separator15.setOrientation(1); panel8.add(separator15, cc.xywh(3, 7, 1, 7, CellConstraints.FILL, CellConstraints.FILL)); combineWithEuclideanClustersCheckBox = new JCheckBox(); combineWithEuclideanClustersCheckBox.setEnabled(true); combineWithEuclideanClustersCheckBox.setSelected(false); combineWithEuclideanClustersCheckBox.setText("Combine with Euclidean clusters"); panel8.add(combineWithEuclideanClustersCheckBox, cc.xyw(9, 3, 3)); }
From source file:just.texture.packer.desktop.PackingQuestions.java
License:Apache License
/** * Method generated by IntelliJ IDEA GUI Designer * >>> IMPORTANT!! <<< * DO NOT edit this method OR call it in your code! * * @noinspection ALL/* ww w . ja va 2s. co m*/ */ private void $$$setupUI$$$() { panel1 = new JPanel(); panel1.setLayout(new FormLayout( "fill:275px:noGrow,left:4dlu:noGrow,fill:max(m;150px):grow,left:13dlu:noGrow,center:max(p;300px):grow(5.0),left:6dlu:noGrow", "center:d:grow,top:4dlu:noGrow,center:d:grow,top:4dlu:noGrow,center:d:grow,top:4dlu:noGrow,center:d:grow")); panel1.setBackground(new Color(-12632257)); panel1.setFont(UIManager.getFont("TextField.font")); chooseInputDirectoryButton = new JButton(); chooseInputDirectoryButton.setText("Choose Directory"); CellConstraints cc = new CellConstraints(); panel1.add(chooseInputDirectoryButton, cc.xy(3, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); final JLabel label1 = new JLabel(); label1.setForeground(new Color(-855310)); label1.setText("Path to images: "); panel1.add(label1, cc.xy(1, 1)); pathToImagesText = new JTextField(); pathToImagesText.setBackground(new Color(-723724)); pathToImagesText.setText("<Directory not chosen>"); panel1.add(pathToImagesText, cc.xy(5, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); final JLabel label2 = new JLabel(); label2.setForeground(new Color(-855310)); label2.setText("Path to write the output:"); panel1.add(label2, cc.xy(1, 3)); chooseOutputDirectoryButton = new JButton(); chooseOutputDirectoryButton.setText("Choose Directory"); panel1.add(chooseOutputDirectoryButton, cc.xy(3, 3)); pathToOutputText = new JTextField(); pathToOutputText.setBackground(new Color(-723724)); pathToOutputText.setText("<Directory not chosen>"); panel1.add(pathToOutputText, cc.xy(5, 3, CellConstraints.FILL, CellConstraints.DEFAULT)); final JLabel label3 = new JLabel(); label3.setForeground(new Color(-855310)); label3.setText("[Optional] Prefix for atlas file and texture page(s)"); panel1.add(label3, cc.xy(1, 5)); packFileText = new JTextField(); packFileText.setBackground(new Color(-723724)); packFileText.setText("pack"); panel1.add(packFileText, cc.xy(5, 5, CellConstraints.FILL, CellConstraints.DEFAULT)); packTexturesButton = new JButton(); packTexturesButton.setText("Pack Textures!"); panel1.add(packTexturesButton, cc.xy(3, 7)); final JPanel panel2 = new JPanel(); panel2.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5)); panel2.setBackground(new Color(-12632257)); panel1.add(panel2, cc.xy(5, 7)); successLabel = new JLabel(); successLabel.setEnabled(true); successLabel .setFont(new Font(successLabel.getFont().getName(), Font.BOLD, successLabel.getFont().getSize())); successLabel.setForeground(new Color(-10816647)); successLabel.setText(""); panel2.add(successLabel); failureLabel = new JLabel(); failureLabel .setFont(new Font(failureLabel.getFont().getName(), Font.BOLD, failureLabel.getFont().getSize())); failureLabel.setForeground(new Color(-65485)); failureLabel.setText(""); panel2.add(failureLabel); processingLabel = new JLabel(); processingLabel.setForeground(new Color(-10027009)); processingLabel.setText(""); panel2.add(processingLabel); }