List of usage examples for com.jgoodies.forms.layout CellConstraints DEFAULT
Alignment DEFAULT
To view the source code for com.jgoodies.forms.layout CellConstraints DEFAULT.
Click Source Link
From source file:hu.pagavcs.client.gui.DeleteGui.java
License:Open Source License
public void display() throws SVNException { JPanel pnlMain = new JPanel(new FormLayout("r:p,2dlu,p:g", "p,2dlu:g,p,2dlu,p")); CellConstraints cc = new CellConstraints(); frame = GuiHelper.createFrame(pnlMain, "Delete", null); Label lblWorkingCopy = new Label("Path:"); String wcText;/*w w w .j a va 2s . c o m*/ if (delete.getPath().size() == 1) { wcText = delete.getPath().get(0); } else { wcText = "<Multiple files are selected>"; } Label sfWorkingCopy = new Label(wcText); btnClose = new JButton(new CloseAction(frame)); lblStatus = new Label(" "); pnlMain.add(lblWorkingCopy, cc.xy(1, 1)); pnlMain.add(sfWorkingCopy, cc.xy(3, 1)); pnlMain.add(btnClose, cc.xywh(1, 3, 3, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); pnlMain.add(lblStatus, cc.xywh(1, 5, 3, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); frame.execute(); }
From source file:hu.pagavcs.client.gui.IgnoreGui.java
License:Open Source License
public void display() throws SVNException { JPanel pnlMain = new JPanel(new FormLayout("r:p,2dlu,p:g", "p,2dlu:g,p,2dlu,p")); CellConstraints cc = new CellConstraints(); frame = GuiHelper.createFrame(pnlMain, "Ignore", null); Label lblWorkingCopy = new Label("Path:"); Label sfWorkingCopy = new Label(ignore.getPath()); JButton btnClose = new JButton(new CloseAction(frame)); lblStatus = new Label(" "); pnlMain.add(lblWorkingCopy, cc.xy(1, 1)); pnlMain.add(sfWorkingCopy, cc.xy(3, 1)); pnlMain.add(btnClose, cc.xywh(1, 3, 3, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); pnlMain.add(lblStatus, cc.xywh(1, 5, 3, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); frame.execute();//from w w w .jav a 2s . com }
From source file:hu.pagavcs.client.gui.LockGui.java
License:Open Source License
public void display() throws SVNException { JPanel pnlMain = new JPanel(new FormLayout("r:p,2dlu,p:g", "p,2dlu:g,p,2dlu,p")); CellConstraints cc = new CellConstraints(); frame = GuiHelper.createFrame(pnlMain, "Lock", null); Label lblWorkingCopy = new Label("Path:"); Label sfWorkingCopy = new Label(operation.getPath()); JButton btnClose = new JButton(new CloseAction(frame)); lblStatus = new Label(" "); pnlMain.add(lblWorkingCopy, cc.xy(1, 1)); pnlMain.add(sfWorkingCopy, cc.xy(3, 1)); pnlMain.add(btnClose, cc.xywh(1, 3, 3, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); pnlMain.add(lblStatus, cc.xywh(1, 5, 3, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); frame.execute();/* w w w. ja va2 s .c om*/ }
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 w w w . j a va2s .c o m*/ 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.UnignoreGui.java
License:Open Source License
public void display() throws SVNException { JPanel pnlMain = new JPanel(new FormLayout("r:p,2dlu,p:g", "p,2dlu:g,p,2dlu,p")); CellConstraints cc = new CellConstraints(); frame = GuiHelper.createFrame(pnlMain, "Unignore", null); Label lblWorkingCopy = new Label("Path:"); Label sfWorkingCopy = new Label(unignore.getPath()); JButton btnClose = new JButton(new CloseAction(frame)); lblStatus = new Label(" "); pnlMain.add(lblWorkingCopy, cc.xy(1, 1)); pnlMain.add(sfWorkingCopy, cc.xy(3, 1)); pnlMain.add(btnClose, cc.xywh(1, 3, 3, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); pnlMain.add(lblStatus, cc.xywh(1, 5, 3, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); frame.execute();/*from w ww .ja v a 2s . c om*/ }
From source file:hu.pagavcs.client.gui.UnlockGui.java
License:Open Source License
public void display() throws SVNException { JPanel pnlMain = new JPanel(new FormLayout("r:p,2dlu,p:g", "p,2dlu:g,p,2dlu,p")); CellConstraints cc = new CellConstraints(); frame = GuiHelper.createFrame(pnlMain, "Unlock", null); Label lblWorkingCopy = new Label("Path:"); Label sfWorkingCopy = new Label(operation.getPath()); JButton btnClose = new JButton(new CloseAction(frame)); lblStatus = new Label(" "); pnlMain.add(lblWorkingCopy, cc.xy(1, 1)); pnlMain.add(sfWorkingCopy, cc.xy(3, 1)); pnlMain.add(btnClose, cc.xywh(1, 3, 3, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); pnlMain.add(lblStatus, cc.xywh(1, 5, 3, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); frame.execute();//w w w. j ava2s. co m }
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));/* w ww . j a v a2 s .c o m*/ 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:interface_grafica.Principal.java
public void imprimirSMS(String sms, String usuarioTipo, Conversa convers, Utilizador utilizador) { Conversa conversa = null;/*w ww. j a va 2s .c om*/ if (usuarioTipo.equals("usuario_remoto")) { conversa = retornarConversaPorUtilizador(utilizador); colocarConversaNaTela(conversa); } else { conversa = convers; } CellConstraints cc = new CellConstraints(); JLabel vazio = new JLabel(" "); vazio.setFont(new Font("Ariel", Font.PLAIN, 3)); conversa.getLayout().appendRow(new RowSpec(Sizes.DEFAULT)); conversa.getPainel().add(vazio, cc.xy(1, conversa.getLayout().getRowCount())); conversa.getLayout().appendRow(new RowSpec(Sizes.DEFAULT)); if (usuarioTipo.equals("usuario_remoto")) { conversa.getPainel().add(new DesignComponentes().xyBalao(g, sms, usuarioTipo), cc.xy(1, conversa.getLayout().getRowCount(), CellConstraints.LEFT, CellConstraints.DEFAULT)); Tocar.tocarSom(getClass().getResource("/audio/audio_files/sms.wav")); } else { conversa.getPainel().add(new DesignComponentes().xyBalao(g, sms, usuarioTipo), cc.xy(1, conversa.getLayout().getRowCount())); } conversa.validate(); conversa.getVerticalScrollBar().setValue(conversa.getVerticalScrollBar().getMaximum()); }
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 ww. j a v a2 s . co 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//from w w w. j ava2s . 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); }