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:com.tcay.slalom.UI.ScoringBoard.java
License:Open Source License
/** * Method generated by IntelliJ IDEA GUI Designer * >>> IMPORTANT!! <<< * DO NOT edit this method OR call it in your code! * * @noinspection ALL/*from w w w. j av a 2s . c o m*/ */ private void $$$setupUI$$$() { createUIComponents(); panel1 = new JPanel(); panel1.setLayout(new FormLayout("fill:d:grow", "center:d:grow")); CellConstraints cc = new CellConstraints(); panel1.add(leaderScrollPane, cc.xy(1, 1, CellConstraints.FILL, CellConstraints.FILL)); leaderScrollPane.setViewportView(runScoringTable); }
From source file:com.tcay.slalom.UI.SectionConfigUI.java
License:Open Source License
/** * Method generated by IntelliJ IDEA GUI Designer * >>> IMPORTANT!! <<< * DO NOT edit this method OR call it in your code! * * @noinspection ALL/*from www . j a v a 2 s .c om*/ */ private void $$$setupUI$$$() { createUIComponents(); panel1 = new JPanel(); panel1.setLayout(new FormLayout( "fill:247px:noGrow,left:5dlu:noGrow,fill:74px:noGrow,left:4dlu:noGrow,fill:74px:noGrow,left:23dlu:noGrow,fill:max(d;4px):noGrow", "center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:12px:noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:29px:noGrow,top:3dlu:noGrow,top:19dlu:noGrow,center:max(d;4px):noGrow,center:174px:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow")); CellConstraints cc = new CellConstraints(); panel1.add(comboBoxSection1, cc.xy(5, 7)); section1Label = new JLabel(); section1Label.setText("Section 1"); panel1.add(section1Label, cc.xy(3, 7)); section2Label = new JLabel(); section2Label.setText("Section 2"); panel1.add(section2Label, cc.xy(3, 10)); panel1.add(comboBoxSection2, cc.xy(5, 10)); section3Label = new JLabel(); section3Label.setText("Section 3"); panel1.add(section3Label, cc.xy(3, 12)); panel1.add(comboBoxSection3, cc.xy(5, 12)); section4Label = new JLabel(); section4Label.setText("Section 4"); panel1.add(section4Label, cc.xy(3, 14)); panel1.add(comboBoxSection4, cc.xy(5, 14)); final JLabel label1 = new JLabel(); this.$$$loadLabelText$$$(label1, ResourceBundle.getBundle("resources/SlalomAppMessages").getString("sectionConfig.lastGate")); panel1.add(label1, cc.xy(5, 3)); section5Label = new JLabel(); section5Label.setText("Section 5"); panel1.add(section5Label, cc.xy(3, 16)); panel1.add(comboBoxSection5, cc.xy(5, 16)); final JList list1 = new JList(); list1.setToolTipText( "Causes diagrams for touches and reason codes for 50s to appear when assessing penalties"); panel1.add(list1, cc.xy(5, 21, CellConstraints.DEFAULT, CellConstraints.FILL)); final JScrollPane scrollPane1 = new JScrollPane(); panel1.add(scrollPane1, cc.xy(5, 20, CellConstraints.DEFAULT, CellConstraints.FILL)); scrollPane1.setViewportView(upstreamCheckBoxList); doneButton.setText("Done"); panel1.add(doneButton, cc.xy(1, 23)); final JLabel label2 = new JLabel(); this.$$$loadLabelText$$$(label2, ResourceBundle.getBundle("resources/SlalomAppMessages") .getString("sectionConfig.sectionConfiguration")); panel1.add(label2, cc.xyw(3, 1, 5, CellConstraints.CENTER, CellConstraints.DEFAULT)); final JLabel label3 = new JLabel(); this.$$$loadLabelText$$$(label3, ResourceBundle.getBundle("resources/SlalomAppMessages").getString("sectionConfig.advancedOptions")); panel1.add(label3, cc.xy(1, 1)); final JLabel label4 = new JLabel(); this.$$$loadLabelText$$$(label4, ResourceBundle.getBundle("resources/SlalomAppMessages") .getString("sectionConfig.selectUpstreamGates")); panel1.add(label4, cc.xyw(3, 19, 4, CellConstraints.CENTER, CellConstraints.DEFAULT)); final JLabel label5 = new JLabel(); label5.setFont(new Font(label5.getFont().getName(), label5.getFont().getStyle(), 8)); label5.setText("to be moved to Advanced Options page"); panel1.add(label5, cc.xy(1, 3)); this.$$$loadButtonText$$$(icfPenaltyDiagrams, ResourceBundle.getBundle("resources/SlalomAppMessages").getString("sectionConfig.useIcfPenalties")); icfPenaltyDiagrams.setToolTipText(ResourceBundle.getBundle("resources/SlalomAppMessages") .getString("sectionConfig.icfPenaltyDiagrams.tooltip")); panel1.add(icfPenaltyDiagrams, cc.xy(1, 7)); this.$$$loadButtonText$$$(useTAGHeuerPhotoEyes, ResourceBundle.getBundle("resources/SlalomAppMessages") .getString("sectionConfig.useTagHeuerEmulation.tooltip")); useTAGHeuerPhotoEyes.setToolTipText(ResourceBundle.getBundle("resources/SlalomAppMessages") .getString("sectionConfig.useTagHeuerEmulation.tooltip")); panel1.add(useTAGHeuerPhotoEyes, cc.xy(1, 12)); this.$$$loadButtonText$$$(useMicrogatePhotoEyesCheckBox, ResourceBundle.getBundle("resources/SlalomAppMessages").getString("sectionConfig.useMicrogate")); useMicrogatePhotoEyesCheckBox.setToolTipText(ResourceBundle.getBundle("resources/SlalomAppMessages") .getString("sectionConfig.useMicrogate.tooltip")); panel1.add(useMicrogatePhotoEyesCheckBox, cc.xy(1, 14)); this.$$$loadButtonText$$$(useTimyPhotoEyesCheckBox, ResourceBundle.getBundle("resources/SlalomAppMessages").getString("sectionConfig.useTimy")); useTimyPhotoEyesCheckBox.setToolTipText( ResourceBundle.getBundle("resources/SlalomAppMessages").getString("sectionConfig.useTimy.tooltip")); panel1.add(useTimyPhotoEyesCheckBox, cc.xy(1, 16)); }
From source file:com.tcay.slalom.UI.TestScrollPane_REFERENCE.java
License:Open Source License
/** * Method generated by IntelliJ IDEA GUI Designer * >>> IMPORTANT!! <<< * DO NOT edit this method OR call it in your code! * * @noinspection ALL/* w ww . ja v a2s. c o m*/ */ private void $$$setupUI$$$() { panel1 = new JPanel(); panel1.setLayout(new FormLayout("fill:d:grow", "center:d:noGrow")); final JScrollPane scrollPane1 = new JScrollPane(); CellConstraints cc = new CellConstraints(); panel1.add(scrollPane1, cc.xy(1, 1, CellConstraints.FILL, CellConstraints.FILL)); final JPanel panel2 = new JPanel(); panel2.setLayout(new FormLayout("fill:d:noGrow", "center:d:noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow,top:3dlu:noGrow,center:max(d;4px):noGrow")); scrollPane1.setViewportView(panel2); final JLabel label1 = new JLabel(); label1.setText("Label"); panel2.add(label1, cc.xy(1, 1)); final JLabel label2 = new JLabel(); label2.setText("Label"); panel2.add(label2, cc.xy(1, 3)); final JLabel label3 = new JLabel(); label3.setText("Label"); panel2.add(label3, cc.xy(1, 5)); final JLabel label4 = new JLabel(); label4.setText("Label"); panel2.add(label4, cc.xy(1, 7)); }
From source file:com.tibco.util.gui.JmsStreamForm.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents menuBar = new JMenuBar(); menuFile = new JMenu(); mnuNewConfig = new JMenuItem(); mnuOpenConfig = new JMenuItem(); mnuSaveConfigFile = new JMenuItem(); mnuSaveConfigAs = new JMenuItem(); mnuExit = new JMenuItem(); menuTools = new JMenu(); mnuConfiguration = new JMenuItem(); mnuCreateFileJndi = new JMenuItem(); mnuMessages = new JMenu(); mnuNewMessages = new JMenuItem(); mnuOpenMessages = new JMenuItem(); mnuMsgEdit = new JMenuItem(); mnuShowConfig = new JMenuItem(); mnuGenCommandLine = new JMenuItem(); menuHelp = new JMenu(); mnuShowHelp = new JMenuItem(); mnuLicense = new JMenuItem(); mnuAbout = new JMenuItem(); toolBarParent = new JToolBar(); toolBar = new JToolBar(); btnNewConfig = new JButton(); btnOpenConfig = new JButton(); btnSaveConfig = new JButton(); btnConfigEdit = new JButton(); btnShowConf = new JButton(); btnGenCommandLine = new JButton(); btnCreateFileJndi = new JButton(); btnHelp = new JButton(); dialogPane = new JPanel(); buttonBar = new JPanel(); btnStart = new JButton(); btnStop = new JButton(); btnPauseScreen = new JToggleButton(); brnClearScreen = new JButton(); panelMemory = new JPanel(); lblMemory = new JLabel(); btnGc = new JButton(); panelMain = new JScrollPane(); panelOutput = new JPanel(); txtOutput = new JTextArea(); hSpacer = new JPanel(null); vSpacer1 = new JPanel(null); CellConstraints cc = new CellConstraints(); //======== this ======== setIconImage(//from ww w . j a v a2 s . co m new ImageIcon(getClass().getResource("/com/tibco/util/gui/resources/tibrv_ico.gif")).getImage()); setTitle("JmsStream"); setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); setFont(new Font("Dialog", Font.PLAIN, 12)); setForeground(Color.white); Container contentPane = getContentPane(); contentPane.setLayout(new FormLayout("default:grow", "fill:default, fill:default:grow")); //======== menuBar ======== { //======== menuFile ======== { menuFile.setText("File"); menuFile.setMnemonic('F'); //---- mnuNewConfig ---- mnuNewConfig.setText("New Configuration..."); mnuNewConfig.setMnemonic('C'); mnuNewConfig.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { mnuNewConfigActionPerformed(); } }); menuFile.add(mnuNewConfig); //---- mnuOpenConfig ---- mnuOpenConfig.setText("Open Configuration..."); mnuOpenConfig.setMnemonic('C'); mnuOpenConfig.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { mnuOpenConfigActionPerformed(); } }); menuFile.add(mnuOpenConfig); //---- mnuSaveConfigFile ---- mnuSaveConfigFile.setText("Save Configuration"); mnuSaveConfigFile.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, KeyEvent.CTRL_MASK)); mnuSaveConfigFile.setMnemonic('S'); mnuSaveConfigFile.setEnabled(false); mnuSaveConfigFile.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { mnuSaveConfigFileActionPerformed(); } }); menuFile.add(mnuSaveConfigFile); //---- mnuSaveConfigAs ---- mnuSaveConfigAs.setText("Save Configuration As..."); mnuSaveConfigAs.setMnemonic('A'); mnuSaveConfigAs.setEnabled(false); mnuSaveConfigAs.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { mnuSaveConfigAsActionPerformed(); } }); menuFile.add(mnuSaveConfigAs); menuFile.addSeparator(); //---- mnuExit ---- mnuExit.setText("Exit"); mnuExit.setMnemonic('E'); mnuExit.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { mnuExitActionPerformed(); } }); menuFile.add(mnuExit); } menuBar.add(menuFile); //======== menuTools ======== { menuTools.setText("Tools"); menuTools.setMnemonic('T'); //---- mnuConfiguration ---- mnuConfiguration.setText("Edit Configuration..."); mnuConfiguration.setMnemonic('E'); mnuConfiguration.setEnabled(false); mnuConfiguration.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { mnuConfigurationActionPerformed(); } }); menuTools.add(mnuConfiguration); menuTools.addSeparator(); //---- mnuCreateFileJndi ---- mnuCreateFileJndi.setText("Create a File Based JNDI..."); mnuCreateFileJndi.setMnemonic('C'); mnuCreateFileJndi.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { mnuCreateFileJndiActionPerformed(); } }); menuTools.add(mnuCreateFileJndi); //======== mnuMessages ======== { mnuMessages.setText("Messages"); mnuMessages.setSelectedIcon(null); mnuMessages.setMnemonic('M'); //---- mnuNewMessages ---- mnuNewMessages.setText("New Message File..."); mnuNewMessages.setMnemonic('N'); mnuNewMessages.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { mnuNewMessagesActionPerformed(); } }); mnuMessages.add(mnuNewMessages); //---- mnuOpenMessages ---- mnuOpenMessages.setText("Edit Message File..."); mnuOpenMessages.setMnemonic('E'); mnuOpenMessages.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { mnuOpenMessagesActionPerformed(); } }); mnuMessages.add(mnuOpenMessages); //---- mnuMsgEdit ---- mnuMsgEdit.setText("Edit Current Messages..."); mnuMsgEdit.setMnemonic('M'); mnuMsgEdit.setEnabled(false); mnuMsgEdit.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { mnuMsgEditActionPerformed(); } }); mnuMessages.add(mnuMsgEdit); } menuTools.add(mnuMessages); //---- mnuShowConfig ---- mnuShowConfig.setText("Show Configuration"); mnuShowConfig.setMnemonic('S'); mnuShowConfig.setEnabled(false); mnuShowConfig.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { mnuShowConfigActionPerformed(); } }); menuTools.add(mnuShowConfig); //---- mnuGenCommandLine ---- mnuGenCommandLine.setText("Display Command Line"); mnuGenCommandLine.setEnabled(false); mnuGenCommandLine.setMnemonic('D'); mnuGenCommandLine.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { mnuGenCommandLineActionPerformed(); } }); menuTools.add(mnuGenCommandLine); } menuBar.add(menuTools); //======== menuHelp ======== { menuHelp.setText("Help"); menuHelp.setMnemonic('H'); //---- mnuShowHelp ---- mnuShowHelp.setText("Help Topics..."); mnuShowHelp.setIcon( new ImageIcon(getClass().getResource("/com/tibco/util/gui/resources/menu-help.png"))); mnuShowHelp.setMnemonic('H'); mnuShowHelp.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { mnuShowHelpActionPerformed(); } }); menuHelp.add(mnuShowHelp); //---- mnuLicense ---- mnuLicense.setText("License..."); mnuLicense.setMnemonic('L'); mnuLicense.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { mnuLicenseActionPerformed(); } }); menuHelp.add(mnuLicense); menuHelp.addSeparator(); //---- mnuAbout ---- mnuAbout.setText("About"); mnuAbout.setMnemonic('A'); mnuAbout.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { mnuAboutActionPerformed(); } }); menuHelp.add(mnuAbout); } menuBar.add(menuHelp); } setJMenuBar(menuBar); //======== toolBarParent ======== { toolBarParent.setFloatable(false); toolBarParent.setBorderPainted(false); toolBarParent.setBorder(null); //======== toolBar ======== { toolBar.setForeground(SystemColor.control); //---- btnNewConfig ---- btnNewConfig.setToolTipText("New Configuration"); btnNewConfig.setIcon( new ImageIcon(getClass().getResource("/com/tibco/util/gui/resources/fileNew.png"))); btnNewConfig.setMargin(new Insets(2, 2, 1, 1)); btnNewConfig.setMaximumSize(new Dimension(25, 25)); btnNewConfig.setForeground(SystemColor.menu); btnNewConfig.setMinimumSize(new Dimension(25, 25)); btnNewConfig.setPreferredSize(new Dimension(25, 25)); btnNewConfig.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { btnNewConfigActionPerformed(); } }); toolBar.add(btnNewConfig); //---- btnOpenConfig ---- btnOpenConfig.setIcon( new ImageIcon(getClass().getResource("/com/tibco/util/gui/resources/fileOpen.png"))); btnOpenConfig.setToolTipText("Open Configuration"); btnOpenConfig.setMargin(new Insets(5, 2, 1, 1)); btnOpenConfig.setForeground(SystemColor.menu); btnOpenConfig.setMaximumSize(new Dimension(25, 25)); btnOpenConfig.setMinimumSize(new Dimension(25, 25)); btnOpenConfig.setPreferredSize(new Dimension(25, 25)); btnOpenConfig.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { btnOpenConfigActionPerformed(); } }); toolBar.add(btnOpenConfig); //---- btnSaveConfig ---- btnSaveConfig.setIcon( new ImageIcon(getClass().getResource("/com/tibco/util/gui/resources/fileSave2.png"))); btnSaveConfig.setToolTipText("Save Configuration"); btnSaveConfig.setMargin(new Insets(1, 2, 1, 1)); btnSaveConfig.setEnabled(false); btnSaveConfig.setMaximumSize(new Dimension(25, 25)); btnSaveConfig.setMinimumSize(new Dimension(25, 25)); btnSaveConfig.setPreferredSize(new Dimension(25, 25)); btnSaveConfig.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { btnConfigSaveActionPerformed(); } }); toolBar.add(btnSaveConfig); //---- btnConfigEdit ---- btnConfigEdit.setToolTipText("Edit Current Configuration"); btnConfigEdit.setIcon( new ImageIcon(getClass().getResource("/com/tibco/util/gui/resources/fileEdit.png"))); btnConfigEdit.setEnabled(false); btnConfigEdit.setMargin(new Insets(2, 2, 1, 1)); btnConfigEdit.setMaximumSize(new Dimension(25, 25)); btnConfigEdit.setMinimumSize(new Dimension(25, 25)); btnConfigEdit.setPreferredSize(new Dimension(25, 25)); btnConfigEdit.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { btnConfigEditActionPerformed(); } }); toolBar.add(btnConfigEdit); toolBar.addSeparator(); //---- btnShowConf ---- btnShowConf.setToolTipText("Display Configuration"); btnShowConf.setIcon( new ImageIcon(getClass().getResource("/com/tibco/util/gui/resources/information.png"))); btnShowConf.setEnabled(false); btnShowConf.setMargin(new Insets(2, 2, 1, 1)); btnShowConf.setMaximumSize(new Dimension(25, 25)); btnShowConf.setMinimumSize(new Dimension(25, 25)); btnShowConf.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { btnShowConfActionPerformed(); } }); toolBar.add(btnShowConf); //---- btnGenCommandLine ---- btnGenCommandLine.setIcon( new ImageIcon(getClass().getResource("/com/tibco/util/gui/resources/console.png"))); btnGenCommandLine.setMargin(new Insets(2, 2, 1, 1)); btnGenCommandLine.setEnabled(false); btnGenCommandLine.setToolTipText("Display Command Line Arguments"); btnGenCommandLine.setMaximumSize(new Dimension(25, 25)); btnGenCommandLine.setMinimumSize(new Dimension(25, 25)); btnGenCommandLine.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { btnGenCommandLineActionPerformed(); } }); toolBar.add(btnGenCommandLine); //---- btnCreateFileJndi ---- btnCreateFileJndi.setIcon( new ImageIcon(getClass().getResource("/com/tibco/util/gui/resources/jndiCreate.png"))); btnCreateFileJndi.setMargin(new Insets(2, 2, 1, 1)); btnCreateFileJndi.setMaximumSize(new Dimension(25, 25)); btnCreateFileJndi.setMinimumSize(new Dimension(25, 25)); btnCreateFileJndi.setToolTipText("Create File Based JNDI"); btnCreateFileJndi.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { btnCreateFileJndiActionPerformed(); } }); toolBar.add(btnCreateFileJndi); toolBar.addSeparator(); //---- btnHelp ---- btnHelp.setIcon( new ImageIcon(getClass().getResource("/com/tibco/util/gui/resources/menu-help.png"))); btnHelp.setMargin(new Insets(1, 2, 1, 1)); btnHelp.setToolTipText("Output JmsStream Help"); btnHelp.setMaximumSize(new Dimension(25, 25)); btnHelp.setMinimumSize(new Dimension(25, 25)); btnHelp.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { btnHelpActionPerformed(); } }); toolBar.add(btnHelp); } toolBarParent.add(toolBar); } contentPane.add(toolBarParent, cc.xy(1, 1)); //======== dialogPane ======== { dialogPane.setBorder(Borders.createEmptyBorder("1dlu, 4dlu, 4dlu, 4dlu")); dialogPane.setLayout(new FormLayout("default:grow", "fill:default:grow, fill:default")); //======== buttonBar ======== { buttonBar.setBorder(Borders.createEmptyBorder("5dlu, 1dlu, 1dlu, 1dlu")); buttonBar.setLayout(new FormLayout( "$button, $rgap, $button, $glue, [50dlu,default], $lcgap, $button, $rgap, default", "pref")); //---- btnStart ---- btnStart.setText("Start"); btnStart.setIcon(new ImageIcon(getClass().getResource("/com/tibco/util/gui/resources/start.png"))); btnStart.setEnabled(false); btnStart.setMaximumSize(new Dimension(80, 30)); btnStart.setMinimumSize(new Dimension(80, 30)); btnStart.setPreferredSize(new Dimension(80, 30)); btnStart.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { btnStartActionPerformed(); } }); buttonBar.add(btnStart, cc.xy(1, 1)); //---- btnStop ---- btnStop.setText("Stop"); btnStop.setEnabled(false); btnStop.setIcon(new ImageIcon(getClass().getResource("/com/tibco/util/gui/resources/stop.png"))); btnStop.setPreferredSize(new Dimension(80, 30)); btnStop.setMaximumSize(new Dimension(80, 30)); btnStop.setMinimumSize(new Dimension(80, 30)); btnStop.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { btnStopActionPerformed(); } }); buttonBar.add(btnStop, cc.xy(3, 1)); //---- btnPauseScreen ---- btnPauseScreen.setText("Pause Screen"); btnPauseScreen.setMaximumSize(new Dimension(260, 30)); btnPauseScreen.setMinimumSize(new Dimension(130, 30)); btnPauseScreen.setPreferredSize(new Dimension(130, 30)); btnPauseScreen .setIcon(new ImageIcon(getClass().getResource("/com/tibco/util/gui/resources/pause.png"))); btnPauseScreen.setToolTipText("Pause the JmsStream GUI display screen."); btnPauseScreen.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { btnPauseScreenItemStateChanged(e); } }); buttonBar.add(btnPauseScreen, cc.xy(5, 1)); //---- brnClearScreen ---- brnClearScreen.setMaximumSize(new Dimension(260, 30)); brnClearScreen.setMinimumSize(new Dimension(130, 30)); brnClearScreen.setPreferredSize(new Dimension(130, 30)); brnClearScreen.setText("Clear Screen"); brnClearScreen.setToolTipText("Clear the JmsStream GUI display screen."); brnClearScreen .setIcon(new ImageIcon(getClass().getResource("/com/tibco/util/gui/resources/clear.png"))); brnClearScreen.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { brnClearScreenActionPerformed(); } }); buttonBar.add(brnClearScreen, cc.xy(7, 1)); //======== panelMemory ======== { panelMemory.setBorder(new EtchedBorder(EtchedBorder.RAISED)); panelMemory.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT); panelMemory.setLayout(new BoxLayout(panelMemory, BoxLayout.X_AXIS)); //---- lblMemory ---- lblMemory.setText("100MB of 200MB"); lblMemory.setMaximumSize(new Dimension(90, 20)); lblMemory.setMinimumSize(new Dimension(90, 20)); lblMemory.setPreferredSize(new Dimension(90, 20)); lblMemory.setHorizontalAlignment(SwingConstants.TRAILING); lblMemory.setForeground(Color.darkGray); lblMemory.setRequestFocusEnabled(false); lblMemory.setAlignmentY(0.0F); lblMemory.setVerticalAlignment(SwingConstants.BOTTOM); panelMemory.add(lblMemory); //---- btnGc ---- btnGc.setMargin(new Insets(2, 2, 2, 2)); btnGc.setIcon(new ImageIcon(getClass().getResource("/com/tibco/util/gui/resources/gc.png"))); btnGc.setToolTipText("Run JVM Garbage Collector"); btnGc.setBorderPainted(false); btnGc.setOpaque(false); btnGc.setContentAreaFilled(false); btnGc.setFocusPainted(false); btnGc.setRolloverIcon( new ImageIcon(getClass().getResource("/com/tibco/util/gui/resources/gc_pushed.png"))); btnGc.setAlignmentY(0.0F); btnGc.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { btnGcActionPerformed(); } }); panelMemory.add(btnGc); } buttonBar.add(panelMemory, cc.xy(9, 1)); } dialogPane.add(buttonBar, cc.xy(1, 2, CellConstraints.FILL, CellConstraints.DEFAULT)); //======== panelMain ======== { panelMain.setBorder(new BevelBorder(BevelBorder.LOWERED)); panelMain.setViewportBorder(new BevelBorder(BevelBorder.RAISED)); panelMain.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); panelMain.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS); //======== panelOutput ======== { panelOutput .setLayout(new FormLayout("default:grow, default", "fill:default:grow, fill:default")); //---- txtOutput ---- txtOutput.setBackground(Color.black); txtOutput.setForeground(Color.lightGray); txtOutput.setBorder(new BevelBorder(BevelBorder.LOWERED)); txtOutput.setAutoscrolls(false); txtOutput.setDoubleBuffered(true); txtOutput.setCaretColor(Color.white); txtOutput.setFocusCycleRoot(true); txtOutput.setFont(new Font("Monospaced", Font.PLAIN, 12)); panelOutput.add(txtOutput, cc.xy(1, 1)); panelOutput.add(hSpacer, cc.xy(2, 1)); panelOutput.add(vSpacer1, cc.xy(1, 2)); } panelMain.setViewportView(panelOutput); } dialogPane.add(panelMain, cc.xy(1, 1, CellConstraints.FILL, CellConstraints.FILL)); } contentPane.add(dialogPane, cc.xy(1, 2, CellConstraints.FILL, CellConstraints.FILL)); setSize(990, 600); setLocationRelativeTo(null); // JFormDesigner - End of component initialization //GEN-END:initComponents // Now create a new TextAreaOutputStream to write to our JTextArea control and wrap a // PrintStream around it to support the println/printf methods. _taosTextArea = new TextAreaOutputStream(txtOutput); try { PrintStream psOut = new PrintStream(_taosTextArea, true, "UTF-8"); // Redirect standard output stream to the TextAreaOutputStream System.setOut(psOut); // Redirect standard error stream to the TextAreaOutputStream System.setErr(psOut); } catch (UnsupportedEncodingException uee) { uee.printStackTrace(); } // Set the Form Title this.setTitle(JmsStream.APP_NAME); }
From source file:cz.vity.freerapid.gui.dialogs.MultipleSettingsDialog.java
@SuppressWarnings({ "deprecation" }) private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner Open Source Project license - unknown //ResourceBundle bundle = ResourceBundle.getBundle("MultipleSettingsDialog"); JPanel dialogPane = new JPanel(); JPanel contentPanel = new JPanel(); JLabel iconLabel = new JLabel(); titleLabel = new JLabel(); JLabel labelSize = new JLabel(); fieldSize = new JTextField(); JLabel labelDescription = new JLabel(); JScrollPane scrollPane1 = new JScrollPane(); descriptionArea = ComponentFactory.getTextArea(); JPanel optionsPanel = new JPanel(); JLabel saveToLabel = new JLabel(); comboPath = new JComboBox(); btnSelectPath = new JButton(); JXButtonPanel buttonBar = new JXButtonPanel(); okButton = new JButton(); cancelButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== dialogPane ======== {//w ww. ja v a2 s.com dialogPane.setBorder(Borders.DIALOG); dialogPane.setLayout(new BorderLayout()); //======== contentPanel ======== { //---- iconLabel ---- iconLabel.setName("iconLabel"); //---- titleLabel ---- titleLabel.setName("titleLabel"); titleLabel.setFont(new Font("Tahoma", Font.BOLD, 12)); //---- labelSize ---- labelSize.setName("labelSize"); //---- fieldSize ---- fieldSize.setBorder(null); fieldSize.setOpaque(false); fieldSize.setEditable(false); //---- labelDescription ---- labelDescription.setName("labelDescription"); //======== scrollPane1 ======== { scrollPane1.setViewportView(descriptionArea); } //======== optionsPanel ======== { //---- saveToLabel ---- saveToLabel.setName("saveToLabel"); saveToLabel.setLabelFor(comboPath); //---- comboPath ---- comboPath.setEditable(true); //---- btnSelectPath ---- btnSelectPath.setName("btnSelectPath"); PanelBuilder optionsPanelBuilder = new PanelBuilder(new FormLayout( new ColumnSpec[] { FormSpecs.DEFAULT_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default")), optionsPanel); optionsPanelBuilder.add(saveToLabel, cc.xy(1, 1)); optionsPanelBuilder.add(comboPath, cc.xy(3, 1)); optionsPanelBuilder.add(btnSelectPath, cc.xy(5, 1)); } PanelBuilder contentPanelBuilder = new PanelBuilder(new FormLayout( new ColumnSpec[] { new ColumnSpec(Sizes.dluX(49)), FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, ColumnSpec.decode("max(min;70dlu)") }, new RowSpec[] { FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.TOP, Sizes.PREFERRED, FormSpec.NO_GROW), FormSpecs.RELATED_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.bounded(Sizes.PREFERRED, Sizes.dluY(40), Sizes.dluY(50)), FormSpec.DEFAULT_GROW), FormSpecs.LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC }), contentPanel); contentPanelBuilder.add(iconLabel, cc.xywh(1, 1, 1, 5, CellConstraints.DEFAULT, CellConstraints.FILL)); contentPanelBuilder.add(titleLabel, cc.xywh(3, 1, 5, 1)); contentPanelBuilder.add(labelSize, cc.xy(3, 3)); contentPanelBuilder.add(fieldSize, cc.xywh(5, 3, 3, 1)); contentPanelBuilder.add(labelDescription, cc.xy(1, 7)); contentPanelBuilder.add(scrollPane1, cc.xywh(1, 9, 7, 1)); contentPanelBuilder.add(optionsPanel, cc.xywh(1, 11, 7, 1)); } dialogPane.add(contentPanel, BorderLayout.CENTER); //======== buttonBar ======== { buttonBar.setBorder(new EmptyBorder(12, 0, 0, 0)); //---- okButton ---- okButton.setName("okButton"); //---- cancelButton ---- cancelButton.setName("cancelButton"); PanelBuilder buttonBarBuilder = new PanelBuilder(new FormLayout( new ColumnSpec[] { new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormSpecs.UNRELATED_GAP_COLSPEC, ColumnSpec.decode("max(pref;42dlu)"), FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("fill:pref")), buttonBar); ((FormLayout) buttonBar.getLayout()).setColumnGroups(new int[][] { { 3, 5 } }); buttonBarBuilder.add(okButton, cc.xy(3, 1)); buttonBarBuilder.add(cancelButton, cc.xy(5, 1)); } dialogPane.add(buttonBar, BorderLayout.SOUTH); } contentPane.add(dialogPane, BorderLayout.CENTER); }
From source file:de.dfki.km.text20.diagnosis.gui.panel.templates.ServerPanelTemplate.java
@SuppressWarnings("unqualified-field-access") private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license this.visualEyeTrackingDataPanel = new JPanel(); this.eyePositionDisplay = new EyePositionDisplay(); this.eyeDistanceDisplay = new EyeDistanceDisplay(); this.pupilSizeDisplay = new PupilSizeDisplay(); this.tabbedPane = new JTabbedPane(); this.overallPanel = new JPanel(); this.eyeTrackingDeviceNameLabel = new JLabel(); this.eyeTrackingDeviceNameValueLabel = new JLabel(); this.eyeTrackingDeviceTypeLabel = new JLabel(); this.eyeTrackingDeviceTypeValueLabel = new JLabel(); this.eyeTrackingDeviceLocationLabel = new JLabel(); this.eyeTrackingDeviceLocationValueLabel = new JLabel(); this.recordingTitle = new JLabel(); this.recordIndicator = new JStatusIndicator(); this.recordSwitch = new JXHyperlink(); this.eyeTrackingEventRateLabel = new JLabel(); this.eventRateIndicator = new JStatusIndicator(); this.eventRate = new JLabel(); this.brainTrackingDeviceNameLabel = new JLabel(); this.brainTrackingDeviceNameValueLabel = new JLabel(); this.brainTrackingDeviceLocationLabel = new JLabel(); this.brainTrackingDeviceLocationValueLabel = new JLabel(); this.brainTrackerRecordingStatusLabel = new JLabel(); this.brainRecordIndicator = new JStatusIndicator(); this.brainTrackingRecordSwitch = new JXHyperlink(); this.brainTrackingEventRateLabel = new JLabel(); this.brainTrackingEventRateIndicator = new JStatusIndicator(); this.brainTrackingEventRateValue = new JLabel(); this.deviceTrackingSinceLabel = new JLabel(); this.trackingSince = new JLabel(); this.brainHistoryLabel = new JLabel(); this.brainHistoryLink = new JXHyperlink(); this.gazePositionLabel = new JLabel(); this.gazePositionHistoryLink = new JXHyperlink(); this.headPositionLabel = new JLabel(); this.headPositionIndicator = new JStatusIndicator(); this.headPositionHistoryLink = new JXHyperlink(); this.headDistanceLabel = new JLabel(); this.headDistanceIndicator = new JStatusIndicator(); this.headDistanceHistoryLink = new JXHyperlink(); this.pupilSizeLabel = new JLabel(); this.pupilSizeHistoryLink = new JXHyperlink(); this.hardwareRecalibrationLabel = new JLabel(); this.performHardwareRecalibrationLink = new JXHyperlink(); this.localRecalibrationVerificationLabel = new JLabel(); this.calibrationIndicator = new JStatusIndicator(); this.performRecalibrationLink = new JXHyperlink(); this.qualityLabel = new JLabel(); this.overallQualityIndicator = new JStatusIndicator(); this.overallQualityLabel = new JLabel(); this.panel3 = new JPanel(); this.scrollPane4 = new JScrollPane(); this.logText = new JTextPane(); this.settingsPanel = new JPanel(); this.bufferSizeEyeTrackerHistoryLabel = new JLabel(); this.bufferSizeLabel = new JLabel(); this.bufferSizeSlider = new JSlider(); this.bufferSizeBrainTrackerHistoryLabel = new JLabel(); this.bufferSizeBrainTrackerHistoryValueLabel = new JLabel(); this.bufferSizeBrainTrackerHistorySlider = new JSlider(); this.transparentLocalRecalibrationLabel2 = new JLabel(); this.ministatus = new JCheckBox(); this.transparentLocalRecalibrationLabel = new JLabel(); this.transparentRecalibration = new JCheckBox(); this.ChannelPanel = new JPanel(); CellConstraints cc = new CellConstraints(); //======== this ======== setLayout(new FormLayout("default:grow", "min, $lgap, 0dlu, $lgap, fill:[200dlu,pref]:grow")); //======== visualEyeTrackingDataPanel ======== {//from w w w .j a va 2s . c o m this.visualEyeTrackingDataPanel.setBorder(new TitledBorder(null, "Visual Tracking Data", TitledBorder.CENTER, TitledBorder.DEFAULT_POSITION)); this.visualEyeTrackingDataPanel.setPreferredSize(new Dimension(506, 500)); this.visualEyeTrackingDataPanel.setOpaque(false); this.visualEyeTrackingDataPanel.setRequestFocusEnabled(false); this.visualEyeTrackingDataPanel.setVerifyInputWhenFocusTarget(false); this.visualEyeTrackingDataPanel.setAlignmentY(1.5F); this.visualEyeTrackingDataPanel .setLayout(new FormLayout("default:grow, 2*($lcgap, default)", "fill:150dlu")); ((FormLayout) this.visualEyeTrackingDataPanel.getLayout()).setColumnGroups(new int[][] { { 3, 5 } }); //---- eyePositionDisplay ---- this.eyePositionDisplay.setPreferredSize(new Dimension(300, 200)); this.eyePositionDisplay.setBorder(new EmptyBorder(5, 5, 5, 5)); this.eyePositionDisplay.setMinimumSize(new Dimension(1, 200)); this.eyePositionDisplay.setEyePostionCanvasBackgroundColor(Color.darkGray); this.visualEyeTrackingDataPanel.add(this.eyePositionDisplay, cc.xy(1, 1)); //---- eyeDistanceDisplay ---- this.eyeDistanceDisplay.setPreferredSize(new Dimension(50, 300)); this.eyeDistanceDisplay.setMinimumSize(new Dimension(1, 300)); this.eyeDistanceDisplay.setPaddingVal(4); this.eyeDistanceDisplay.setBackground(null); this.eyeDistanceDisplay.setForeground(Color.darkGray); this.eyeDistanceDisplay.setEyeDistanceCanvasColor(Color.darkGray); this.visualEyeTrackingDataPanel.add(this.eyeDistanceDisplay, new CellConstraints(3, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT, new Insets(5, 0, 5, 0))); //---- pupilSizeDisplay ---- this.pupilSizeDisplay.setPreferredSize(new Dimension(60, 300)); this.pupilSizeDisplay.setMinimumSize(new Dimension(1, 300)); this.pupilSizeDisplay.setPupilSizeCanvasBackgroundColor(Color.darkGray); this.visualEyeTrackingDataPanel.add(this.pupilSizeDisplay, new CellConstraints(5, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT, new Insets(5, 0, 5, 0))); } add(this.visualEyeTrackingDataPanel, cc.xywh(1, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //======== tabbedPane ======== { //======== overallPanel ======== { this.overallPanel.setLayout(new FormLayout("150dlu, $lcgap, default, 6dlu, default:grow", "default, $lgap, fill:default, 22*($lgap, default)")); ((FormLayout) this.overallPanel.getLayout()).setRowGroups(new int[][] { { 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 45, 47 } }); //---- eyeTrackingDeviceNameLabel ---- this.eyeTrackingDeviceNameLabel.setText("Eye Tracking Device Name"); this.overallPanel.add(this.eyeTrackingDeviceNameLabel, cc.xy(1, 1)); //---- eyeTrackingDeviceNameValueLabel ---- this.eyeTrackingDeviceNameValueLabel.setText("-"); this.overallPanel.add(this.eyeTrackingDeviceNameValueLabel, cc.xy(5, 1)); //---- eyeTrackingDeviceTypeLabel ---- this.eyeTrackingDeviceTypeLabel.setText("Eye Tracking Device Type"); this.overallPanel.add(this.eyeTrackingDeviceTypeLabel, cc.xy(1, 3)); //---- eyeTrackingDeviceTypeValueLabel ---- this.eyeTrackingDeviceTypeValueLabel.setText("-"); this.overallPanel.add(this.eyeTrackingDeviceTypeValueLabel, cc.xy(5, 3)); //---- eyeTrackingDeviceLocationLabel ---- this.eyeTrackingDeviceLocationLabel.setText("Eye Tracking Device Location"); this.overallPanel.add(this.eyeTrackingDeviceLocationLabel, cc.xy(1, 5)); //---- eyeTrackingDeviceLocationValueLabel ---- this.eyeTrackingDeviceLocationValueLabel.setText("-"); this.overallPanel.add(this.eyeTrackingDeviceLocationValueLabel, cc.xy(5, 5)); //---- recordingTitle ---- this.recordingTitle.setText("Eye Tracker Recording Status"); this.overallPanel.add(this.recordingTitle, cc.xy(1, 7)); this.overallPanel.add(this.recordIndicator, cc.xy(3, 7)); //---- recordSwitch ---- this.recordSwitch.setText("Off"); this.recordSwitch.setActionCommand("toggleRecording"); this.overallPanel.add(this.recordSwitch, cc.xy(5, 7)); //---- eyeTrackingEventRateLabel ---- this.eyeTrackingEventRateLabel.setText("Eye Tracker Event Rate [events per second]"); this.overallPanel.add(this.eyeTrackingEventRateLabel, cc.xy(1, 9)); this.overallPanel.add(this.eventRateIndicator, cc.xy(3, 9)); //---- eventRate ---- this.eventRate.setText("0"); this.overallPanel.add(this.eventRate, cc.xy(5, 9)); //---- brainTrackingDeviceNameLabel ---- this.brainTrackingDeviceNameLabel.setText("Brain Tracking Device Name"); this.overallPanel.add(this.brainTrackingDeviceNameLabel, cc.xy(1, 13)); //---- brainTrackingDeviceNameValueLabel ---- this.brainTrackingDeviceNameValueLabel.setText("-"); this.overallPanel.add(this.brainTrackingDeviceNameValueLabel, cc.xy(5, 13)); //---- brainTrackingDeviceLocationLabel ---- this.brainTrackingDeviceLocationLabel.setText("Brain Tracking Device Location"); this.overallPanel.add(this.brainTrackingDeviceLocationLabel, cc.xy(1, 15)); //---- brainTrackingDeviceLocationValueLabel ---- this.brainTrackingDeviceLocationValueLabel.setText("-"); this.overallPanel.add(this.brainTrackingDeviceLocationValueLabel, cc.xy(5, 15)); //---- brainTrackerRecordingStatusLabel ---- this.brainTrackerRecordingStatusLabel.setText("Brain Tracking Recording Status"); this.overallPanel.add(this.brainTrackerRecordingStatusLabel, cc.xy(1, 17)); this.overallPanel.add(this.brainRecordIndicator, cc.xy(3, 17)); //---- brainTrackingRecordSwitch ---- this.brainTrackingRecordSwitch.setText("Off"); this.brainTrackingRecordSwitch.setActionCommand("toggleBrainRecording"); this.overallPanel.add(this.brainTrackingRecordSwitch, cc.xy(5, 17)); //---- brainTrackingEventRateLabel ---- this.brainTrackingEventRateLabel.setText("Brain Tracker Event Rate [events per second]"); this.overallPanel.add(this.brainTrackingEventRateLabel, cc.xy(1, 19)); this.overallPanel.add(this.brainTrackingEventRateIndicator, cc.xy(3, 19)); //---- brainTrackingEventRateValue ---- this.brainTrackingEventRateValue.setText("0"); this.overallPanel.add(this.brainTrackingEventRateValue, cc.xy(5, 19)); //---- deviceTrackingSinceLabel ---- this.deviceTrackingSinceLabel.setText("Device Tracking Since"); this.overallPanel.add(this.deviceTrackingSinceLabel, cc.xy(1, 23)); //---- trackingSince ---- this.trackingSince.setText("Not tracking"); this.overallPanel.add(this.trackingSince, cc.xy(5, 23)); //---- brainHistoryLabel ---- this.brainHistoryLabel.setText("Brain History"); this.overallPanel.add(this.brainHistoryLabel, cc.xy(1, 27)); //---- brainHistoryLink ---- this.brainHistoryLink.setText("Show brain history ..."); this.brainHistoryLink.setActionCommand("openBrainHistory"); this.overallPanel.add(this.brainHistoryLink, cc.xy(5, 27)); //---- gazePositionLabel ---- this.gazePositionLabel.setText("Gaze Position [normalized]"); this.overallPanel.add(this.gazePositionLabel, cc.xy(1, 31)); //---- gazePositionHistoryLink ---- this.gazePositionHistoryLink.setText("Gaze position history ..."); this.gazePositionHistoryLink.setActionCommand("openGazePositionHistory"); this.overallPanel.add(this.gazePositionHistoryLink, cc.xy(5, 31)); //---- headPositionLabel ---- this.headPositionLabel.setText("Head Position [normalized]"); this.overallPanel.add(this.headPositionLabel, cc.xy(1, 33)); this.overallPanel.add(this.headPositionIndicator, cc.xy(3, 33)); //---- headPositionHistoryLink ---- this.headPositionHistoryLink.setText("Head position history ..."); this.headPositionHistoryLink.setActionCommand("openHeadPositionHistory"); this.overallPanel.add(this.headPositionHistoryLink, cc.xy(5, 33)); //---- headDistanceLabel ---- this.headDistanceLabel.setText("Head Distance [mm]"); this.overallPanel.add(this.headDistanceLabel, cc.xy(1, 35)); this.overallPanel.add(this.headDistanceIndicator, cc.xy(3, 35)); //---- headDistanceHistoryLink ---- this.headDistanceHistoryLink.setText("Head distance history ..."); this.headDistanceHistoryLink.setActionCommand("openHeadDistanceHistory"); this.overallPanel.add(this.headDistanceHistoryLink, cc.xy(5, 35)); //---- pupilSizeLabel ---- this.pupilSizeLabel.setText("Pupil Size [mm]"); this.overallPanel.add(this.pupilSizeLabel, cc.xy(1, 37)); //---- pupilSizeHistoryLink ---- this.pupilSizeHistoryLink.setText("Pupilsize history ..."); this.pupilSizeHistoryLink.setActionCommand("openPupilSizeHistory"); this.overallPanel.add(this.pupilSizeHistoryLink, cc.xy(5, 37)); //---- hardwareRecalibrationLabel ---- this.hardwareRecalibrationLabel.setText("Hardware Calibration"); this.overallPanel.add(this.hardwareRecalibrationLabel, cc.xy(1, 41)); //---- performHardwareRecalibrationLink ---- this.performHardwareRecalibrationLink.setText("Perfom hardware recalibration ..."); this.performHardwareRecalibrationLink.setActionCommand("performHardwareRecalibration"); this.overallPanel.add(this.performHardwareRecalibrationLink, cc.xy(5, 41)); //---- localRecalibrationVerificationLabel ---- this.localRecalibrationVerificationLabel.setText("Local Recalibration & Verficiation"); this.overallPanel.add(this.localRecalibrationVerificationLabel, cc.xy(1, 43)); this.overallPanel.add(this.calibrationIndicator, cc.xy(3, 43)); //---- performRecalibrationLink ---- this.performRecalibrationLink.setText("Perfom local recalibration ..."); this.performRecalibrationLink.setActionCommand("performRecalibration"); this.overallPanel.add(this.performRecalibrationLink, cc.xy(5, 43)); //---- qualityLabel ---- this.qualityLabel.setText("Overall Tracking Quality"); this.overallPanel.add(this.qualityLabel, cc.xy(1, 47)); this.overallPanel.add(this.overallQualityIndicator, cc.xy(3, 47)); //---- overallQualityLabel ---- this.overallQualityLabel.setText("Unknown"); this.overallPanel.add(this.overallQualityLabel, cc.xy(5, 47)); } this.tabbedPane.addTab("Overview", this.overallPanel); //======== panel3 ======== { this.panel3.setLayout(new FormLayout("default:grow", "fill:default:grow")); //======== scrollPane4 ======== { this.scrollPane4.setViewportView(this.logText); } this.panel3.add(this.scrollPane4, cc.xy(1, 1)); } this.tabbedPane.addTab("Message Log", this.panel3); //======== settingsPanel ======== { this.settingsPanel.setLayout( new FormLayout("150dlu, $lcgap, 50dlu, 6dlu, default:grow", "6*(default, $lgap), default")); ((FormLayout) this.settingsPanel.getLayout()).setRowGroups(new int[][] { { 1, 3, 5, 7, 9, 11 } }); //---- bufferSizeEyeTrackerHistoryLabel ---- this.bufferSizeEyeTrackerHistoryLabel.setText("Eye Tracker Buffer Time"); this.settingsPanel.add(this.bufferSizeEyeTrackerHistoryLabel, cc.xy(1, 1)); //---- bufferSizeLabel ---- this.bufferSizeLabel.setText("30s"); this.settingsPanel.add(this.bufferSizeLabel, cc.xywh(3, 1, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- bufferSizeSlider ---- this.bufferSizeSlider.setMinimum(5); this.bufferSizeSlider.setMaximum(120); this.bufferSizeSlider.setMajorTickSpacing(5); this.bufferSizeSlider.setSnapToTicks(true); this.bufferSizeSlider.setValue(30); this.settingsPanel.add(this.bufferSizeSlider, cc.xy(5, 1)); //---- bufferSizeBrainTrackerHistoryLabel ---- this.bufferSizeBrainTrackerHistoryLabel.setText("Brain Tracker Buffer Time"); this.settingsPanel.add(this.bufferSizeBrainTrackerHistoryLabel, cc.xy(1, 3)); //---- bufferSizeBrainTrackerHistoryValueLabel ---- this.bufferSizeBrainTrackerHistoryValueLabel.setText("5s"); this.settingsPanel.add(this.bufferSizeBrainTrackerHistoryValueLabel, cc.xywh(3, 3, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- bufferSizeBrainTrackerHistorySlider ---- this.bufferSizeBrainTrackerHistorySlider.setMaximum(30); this.bufferSizeBrainTrackerHistorySlider.setMinimum(5); this.bufferSizeBrainTrackerHistorySlider.setSnapToTicks(true); this.bufferSizeBrainTrackerHistorySlider.setMajorTickSpacing(1); this.bufferSizeBrainTrackerHistorySlider.setValue(5); this.settingsPanel.add(this.bufferSizeBrainTrackerHistorySlider, cc.xy(5, 3)); //---- transparentLocalRecalibrationLabel2 ---- this.transparentLocalRecalibrationLabel2.setText("Display Ministatus"); this.settingsPanel.add(this.transparentLocalRecalibrationLabel2, cc.xy(1, 7)); //---- ministatus ---- this.ministatus.setText("Ministatus"); this.settingsPanel.add(this.ministatus, cc.xy(5, 7)); //---- transparentLocalRecalibrationLabel ---- this.transparentLocalRecalibrationLabel.setText("Transparent Local Recalibration"); this.settingsPanel.add(this.transparentLocalRecalibrationLabel, cc.xy(1, 11)); //---- transparentRecalibration ---- this.transparentRecalibration.setText("Transparent"); this.settingsPanel.add(this.transparentRecalibration, cc.xy(5, 11)); } this.tabbedPane.addTab("Settings", this.settingsPanel); //======== ChannelPanel ======== { this.ChannelPanel.setLayout(new FormLayout("default:grow", "default")); } this.tabbedPane.addTab("Channels", this.ChannelPanel); } add(this.tabbedPane, cc.xy(1, 5)); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:de.dfki.km.text20.lightning.evaluator.plugins.coveragedetector.gui.CoverageDetectorConfig.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license dialogPane = new JPanel(); contentPanel = new JPanel(); labelLetterHeight = new JLabel(); spinnerLetterHeight = new JSpinner(); labelLineSize = new JLabel(); spinnerLineSize = new JSpinner(); labelSensitivity = new JLabel(); spinnerSensitivity = new JSpinner(); labelDebug = new JLabel(); checkBoxDebug = new JCheckBox(); buttonOK = new JButton(); buttonDefault = new JButton(); buttonCancel = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setTitle("Coverage Detector Config"); Container contentPane = getContentPane(); contentPane.setLayout(new FormLayout("default:grow", "default:grow")); //======== dialogPane ======== {//from w w w. j a v a2s. co m dialogPane.setBorder(Borders.DIALOG_BORDER); dialogPane.setLayout(new BorderLayout()); //======== contentPanel ======== { contentPanel.setLayout(new FormLayout("2*(60dlu:grow, $lcgap), 60dlu:grow", "4*(default, $lgap), bottom:default:grow")); //---- labelLetterHeight ---- labelLetterHeight.setText("min letter height in Pixel"); contentPanel.add(labelLetterHeight, cc.xywh(1, 1, 3, 1)); contentPanel.add(spinnerLetterHeight, cc.xy(5, 1)); //---- labelLineSize ---- labelLineSize.setText("max line size in Pixel"); contentPanel.add(labelLineSize, cc.xywh(1, 3, 3, 1)); contentPanel.add(spinnerLineSize, cc.xy(5, 3)); //---- labelSensitivity ---- labelSensitivity.setText("sensitivity"); contentPanel.add(labelSensitivity, cc.xywh(1, 5, 3, 1)); contentPanel.add(spinnerSensitivity, cc.xy(5, 5)); //---- labelDebug ---- labelDebug.setText("draw debug images"); contentPanel.add(labelDebug, cc.xywh(1, 7, 3, 1)); contentPanel.add(checkBoxDebug, cc.xy(5, 7)); //---- buttonOK ---- buttonOK.setText("OK"); contentPanel.add(buttonOK, cc.xy(1, 9)); //---- buttonDefault ---- buttonDefault.setText("Default"); contentPanel.add(buttonDefault, cc.xy(3, 9)); //---- buttonCancel ---- buttonCancel.setText("Cancel"); contentPanel.add(buttonCancel, cc.xy(5, 9)); } dialogPane.add(contentPanel, BorderLayout.CENTER); } contentPane.add(dialogPane, cc.xywh(1, 1, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); pack(); setLocationRelativeTo(getOwner()); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:de.dfki.km.text20.lightning.gui.ConfigWindow.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license mainFrame = new JFrame(); dialogPane = new JPanel(); contentPanel = new JPanel(); panel1 = new JPanel(); labelActionHotkey = new JLabel(); comboBoxActionHotkey = new JComboBox(); labelStatusHotkey = new JLabel(); comboBoxStatusHotkey = new JComboBox(); labelSound = new JLabel(); checkBoxSound = new JCheckBox(); labelDimension = new JLabel(); spinnerDimension = new JSpinner(); labelRecalibration = new JLabel(); checkBoxRecalibration = new JCheckBox(); buttonClearRecalibration = new JButton(); panel2 = new JPanel(); labelEnableMouseWarp = new JLabel(); checkBoxUseWarp = new JCheckBox(); labelWarpMethod = new JLabel(); comboBoxWarpMethod = new JComboBox(); buttonWarpConfig = new JButton(); panel3 = new JPanel(); labelEvaluation = new JLabel(); checkBoxEvaluation = new JCheckBox(); labelName = new JLabel(); textFieldName = new JTextField(); labelScreenBright = new JLabel(); comboBoxScreenBright = new JComboBox(); labelSettingBright = new JLabel(); comboBoxSettingBright = new JComboBox(); labelOutputPath = new JLabel(); buttonSelect = new JButton(); textFieldOutputPath = new JTextField(); panel4 = new JPanel(); labelDetector = new JLabel(); comboBoxDetector = new JComboBox(); buttonDetectorConfig = new JButton(); buttonSubmit = new JButton(); buttonDefault = new JButton(); buttonOK = new JButton(); buttonCancel = new JButton(); CellConstraints cc = new CellConstraints(); //======== mainFrame ======== {/* w w w . j a v a2 s .c om*/ mainFrame.setTitle("Project Lightning (Desktop)"); mainFrame.setResizable(false); Container mainFrameContentPane = mainFrame.getContentPane(); mainFrameContentPane.setLayout(new GridLayout()); //======== dialogPane ======== { dialogPane.setBorder(Borders.DIALOG_BORDER); dialogPane.setLayout(new BoxLayout(dialogPane, BoxLayout.X_AXIS)); //======== contentPanel ======== { contentPanel.setLayout(new FormLayout("3*(20dlu:grow, $lcgap), 20dlu:grow", "top:default, $lgap, top:48dlu, $lgap, default:grow, $lgap, default")); ((FormLayout) contentPanel.getLayout()).setColumnGroups(new int[][] { { 1, 3 }, { 5, 7 } }); //======== panel1 ======== { panel1.setBorder(new TitledBorder("General Options")); panel1.setLayout( new FormLayout("20dlu:grow, $lcgap, 20dlu:grow", "5*(default, $lgap), default")); //---- labelActionHotkey ---- labelActionHotkey.setText("Cursorwarp Key"); labelActionHotkey.setIcon(null); panel1.add(labelActionHotkey, cc.xywh(1, 1, 2, 1)); //---- comboBoxActionHotkey ---- comboBoxActionHotkey.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { comboBoxActionHotkeyActionPerformed(e); } }); panel1.add(comboBoxActionHotkey, cc.xy(3, 1)); //---- labelStatusHotkey ---- labelStatusHotkey.setText("Key to Enable & Disable"); panel1.add(labelStatusHotkey, cc.xywh(1, 3, 2, 1)); //---- comboBoxStatusHotkey ---- comboBoxStatusHotkey.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { comboBoxStatusHotkeyActionPerformed(e); } }); panel1.add(comboBoxStatusHotkey, cc.xy(3, 3)); //---- labelSound ---- labelSound.setText("Play Sounds"); panel1.add(labelSound, cc.xy(1, 5)); //---- checkBoxSound ---- checkBoxSound.setSelectedIcon(null); panel1.add(checkBoxSound, cc.xy(3, 5)); //---- labelDimension ---- labelDimension.setText("Pixels to Consider"); labelDimension.setIcon(null); panel1.add(labelDimension, cc.xywh(1, 7, 2, 1)); //---- spinnerDimension ---- spinnerDimension.setModel(new SpinnerNumberModel(0, 0, 999, 1)); panel1.add(spinnerDimension, cc.xy(3, 7)); //---- labelRecalibration ---- labelRecalibration.setText("Use Recalibration"); panel1.add(labelRecalibration, cc.xywh(1, 9, 1, 3)); panel1.add(checkBoxRecalibration, cc.xy(3, 9)); //---- buttonClearRecalibration ---- buttonClearRecalibration.setText("Clear Recalibration"); panel1.add(buttonClearRecalibration, cc.xy(3, 11)); } contentPanel.add(panel1, cc.xywh(1, 1, 3, 3, CellConstraints.FILL, CellConstraints.TOP)); //======== panel2 ======== { panel2.setBorder(new TitledBorder("Mouse Warping")); panel2.setLayout( new FormLayout("80dlu:grow, $lcgap, 80dlu:grow", "2*(default, $lgap), default")); //---- labelEnableMouseWarp ---- labelEnableMouseWarp.setText("Enable Mouse Warp"); panel2.add(labelEnableMouseWarp, cc.xywh(1, 1, 2, 1)); //---- checkBoxUseWarp ---- checkBoxUseWarp.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { checkBoxUseWarpActionPerformed(e); } }); panel2.add(checkBoxUseWarp, cc.xy(3, 1)); //---- labelWarpMethod ---- labelWarpMethod.setText("Warp Method"); panel2.add(labelWarpMethod, cc.xywh(1, 3, 2, 3)); panel2.add(comboBoxWarpMethod, cc.xy(3, 3)); //---- buttonWarpConfig ---- buttonWarpConfig.setText("Configuration"); panel2.add(buttonWarpConfig, cc.xy(3, 5)); } contentPanel.add(panel2, cc.xywh(5, 1, 3, 1, CellConstraints.FILL, CellConstraints.TOP)); //======== panel3 ======== { panel3.setBorder(new TitledBorder("Evaluation ")); panel3.setLayout( new FormLayout("80dlu:grow, $lcgap, 80dlu:grow", "5*(default, $lgap), default")); //---- labelEvaluation ---- labelEvaluation.setText("Evaluation Mode"); panel3.add(labelEvaluation, cc.xywh(1, 1, 2, 1)); //---- checkBoxEvaluation ---- checkBoxEvaluation.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { checkBoxTrainingActionPerformed(e); } }); panel3.add(checkBoxEvaluation, cc.xy(3, 1)); //---- labelName ---- labelName.setText("Username"); panel3.add(labelName, cc.xywh(1, 3, 2, 1)); panel3.add(textFieldName, cc.xy(3, 3)); //---- labelScreenBright ---- labelScreenBright.setText("Screen Brightness"); panel3.add(labelScreenBright, cc.xywh(1, 5, 2, 1)); panel3.add(comboBoxScreenBright, cc.xy(3, 5)); //---- labelSettingBright ---- labelSettingBright.setText("Setting Brightness"); panel3.add(labelSettingBright, cc.xywh(1, 7, 2, 1)); panel3.add(comboBoxSettingBright, cc.xy(3, 7)); //---- labelOutputPath ---- labelOutputPath.setText("Output Path"); panel3.add(labelOutputPath, cc.xywh(1, 9, 1, 3)); //---- buttonSelect ---- buttonSelect.setText("Select"); panel3.add(buttonSelect, cc.xy(3, 9)); panel3.add(textFieldOutputPath, cc.xy(3, 11)); } contentPanel.add(panel3, cc.xywh(5, 3, 3, 3, CellConstraints.FILL, CellConstraints.FILL)); //======== panel4 ======== { panel4.setBorder(new TitledBorder("Cursor Warping")); panel4.setLayout( new FormLayout("20dlu:grow, $lcgap, 20dlu:grow", "default, $lgap, default")); //---- labelDetector ---- labelDetector.setText("Text Detector / Warping"); panel4.add(labelDetector, cc.xywh(1, 1, 2, 3)); //---- comboBoxDetector ---- comboBoxDetector.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { comboBoxSearchMethodActionPerformed(e); } }); panel4.add(comboBoxDetector, cc.xy(3, 1)); //---- buttonDetectorConfig ---- buttonDetectorConfig.setText("Configuration"); panel4.add(buttonDetectorConfig, cc.xy(3, 3)); } contentPanel.add(panel4, cc.xywh(1, 5, 3, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- buttonSubmit ---- buttonSubmit.setText("Submit"); buttonSubmit.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { buttonSubmitActionPerformed(e); } }); contentPanel.add(buttonSubmit, cc.xy(1, 7)); //---- buttonDefault ---- buttonDefault.setText("Default"); buttonDefault.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { buttonDefaultActionPerformed(e); } }); contentPanel.add(buttonDefault, cc.xy(3, 7)); //---- buttonOK ---- buttonOK.setText("OK"); buttonOK.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { buttonOKActionPerformed(e); } }); contentPanel.add(buttonOK, cc.xywh(5, 7, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- buttonCancel ---- buttonCancel.setText("Cancel"); buttonCancel.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { buttonCancelActionPerformed(e); } }); contentPanel.add(buttonCancel, cc.xy(7, 7)); } dialogPane.add(contentPanel); } mainFrameContentPane.add(dialogPane); mainFrame.setSize(570, 370); mainFrame.setLocationRelativeTo(mainFrame.getOwner()); } // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:de.dfki.km.text20.lightning.plugins.saliency.textdetector.gui.TextDetectorConfig.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license dialogPane = new JPanel(); contentPanel = new JPanel(); labelThreshold = new JLabel(); spinnerThreshold = new JSpinner(); labelLetterHeight = new JLabel(); spinnerLetterHeight = new JSpinner(); labelLineSize = new JLabel(); spinnerLineSize = new JSpinner(); labelSensitivity = new JLabel(); spinnerSensitivity = new JSpinner(); labelDebug = new JLabel(); checkBoxDebug = new JCheckBox(); buttonOK = new JButton(); buttonDefault = new JButton(); buttonCancel = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setTitle("Text Detector Config"); Container contentPane = getContentPane(); contentPane.setLayout(new FormLayout("default:grow", "default:grow")); //======== dialogPane ======== {//from w w w . j a va2 s. c o m dialogPane.setBorder(Borders.DIALOG_BORDER); dialogPane.setLayout(new BorderLayout()); //======== contentPanel ======== { contentPanel.setLayout(new FormLayout("2*(60dlu:grow, $lcgap), 60dlu:grow", "5*(default, $lgap), bottom:default:grow")); //---- labelThreshold ---- labelThreshold.setText("text coverage threshold"); contentPanel.add(labelThreshold, cc.xywh(1, 1, 3, 1)); contentPanel.add(spinnerThreshold, cc.xy(5, 1)); //---- labelLetterHeight ---- labelLetterHeight.setText("min letter height in Pixel"); contentPanel.add(labelLetterHeight, cc.xywh(1, 3, 3, 1)); contentPanel.add(spinnerLetterHeight, cc.xy(5, 3)); //---- labelLineSize ---- labelLineSize.setText("max line size in Pixel"); contentPanel.add(labelLineSize, cc.xywh(1, 5, 3, 1)); contentPanel.add(spinnerLineSize, cc.xy(5, 5)); //---- labelSensitivity ---- labelSensitivity.setText("sensitivity"); contentPanel.add(labelSensitivity, cc.xywh(1, 7, 3, 1)); contentPanel.add(spinnerSensitivity, cc.xy(5, 7)); //---- labelDebug ---- labelDebug.setText("draw debug images"); contentPanel.add(labelDebug, cc.xywh(1, 9, 3, 1)); contentPanel.add(checkBoxDebug, cc.xy(5, 9)); //---- buttonOK ---- buttonOK.setText("OK"); contentPanel.add(buttonOK, cc.xy(1, 11)); //---- buttonDefault ---- buttonDefault.setText("Default"); contentPanel.add(buttonDefault, cc.xy(3, 11)); //---- buttonCancel ---- buttonCancel.setText("Cancel"); contentPanel.add(buttonCancel, cc.xy(5, 11)); } dialogPane.add(contentPanel, BorderLayout.CENTER); } contentPane.add(dialogPane, cc.xywh(1, 1, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); pack(); setLocationRelativeTo(getOwner()); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:de.luschny.apps.factorial.BenchmarkForm.java
License:Open Source License
@SuppressWarnings("unchecked") private void initComponents() { checkBoxArray = new JCheckBox[21]; JMenuBar menuBar = new JMenuBar(); JMenu benchMenu = new JMenu(); recommededMenu = new JMenuItem(); JMenuItem parallelMenu = new JMenuItem(); primeMenu = new JMenuItem(); simpleMenu = new JMenuItem(); JMenuItem lameMenu = new JMenuItem(); JMenu ectMenu = new JMenu(); sanityMenu = new JMenuItem(); JMenuItem aboutMenu = new JMenuItem(); JLabel algoLabel = new JLabel(); logToFileCheckBox = new JCheckBox(); showValueCheckBox = new JCheckBox(); verboseCheckBox = new JCheckBox(); JLabel startLabel = new JLabel(); startField = new JTextField(); JLabel stepLabel = new JLabel(); stepBox = new JComboBox(); cancelButton = new JButton(); JLabel lenghtLabel = new JLabel(); lenghtSpinner = new JSpinner(); benchmarkButton = new JButton(); JPanel algoSelection = new JPanel(); JScrollPane scrollPane = new JScrollPane(); textArea = new JTextArea(); infoLabel = new JLabel(); progressBar = new JProgressBar(); CellConstraints cc = new CellConstraints(); // ======== benchForm ======== setTitle("Factorial Algorithm Benchmark"); setFont(new Font("Verdana", Font.BOLD, 16)); Container benchFormContentPane = getContentPane(); benchFormContentPane.setLayout(new FormLayout( "6dlu, $lcgap, 4dlu, $lcgap, 82dlu, 10dlu, 6dlu, center:46dlu, $lcgap, 42dlu, $lcgap, 18dlu, $lcgap, center:58dlu, 6dlu, left:12dlu", "2dlu, $lgap, default, $lgap, top:176dlu, $lgap, default, $lgap, 16dlu, $lgap, 18dlu, $lgap, 16dlu, $lgap, 18dlu, $lgap, 4dlu")); ((FormLayout) benchFormContentPane.getLayout()).setRowGroups(new int[][] { { 9, 11, 13 } }); JCheckBox checkBox = new JCheckBox(); Font font = benchMenu.getFont().deriveFont(benchMenu.getFont().getStyle() | Font.BOLD, benchMenu.getFont().getSize() - 1f); Font labelFont = algoLabel.getFont().deriveFont(algoLabel.getFont().getStyle() | Font.BOLD, algoLabel.getFont().getSize() - 1f); Font checkFont = checkBox.getFont().deriveFont(checkBox.getFont().getStyle() | Font.BOLD, checkBox.getFont().getSize() - 1f); Font buttonFont = cancelButton.getFont().deriveFont(cancelButton.getFont().getStyle() | Font.BOLD); // ======== benchMenu ======== benchMenu.setText("Benchmark"); benchMenu.setFont(font);/*from w w w . ja v a 2s . co m*/ // ---- recommendedMenu ---- recommededMenu.setText("Recommended"); recommededMenu.setFont(font); recommededMenu.addActionListener((ActionEvent e) -> toptenMenuActionPerformed(e)); benchMenu.add(recommededMenu); // ---- primeMenu ---- primeMenu.setText("Prime"); primeMenu.setFont(font); primeMenu.addActionListener((ActionEvent e) -> primeMenuActionPerformed(e)); benchMenu.add(primeMenu); // ---- parallelMenu ---- parallelMenu.setText("Parallel"); parallelMenu.setFont(font); parallelMenu.addActionListener((ActionEvent e) -> parallelMenuActionPerformed(e)); benchMenu.add(parallelMenu); // ---- simpleMenu ---- simpleMenu.setText("Simple"); simpleMenu.setFont(font); simpleMenu.addActionListener((ActionEvent e) -> simpleMenuActionPerformed(e)); benchMenu.add(simpleMenu); // ---- lameMenu ---- lameMenu.setText("Lame"); lameMenu.setFont(font); lameMenu.addActionListener((ActionEvent e) -> lameMenuActionPerformed(e)); benchMenu.add(lameMenu); menuBar.add(benchMenu); // ======== ectMenu ======== ectMenu.setText("Ecetera"); ectMenu.setFont(font); // ---- sanityMenu ---- sanityMenu.setText("Sanity Check"); sanityMenu.setFont(font); sanityMenu.addActionListener((ActionEvent e) -> sanityMenuActionPerformed(e)); ectMenu.add(sanityMenu); ectMenu.addSeparator(); // ---- aboutMenu ---- aboutMenu.setText("About"); aboutMenu.setFont(font); aboutMenu.addActionListener((ActionEvent e) -> aboutMenuActionPerformed(e)); ectMenu.add(aboutMenu); menuBar.add(ectMenu); setJMenuBar(menuBar); // ---- algoLabel ---- algoLabel.setText("Algorithm"); algoLabel.setFont(labelFont); benchFormContentPane.add(algoLabel, new CellConstraints(5, 3, 1, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT, new Insets(0, 12, 0, 0))); // ---- logToFileCheckBox ---- logToFileCheckBox.setText("Log To File"); logToFileCheckBox.setFont(checkFont); benchFormContentPane.add(logToFileCheckBox, new CellConstraints(8, 3, 3, 1, CellConstraints.LEFT, CellConstraints.DEFAULT, new Insets(0, 8, 0, 0))); // ---- showValueCheckBox ---- showValueCheckBox.setText("Show Value"); showValueCheckBox.setFont(checkFont); benchFormContentPane.add(showValueCheckBox, cc.xywh(10, 3, 3, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); // ---- verboseCheckBox ---- verboseCheckBox.setText("Verbose"); verboseCheckBox.setFont(checkFont); benchFormContentPane.add(verboseCheckBox, new CellConstraints(14, 3, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT, new Insets(0, 4, 0, 0))); // ---- startLabel ---- startLabel.setText("Start"); startLabel.setFont(labelFont); benchFormContentPane.add(startLabel, cc.xywh(8, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); // ---- startField ---- startField.setToolTipText("Enter start value of n"); startField.setText("8000"); benchFormContentPane.add(startField, cc.xy(10, 9)); // ---- stepLabel ---- stepLabel.setText("Stepfactor"); stepLabel.setFont(labelFont); benchFormContentPane.add(stepLabel, cc.xywh(8, 11, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); // ---- stepBox ---- stepBox.setEditable(true); DefaultComboBoxModel dcbm = new DefaultComboBoxModel(new String[] { "1.5", "2.0", "2.5", "3.0" }); stepBox.setModel(dcbm); stepBox.setSelectedIndex(1); benchFormContentPane.add(stepBox, cc.xy(10, 11)); // ---- cancelButton ---- cancelButton.setText("Cancel"); cancelButton.setEnabled(false); cancelButton.setBackground(SystemColor.activeCaption); cancelButton.setForeground(SystemColor.window); cancelButton.setFont(buttonFont); cancelButton.addActionListener((ActionEvent e) -> cancelButtonActionPerformed(e)); benchFormContentPane.add(cancelButton, cc.xywh(14, 11, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); // ---- lenghtLabel ---- lenghtLabel.setText("Length"); lenghtLabel.setFont(labelFont); benchFormContentPane.add(lenghtLabel, cc.xywh(8, 13, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); // ---- lenghtSpinner ---- lenghtSpinner.setModel(new SpinnerListModel(new String[] { "1", "2", "3", "4", "5", "6", "7", "8", "9" })); benchFormContentPane.add(lenghtSpinner, cc.xy(10, 13)); // ---- benchmarkButton ---- benchmarkButton.setText("Benchmark!"); benchmarkButton.setFont(buttonFont); benchmarkButton.addActionListener((ActionEvent e) -> benchmarkButtonActionPerformed(e)); benchFormContentPane.add(benchmarkButton, cc.xywh(14, 13, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); // ======== AlgoSelection ======== algoSelection.setPreferredSize(new Dimension(47, 550)); algoSelection.setBackground(SystemColor.window); algoSelection.setLayout(new FormLayout("left:default:grow", "21*(fill:default)")); for (int i = 0; i < checkBoxArray.length; i++) { checkBox = new JCheckBox(); checkBox.setText(FactorialTest.getNames()[i]); checkBox.setBackground(SystemColor.window); checkBox.setMargin(new Insets(3, 4, 1, 0)); algoSelection.add(checkBox, cc.xy(1, i + 1)); checkBox.setFont(checkFont); checkBoxArray[i] = checkBox; } benchFormContentPane.add(algoSelection, cc.xywh(3, 5, 3, 9)); // ---- textArea ---- textArea.setLineWrap(true); textArea.setEditable(false); textArea.setDisabledTextColor(SystemColor.windowText); textArea.setBackground(SystemColor.window); textArea.setFont(new Font("Courier New", Font.PLAIN, 12)); // ======== scrollPane ======== scrollPane.setViewportView(textArea); benchFormContentPane.add(scrollPane, cc.xywh(7, 5, 9, 3)); // ---- infoLabel ---- infoLabel.setText("(c) 2008 Peter Luschny"); infoLabel.setFont(labelFont); benchFormContentPane.add(infoLabel, cc.xywh(3, 15, 3, 1)); benchFormContentPane.add(progressBar, cc.xywh(7, 15, 9, 1)); pack(); setLocationRelativeTo(getOwner()); }