List of usage examples for java.awt.event KeyEvent VK_Q
int VK_Q
To view the source code for java.awt.event KeyEvent VK_Q.
Click Source Link
From source file:org.pf.midea.MainUI.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents menuMain = new JMenuBar(); menuFile = new JMenu(); menuItemQuit = new JMenuItem(); menuTools = new JMenu(); menuConstellations = new JMenu(); menuItemASK = new JMenuItem(); menuItemFSK = new JMenuItem(); menuItemBPSK = new JMenuItem(); menuItemQPSK = new JMenuItem(); menuItem8PSK = new JMenuItem(); menuItem16PSK = new JMenuItem(); menuItem32PSK = new JMenuItem(); menuItem16QAM = new JMenuItem(); menuItem32QAM = new JMenuItem(); menuItem64QAM = new JMenuItem(); menuItem256QAM = new JMenuItem(); menuHelp = new JMenu(); menuItemAbout = new JMenuItem(); labelSource = new JLabel(); SourceCell[] sourceCells = { new SourceCell(PlanStates.SourceType.ST_TEST), new SourceCell(PlanStates.SourceType.ST_RANDOM) }; chooserSource = new JComboBox(sourceCells); chooserSource.setRenderer(new SourceCellRenderer()); buttonAddToPlan = new JButton(); panelPlan = new JPanel(); scrollPane1 = new JScrollPane(); listPlan = new JList(); labelCode = new JLabel(); CodeCell[] codeCells = { new CodeCell(PlanStates.CodeType.CT_NONE), new CodeCell(PlanStates.CodeType.CT_HAMMING74), new CodeCell(PlanStates.CodeType.CT_CYCLIC), new CodeCell(PlanStates.CodeType.CT_BCH155) }; chooserCode = new JComboBox(codeCells); chooserCode.setRenderer(new CodeCellRenderer()); labelModulation = new JLabel(); ModulationCell[] modulationCells = { new ModulationCell(PlanStates.ModulationType.MT_ASK), new ModulationCell(PlanStates.ModulationType.MT_FSK), new ModulationCell(PlanStates.ModulationType.MT_BPSK), new ModulationCell(PlanStates.ModulationType.MT_QPSK), new ModulationCell(PlanStates.ModulationType.MT_8PSK), new ModulationCell(PlanStates.ModulationType.MT_16PSK), new ModulationCell(PlanStates.ModulationType.MT_32PSK), new ModulationCell(PlanStates.ModulationType.MT_16QAM), new ModulationCell(PlanStates.ModulationType.MT_32QAM), new ModulationCell(PlanStates.ModulationType.MT_64QAM), new ModulationCell(PlanStates.ModulationType.MT_256QAM) }; chooserModulation = new JComboBox(modulationCells); chooserModulation.setRenderer(new ModulationCellRenderer()); labelChannel = new JLabel(); ChannelCell[] channelCells = { new ChannelCell(PlanStates.ChannelType.CHT_AWGN), new ChannelCell(PlanStates.ChannelType.CHT_RAYLEIGH) }; chooserChannel = new JComboBox(channelCells); chooserChannel.setRenderer(new ChannelCellRenderer()); buttonClearPlan = new JButton(); labelErrors = new JLabel(); ErrorsCell[] errorCells = { new ErrorsCell(PlanStates.ErrorsType.ET_SER), new ErrorsCell(PlanStates.ErrorsType.ET_BER) }; chooserErrors = new JComboBox(errorCells); chooserErrors.setRenderer(new ErrorsCellRenderer()); labelLineWidth = new JLabel(); spinnerLineWidth = new JSpinner(); buttonRemoveFromPlan = new JButton(); labelLineColor = new JLabel(); ColorCell[] colorCells = { new ColorCell(null), new ColorCell(Color.black), new ColorCell(Color.red), new ColorCell(Color.green), new ColorCell(Color.blue) }; chooserLineColor = new JComboBox(colorCells); chooserLineColor.setRenderer(new ColorCellRenderer()); labelHSquare = new JLabel(); spinnerHSquareLow = new JSpinner(); labelEllipsis = new JLabel(); spinnerHSquareHigh = new JSpinner(); panelInner1 = new JPanel(); labelHSquareStep = new JLabel(); spinnerHSquareStep = new JSpinner(); labelMeasurementUnit = new JLabel(); radioButtonMeasurementUnitTimes = new JRadioButton(); radioButtonMeasurementUnitdB = new JRadioButton(); buttonRunSimulation = new JButton(); labelIterations = new JLabel(); spinnerIterations = new JSpinner(); checkBoxShowLineNumbers = new JCheckBox(); tabbedPaneResults = new JTabbedPane(); panelChart = new JPanel(); panelNumeric = new JPanel(); scrollPane2 = new JScrollPane(); textAreaNumeric = new JTextArea(); progressBar = new JProgressBar(); //======== this ======== setLayout(new FormLayout("3*(default, $lcgap), 36dlu, $lcgap, 122dlu:grow", "[21px,default], 9*($lgap, default), $lgap, default:grow, $lgap, default")); //======== menuMain ======== {/* w ww . j a v a 2s . c om*/ //======== menuFile ======== { menuFile.setText("\u0424\u0430\u0439\u043b"); //---- menuItemQuit ---- menuItemQuit.setText("\u0412\u0438\u0439\u0442\u0438"); menuItemQuit.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q, KeyEvent.CTRL_MASK)); menuItemQuit.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { menuItemQuitActionPerformed(e); } }); menuFile.add(menuItemQuit); } menuMain.add(menuFile); //======== menuTools ======== { menuTools.setText("\u0406\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438"); //======== menuConstellations ======== { menuConstellations.setText( "\u0421\u0438\u0433\u043d\u0430\u043b\u044c\u043d\u0456 \u0441\u0443\u0437\u0456\u0440\u2019\u044f"); //---- menuItemASK ---- menuItemASK.setText("\u0410\u041c\u043d\u2026"); menuItemASK.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { menuItemASKActionPerformed(e); } }); menuConstellations.add(menuItemASK); //---- menuItemFSK ---- menuItemFSK.setText("\u0427\u041c\u043d\u2026"); menuItemFSK.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { menuItemFSKActionPerformed(e); } }); menuConstellations.add(menuItemFSK); //---- menuItemBPSK ---- menuItemBPSK.setText("\u0424\u041c\u043d\u2026"); menuItemBPSK.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { menuItemBPSKActionPerformed(e); } }); menuConstellations.add(menuItemBPSK); //---- menuItemQPSK ---- menuItemQPSK.setText("\u0424\u041c-4\u2026"); menuItemQPSK.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { menuItemQPSKActionPerformed(e); } }); menuConstellations.add(menuItemQPSK); //---- menuItem8PSK ---- menuItem8PSK.setText("\u0424\u041c-8\u2026"); menuItem8PSK.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { menuItem8PSKActionPerformed(e); } }); menuConstellations.add(menuItem8PSK); //---- menuItem16PSK ---- menuItem16PSK.setText("\u0424\u041c-16\u2026"); menuItem16PSK.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { menuItem16PSKActionPerformed(e); } }); menuConstellations.add(menuItem16PSK); //---- menuItem32PSK ---- menuItem32PSK.setText("\u0424\u041c-32\u2026"); menuItem32PSK.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { menuItem32PSKActionPerformed(e); } }); menuConstellations.add(menuItem32PSK); //---- menuItem16QAM ---- menuItem16QAM.setText("\u041a\u0410\u041c-16\u2026"); menuItem16QAM.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { menuItem16QAMActionPerformed(e); } }); menuConstellations.add(menuItem16QAM); //---- menuItem32QAM ---- menuItem32QAM.setText("\u041a\u0410\u041c-32\u2026"); menuItem32QAM.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { menuItem32QAMActionPerformed(e); } }); menuConstellations.add(menuItem32QAM); //---- menuItem64QAM ---- menuItem64QAM.setText("\u041a\u0410\u041c-64\u2026"); menuItem64QAM.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { menuItem64QAMActionPerformed(e); } }); menuConstellations.add(menuItem64QAM); //---- menuItem256QAM ---- menuItem256QAM.setText("\u041a\u0410\u041c-256\u2026"); menuItem256QAM.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { menuItem256QAMActionPerformed(e); } }); menuConstellations.add(menuItem256QAM); } menuTools.add(menuConstellations); } menuMain.add(menuTools); //======== menuHelp ======== { menuHelp.setText("\u0414\u043e\u0432\u0456\u0434\u043a\u0430"); //---- menuItemAbout ---- menuItemAbout.setText("\u041f\u0440\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u0443\u2026"); menuItemAbout.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { menuItemAboutActionPerformed(e); } }); menuHelp.add(menuItemAbout); } menuMain.add(menuHelp); } add(menuMain, CC.xywh(1, 1, 9, 1, CC.FILL, CC.FILL)); //---- labelSource ---- labelSource.setText("\u0414\u0436\u0435\u0440\u0435\u043b\u043e:"); add(labelSource, CC.xy(1, 3)); add(chooserSource, CC.xy(3, 3)); //---- buttonAddToPlan ---- buttonAddToPlan.setText("\u2192"); buttonAddToPlan.setToolTipText( "\u0414\u043e\u0434\u0430\u0442\u0438 \u0434\u043e \u043f\u043b\u0430\u043d\u0443 \u0435\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0443"); buttonAddToPlan.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { buttonAddToPlanActionPerformed(e); } }); add(buttonAddToPlan, CC.xywh(5, 3, 1, 5)); //======== panelPlan ======== { panelPlan.setLayout(new GridLayout()); //======== scrollPane1 ======== { scrollPane1.setViewportView(listPlan); } panelPlan.add(scrollPane1); } add(panelPlan, CC.xywh(7, 3, 3, 13)); //---- labelCode ---- labelCode.setText("\u041a\u043e\u0434:"); add(labelCode, CC.xy(1, 5)); add(chooserCode, CC.xy(3, 5)); //---- labelModulation ---- labelModulation.setText("\u041c\u043e\u0434\u0443\u043b\u044f\u0446\u0456\u044f:"); add(labelModulation, CC.xy(1, 7)); add(chooserModulation, CC.xy(3, 7)); //---- labelChannel ---- labelChannel.setText("\u041a\u0430\u043d\u0430\u043b:"); add(labelChannel, CC.xy(1, 9)); add(chooserChannel, CC.xy(3, 9)); //---- buttonClearPlan ---- buttonClearPlan.setText("X"); buttonClearPlan.setToolTipText( "\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u0438 \u043f\u043b\u0430\u043d \u0435\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0443"); buttonClearPlan.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { buttonClearPlanActionPerformed(e); } }); add(buttonClearPlan, CC.xy(5, 9)); //---- labelErrors ---- labelErrors.setText("\u041f\u043e\u043c\u0438\u043b\u043a\u0438:"); add(labelErrors, CC.xy(1, 11)); add(chooserErrors, CC.xy(3, 11)); //---- labelLineWidth ---- labelLineWidth.setText("\u0422\u043e\u0432\u0449\u0438\u043d\u0430 \u043b\u0456\u043d\u0456\u0457:"); add(labelLineWidth, CC.xy(1, 13)); //---- spinnerLineWidth ---- spinnerLineWidth.setModel(new SpinnerNumberModel(2, 1, 5, 1)); add(spinnerLineWidth, CC.xy(3, 13)); //---- buttonRemoveFromPlan ---- buttonRemoveFromPlan.setText("\u2190"); buttonRemoveFromPlan.setToolTipText( "\u0412\u0438\u0434\u0430\u043b\u0438\u0442\u0438 \u0437 \u043f\u043b\u0430\u043d\u0443 \u0435\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0443"); buttonRemoveFromPlan.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { buttonRemoveFromPlanActionPerformed(e); } }); add(buttonRemoveFromPlan, CC.xywh(5, 11, 1, 5)); //---- labelLineColor ---- labelLineColor.setText("\u041a\u043e\u043b\u0456\u0440 \u043b\u0456\u043d\u0456\u0457:"); add(labelLineColor, CC.xy(1, 15)); add(chooserLineColor, CC.xy(3, 15)); //---- labelHSquare ---- labelHSquare.setText("h\u00b2="); add(labelHSquare, CC.xy(1, 17)); //---- spinnerHSquareLow ---- spinnerHSquareLow.setModel(new SpinnerNumberModel(0.0, null, null, 1.0)); add(spinnerHSquareLow, CC.xy(3, 17)); //---- labelEllipsis ---- labelEllipsis.setText("\u2026"); add(labelEllipsis, CC.xy(5, 17, CC.CENTER, CC.DEFAULT)); //---- spinnerHSquareHigh ---- spinnerHSquareHigh.setModel(new SpinnerNumberModel(15.0, null, null, 1.0)); add(spinnerHSquareHigh, CC.xy(7, 17)); //======== panelInner1 ======== { panelInner1.setLayout(new FormLayout("5*(default, $lcgap), default:grow", "default")); //---- labelHSquareStep ---- labelHSquareStep.setText(", \u043a\u0440\u043e\u043a:"); panelInner1.add(labelHSquareStep, CC.xy(1, 1)); //---- spinnerHSquareStep ---- spinnerHSquareStep.setModel(new SpinnerNumberModel(0.5, 0.001, null, 0.1)); panelInner1.add(spinnerHSquareStep, CC.xy(3, 1)); //---- labelMeasurementUnit ---- labelMeasurementUnit.setText(", \u043e\u0434\u0438\u043d\u0438\u0446\u0456:"); panelInner1.add(labelMeasurementUnit, CC.xy(5, 1)); //---- radioButtonMeasurementUnitTimes ---- radioButtonMeasurementUnitTimes.setText("\u0440\u0430\u0437\u0438"); radioButtonMeasurementUnitTimes.setSelected(true); panelInner1.add(radioButtonMeasurementUnitTimes, CC.xy(7, 1, CC.LEFT, CC.DEFAULT)); //---- radioButtonMeasurementUnitdB ---- radioButtonMeasurementUnitdB.setText("\u0434\u0411"); panelInner1.add(radioButtonMeasurementUnitdB, CC.xy(9, 1, CC.LEFT, CC.DEFAULT)); //---- buttonRunSimulation ---- buttonRunSimulation.setText("\u0412\u0438\u043a\u043e\u043d\u0430\u0442\u0438"); buttonRunSimulation.setToolTipText( "\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u044e\u0432\u0430\u043d\u043d\u044f"); buttonRunSimulation.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { buttonRunSimulationActionPerformed(e); } }); panelInner1.add(buttonRunSimulation, CC.xy(11, 1, CC.RIGHT, CC.DEFAULT)); } add(panelInner1, CC.xy(9, 17)); //---- labelIterations ---- labelIterations.setText("\u0406\u0442\u0435\u0440\u0430\u0446\u0456\u0439:"); add(labelIterations, CC.xy(1, 19)); //---- spinnerIterations ---- spinnerIterations.setModel(new SpinnerNumberModel(200000, 1, null, 50000)); add(spinnerIterations, CC.xy(3, 19)); //---- checkBoxShowLineNumbers ---- checkBoxShowLineNumbers.setText( "\u041d\u0443\u043c\u0435\u0440\u0443\u0432\u0430\u0442\u0438 \u0433\u0440\u0430\u0444\u0456\u043a\u0438"); add(checkBoxShowLineNumbers, CC.xywh(7, 19, 3, 1)); //======== tabbedPaneResults ======== { //======== panelChart ======== { panelChart.setLayout(new BoxLayout(panelChart, BoxLayout.X_AXIS)); } tabbedPaneResults.addTab("\u0413\u0440\u0430\u0444\u0456\u043a\u0438", panelChart); //======== panelNumeric ======== { panelNumeric.setLayout(new FormLayout("default:grow", "default:grow")); //======== scrollPane2 ======== { //---- textAreaNumeric ---- textAreaNumeric.setCursor(Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR)); textAreaNumeric.setEditable(false); scrollPane2.setViewportView(textAreaNumeric); } panelNumeric.add(scrollPane2, CC.xy(1, 1, CC.DEFAULT, CC.FILL)); } tabbedPaneResults.addTab("\u0427\u0438\u0441\u043b\u043e\u0432\u0456 \u0434\u0430\u043d\u0456", panelNumeric); } add(tabbedPaneResults, CC.xywh(1, 21, 9, 1, CC.DEFAULT, CC.FILL)); add(progressBar, CC.xywh(1, 23, 9, 1)); //---- buttonGroupMeasurementUnit ---- ButtonGroup buttonGroupMeasurementUnit = new ButtonGroup(); buttonGroupMeasurementUnit.add(radioButtonMeasurementUnitTimes); buttonGroupMeasurementUnit.add(radioButtonMeasurementUnitdB); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:org.photovault.swingui.BrowserWindow.java
protected void createUI(PhotoCollection collection) { window.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); tabPane = new JTabbedPane(); queryPane = new QueryPane(); PhotoFolderTreeController treeCtrl = new PhotoFolderTreeController(window, this); viewCtrl = new PhotoViewController(window, this); treePane = treeCtrl.folderTree;/*www . jav a 2 s . c o m*/ viewPane = viewCtrl.getThumbPane(); previewPane = viewCtrl.getPreviewPane(); tabPane.addTab("Query", queryPane); tabPane.addTab("Folders", treePane); VolumeTreeController volTreeCtrl = new VolumeTreeController(this); JTree volumeTree = volTreeCtrl.getView(); JScrollPane voltreeScrollPane = new JScrollPane(volumeTree); voltreeScrollPane.setPreferredSize(new Dimension(200, 500)); tabPane.add("Volumes", voltreeScrollPane); // TODO: get rid of this!!!! EditSelectionColorsAction colorAction = (EditSelectionColorsAction) viewPane.getEditSelectionColorsAction(); colorAction.setPreviewCtrl(previewPane); // Set listeners to both query and folder tree panes /* If an actionEvent comes from query pane, swich to query results. */ queryPane.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { viewCtrl.setCollection(queryPane.getResultCollection()); } }); /* If the selected folder is changed in treePane, switch to that immediately */ treeCtrl.registerEventListener(PhotoFolderTreeEvent.class, new DefaultEventListener<PhotoCollection>() { public void handleEvent(DefaultEvent<PhotoCollection> event) { PhotoCollection c = event.getPayload(); if (c != null) { viewCtrl.setCollection(c); if (c instanceof PhotoFolder) { PhotoFolder f = (PhotoFolder) c; if (f.getExternalDir() != null) { ExternalDir ed = f.getExternalDir(); folderIndexer.updateDir(ed.getVolume(), ed.getPath()); viewCtrl.setIndexingOngoing(true); } } } } }); volTreeCtrl.registerEventListener(PhotoFolderTreeEvent.class, new DefaultEventListener<PhotoCollection>() { public void handleEvent(DefaultEvent<PhotoCollection> event) { PhotoCollection c = event.getPayload(); if (c != null) { viewCtrl.setCollection(c); if (c instanceof ExtDirPhotos) { ExtDirPhotos photos = (ExtDirPhotos) c; ExternalVolume vol = (ExternalVolume) viewCtrl.getDAOFactory().getVolumeDAO() .getVolume(photos.getVolId()); folderIndexer.updateDir(vol, photos.getDirPath()); viewCtrl.setIndexingOngoing(true); } } } }); collectionPane = viewCtrl.getCollectionPane(); JSplitPane split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, tabPane, collectionPane); split.putClientProperty(JSplitPane.ONE_TOUCH_EXPANDABLE_PROPERTY, new Boolean(true)); Container cp = window.getContentPane(); cp.setLayout(new BorderLayout()); cp.add(split, BorderLayout.CENTER); statusBar = new StatusBar(); cp.add(statusBar, BorderLayout.SOUTH); // Create actions for BrowserWindow UI ImageIcon indexDirIcon = getIcon("index_dir.png"); DefaultAction indexDirAction = new DefaultAction("Index directory...", indexDirIcon) { public void actionPerformed(ActionEvent e) { indexDir(); } }; indexDirAction.putValue(AbstractAction.MNEMONIC_KEY, KeyEvent.VK_D); indexDirAction.putValue(AbstractAction.SHORT_DESCRIPTION, "Index all images in a directory"); this.registerAction("new_ext_vol", indexDirAction); ImageIcon importIcon = getIcon("import.png"); importAction = new AbstractAction("Import image...", importIcon) { public void actionPerformed(ActionEvent e) { importFile(); } }; importAction.putValue(AbstractAction.MNEMONIC_KEY, KeyEvent.VK_O); importAction.putValue(AbstractAction.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_O, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask())); importAction.putValue(AbstractAction.SHORT_DESCRIPTION, "Import new image into database"); ImageIcon updateIcon = getIcon("update_indexed_dirs.png"); UpdateIndexAction updateIndexAction = new UpdateIndexAction(viewCtrl, "Update indexed dirs", updateIcon, "Check for changes in previously indexed directories", KeyEvent.VK_U); this.registerAction("update_indexed_dirs", updateIndexAction); updateIndexAction.addStatusChangeListener(statusBar); ImageIcon previewTopIcon = getIcon("view_preview_top.png"); DefaultAction previewTopAction = new DefaultAction("Preview on top", previewTopIcon) { public void actionPerformed(ActionEvent e) { viewCtrl.setLayout(PhotoViewController.Layout.PREVIEW_HORIZONTAL_THUMBS); } }; previewTopAction.putValue(AbstractAction.SHORT_DESCRIPTION, "Show preview on top of thumbnails"); previewTopAction.putValue(AbstractAction.MNEMONIC_KEY, KeyEvent.VK_T); this.registerAction("view_preview_top", previewTopAction); ImageIcon previewRightIcon = getIcon("view_preview_right.png"); DefaultAction previewRightAction = new DefaultAction("Preview on right", previewRightIcon) { public void actionPerformed(ActionEvent e) { viewCtrl.setLayout(PhotoViewController.Layout.PREVIEW_VERTICAL_THUMBS); } }; previewRightAction.putValue(AbstractAction.SHORT_DESCRIPTION, "Show preview on right of thumbnails"); previewRightAction.putValue(AbstractAction.MNEMONIC_KEY, KeyEvent.VK_R); this.registerAction("view_preview_right", previewRightAction); ImageIcon previewNoneIcon = getIcon("view_no_preview.png"); DefaultAction previewNoneAction = new DefaultAction("No preview", previewNoneIcon) { public void actionPerformed(ActionEvent e) { viewCtrl.setLayout(PhotoViewController.Layout.ONLY_THUMBS); } }; previewNoneAction.putValue(AbstractAction.SHORT_DESCRIPTION, "Show no preview image"); previewNoneAction.putValue(AbstractAction.MNEMONIC_KEY, KeyEvent.VK_O); this.registerAction("view_no_preview", previewNoneAction); DefaultAction previewLargeAction = new DefaultAction("Large", null) { public void actionPerformed(ActionEvent e) { viewCtrl.setPreviewSize(200); } }; DefaultAction previewSmallAction = new DefaultAction("Small", null) { public void actionPerformed(ActionEvent e) { viewCtrl.setPreviewSize(100); } }; JToolBar tb = createToolbar(); cp.add(tb, BorderLayout.NORTH); // Create the menu bar & menus JMenuBar menuBar = new JMenuBar(); window.setJMenuBar(menuBar); // File menu JMenu fileMenu = new JMenu("File"); fileMenu.setMnemonic(KeyEvent.VK_F); menuBar.add(fileMenu); JMenuItem newWindowItem = new JMenuItem("New window", KeyEvent.VK_N); newWindowItem.setIcon(getIcon("window_new.png")); newWindowItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { BrowserWindow br = new BrowserWindow(getParentController(), null); // br.setVisible( true ); } }); fileMenu.add(newWindowItem); JMenuItem importItem = new JMenuItem(importAction); fileMenu.add(importItem); JMenuItem indexDirItem = new JMenuItem(indexDirAction); fileMenu.add(indexDirItem); fileMenu.add(new JMenuItem(viewCtrl.getActionAdapter("update_indexed_dirs"))); ExportSelectedAction exportAction = (ExportSelectedAction) viewPane.getExportSelectedAction(); JMenuItem exportItem = new JMenuItem(exportAction); exportAction.addStatusChangeListener(statusBar); fileMenu.add(exportItem); JMenu dbMenu = new JMenu("Database"); dbMenu.setMnemonic(KeyEvent.VK_B); dbMenu.setIcon(getIcon("empty_icon.png")); ExportMetadataAction exportMetadata = new ExportMetadataAction("Export as XML...", null, "Export whole database as XML file", KeyEvent.VK_E); dbMenu.add(new JMenuItem(exportMetadata)); ImportXMLAction importMetadata = new ImportXMLAction("Import XML data...", null, "Import data from other Photovault database as XML", KeyEvent.VK_I); importMetadata.addStatusChangeListener(statusBar); dbMenu.add(new JMenuItem(importMetadata)); fileMenu.add(dbMenu); JMenuItem exitItem = new JMenuItem("Exit", KeyEvent.VK_X); exitItem.setIcon(getIcon("exit.png")); exitItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { System.exit(0); } }); fileMenu.add(exitItem); JMenu viewMenu = new JMenu("View"); viewMenu.setMnemonic(KeyEvent.VK_V); menuBar.add(viewMenu); JMenuItem vertIconsItem = new JMenuItem(previewRightAction); viewMenu.add(vertIconsItem); JMenuItem horzIconsItem = new JMenuItem(previewTopAction); viewMenu.add(horzIconsItem); JMenuItem noPreviewItem = new JMenuItem(previewNoneAction); viewMenu.add(noPreviewItem); JMenuItem nextPhotoItem = new JMenuItem(viewPane.getSelectNextAction()); viewMenu.add(nextPhotoItem); JMenuItem prevPhotoItem = new JMenuItem(viewPane.getSelectPreviousAction()); viewMenu.add(prevPhotoItem); viewMenu.add(new JMenuItem(previewSmallAction)); viewMenu.add(new JMenuItem(previewLargeAction)); JMenu sortMenu = new JMenu("Sort by"); sortMenu.setMnemonic(KeyEvent.VK_S); sortMenu.setIcon(getIcon("empty_icon.png")); JMenuItem byDateItem = new JMenuItem(new SetPhotoOrderAction(viewCtrl, new ShootingDateComparator(), "Date", null, "Order photos by date", KeyEvent.VK_D)); sortMenu.add(byDateItem); JMenuItem byPlaceItem = new JMenuItem(new SetPhotoOrderAction(viewCtrl, new ShootingPlaceComparator(), "Place", null, "Order photos by shooting place", KeyEvent.VK_P)); sortMenu.add(byPlaceItem); JMenuItem byQualityItem = new JMenuItem(new SetPhotoOrderAction(viewCtrl, new QualityComparator(), "Quality", null, "Order photos by quality", KeyEvent.VK_Q)); sortMenu.add(byQualityItem); viewMenu.add(sortMenu); // Set default ordering by date byDateItem.getAction().actionPerformed(new ActionEvent(this, 0, "Setting default")); JMenu imageMenu = new JMenu("Image"); imageMenu.setMnemonic(KeyEvent.VK_I); menuBar.add(imageMenu); imageMenu.add(new JMenuItem(viewPane.getEditSelectionPropsAction())); imageMenu.add(new JMenuItem(viewPane.getShowSelectedPhotoAction())); imageMenu.add(new JMenuItem(viewCtrl.getActionAdapter("rotate_cw"))); imageMenu.add(new JMenuItem(viewCtrl.getActionAdapter("rotate_ccw"))); imageMenu.add(new JMenuItem(viewCtrl.getActionAdapter("rotate_180"))); imageMenu.add(new JMenuItem(previewPane.getCropAction())); imageMenu.add(new JMenuItem(viewPane.getEditSelectionColorsAction())); imageMenu.add(new JMenuItem(viewPane.getDeleteSelectedAction())); // Create the Quality submenu JMenu qualityMenu = new JMenu("Quality"); qualityMenu.setIcon(getIcon("empty_icon.png")); for (int n = 0; n < 6; n++) { Action qualityAction = viewCtrl.getActionAdapter("quality_" + n); JMenuItem qualityMenuItem = new JMenuItem(qualityAction); qualityMenu.add(qualityMenuItem); } imageMenu.add(qualityMenu); JMenu aboutMenu = new JMenu("About"); aboutMenu.setMnemonic(KeyEvent.VK_A); aboutMenu.add(new JMenuItem(new ShowAboutDlgAction("About Photovault...", null, "", null))); menuBar.add(Box.createHorizontalGlue()); menuBar.add(aboutMenu); window.pack(); window.setVisible(true); }
From source file:Utilities.java
private static boolean usableKeyOnMac(int key, int mask) { //All permutations fail for Q except ctrl if (key == KeyEvent.VK_Q) { return false; }/*from ww w .ja va 2 s .co m*/ boolean isMeta = ((mask & KeyEvent.META_MASK) != 0) || ((mask & KeyEvent.CTRL_DOWN_MASK) != 0); boolean isAlt = ((mask & KeyEvent.ALT_MASK) != 0) || ((mask & KeyEvent.ALT_DOWN_MASK) != 0); boolean isOnlyMeta = isMeta && ((mask & ~(KeyEvent.META_DOWN_MASK | KeyEvent.META_MASK)) == 0); //Mac OS consumes keys Command+ these keys - the app will never see //them, so CTRL should not be remapped for these if (isOnlyMeta) { return (key != KeyEvent.VK_H) && (key != KeyEvent.VK_SPACE) && (key != KeyEvent.VK_TAB); } else return !((key == KeyEvent.VK_D) && isMeta && isAlt); }
From source file:com.intuit.tank.proxy.ProxyApp.java
@SuppressWarnings("serial") public JMenuBar createMenu() { JMenuBar ret = new JMenuBar(); JMenu fileMenu = new JMenu("File"); JMenu sessionMenu = new JMenu("Session"); ret.add(fileMenu);/*from www.j a v a 2 s . c om*/ ret.add(sessionMenu); fileMenu.add(getMenuItem(openAction)); fileMenu.add(getMenuItem(saveAction)); fileMenu.addSeparator(); fileMenu.add(getMenuItem(filterAction)); fileMenu.add(getMenuItem(settingsAction)); fileMenu.addSeparator(); AbstractAction quitAction = new AbstractAction("Quit") { public void actionPerformed(ActionEvent arg0) { System.exit(0); } }; quitAction.putValue(javax.swing.Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_Q, keyMask)); quitAction.putValue(javax.swing.Action.MNEMONIC_KEY, KeyEvent.VK_Q); fileMenu.add(new JMenuItem(quitAction)); sessionMenu.add(getMenuItem(startAction)); sessionMenu.add(getMenuItem(stopAction)); sessionMenu.add(getMenuItem(pauseAction)); sessionMenu.addSeparator(); sessionMenu.add(getMenuItem(showHostsAction)); return ret; }
From source file:com.pingtel.sipviewer.SIPViewerFrame.java
protected void initMenu() { JMenu menu;// w w w. j a v a 2s . c om JMenu submenu; JMenuItem menuItem; JRadioButtonMenuItem rbMenuItem; // Create the menu bar. JMenuBar menuBar = new JMenuBar(); this.setJMenuBar(menuBar); // Build the File menu. menu = new JMenu("File"); menu.setMnemonic(KeyEvent.VK_F); menuBar.add(menu); // Add the load-file items to the File menu. menuItem = new JMenuItem(); menuItem.setAction(new icOpenFileAction()); menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F, ActionEvent.ALT_MASK)); menuItem.setMnemonic(KeyEvent.VK_F); menu.add(menuItem); menuItem = new JMenuItem(); menuItem.setAction(new icImportSyslogAction()); menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Y, ActionEvent.ALT_MASK)); menuItem.setMnemonic(KeyEvent.VK_Y); menu.add(menuItem); menu.addSeparator(); menuItem = new JMenuItem(); menuItem.setAction(new icSaveAsAction()); menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, ActionEvent.ALT_MASK)); menuItem.setMnemonic(KeyEvent.VK_S); menu.add(menuItem); menu.addSeparator(); // Add the reload item to the File menu. menuItem = new JMenuItem(); menuItem.setAction(new icReloadAction()); menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_R, ActionEvent.ALT_MASK)); menuItem.setMnemonic(KeyEvent.VK_R); menu.add(menuItem); menu.addSeparator(); // Add the quit item to the File menu. menuItem = new JMenuItem(); menuItem.setAction(new icQuitAction()); menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q, ActionEvent.ALT_MASK)); menuItem.setMnemonic(KeyEvent.VK_Q); menu.add(menuItem); // Build the Options menu. menu = new JMenu("Options"); menu.setMnemonic(KeyEvent.VK_O); menuBar.add(menu); // Add the split/single screen mode to the options menu menuItem = new JMenuItem(); menuItem.setAction(new icScreenModeAction()); menuItem.setMnemonic(KeyEvent.VK_M); menu.add(menuItem); menu.addSeparator(); // Add the show all dialogs option to the options menu menuItem = new JMenuItem(); menuItem.setAction(new icShowAllDialogsAction()); menuItem.setMnemonic(KeyEvent.VK_D); menu.add(menuItem); menu.addSeparator(); // Add the Time Zone Selection Time submenu submenu = new JMenu("Time Zone Setting"); submenu.setMnemonic(KeyEvent.VK_Z); ButtonGroup timeZoneGroup = new ButtonGroup(); // Set Time Zone to Local Time Zone m_localTimeZone = new JRadioButtonMenuItem(); m_localTimeZone.setAction(new icSetTimeToLocalZone()); m_localTimeZone.setMnemonic(KeyEvent.VK_L); timeZoneGroup.add(m_localTimeZone); m_localTimeZone.setSelected(true); submenu.add(m_localTimeZone); // Set Time Zone to UTC Time Zone m_utcTimeZone = new JRadioButtonMenuItem(); m_utcTimeZone.setAction(new icSetTimeToUTCZone()); m_utcTimeZone.setMnemonic(KeyEvent.VK_U); timeZoneGroup.add(m_utcTimeZone); submenu.add(m_utcTimeZone); menu.add(submenu); // Add the show/hide time index column menuItem = new JMenuItem(); menuItem.setAction(new icTimeVisibilityAction()); menuItem.setMnemonic(KeyEvent.VK_V); menu.add(menuItem); // Add the Time Display Format submenu submenu = new JMenu("Time Display Format"); submenu.setMnemonic(KeyEvent.VK_T); ButtonGroup group = new ButtonGroup(); m_dateAndTimeFormat = new JRadioButtonMenuItem(); m_dateAndTimeFormat.setAction(new icDateAndTimeAction()); m_dateAndTimeFormat.setMnemonic(KeyEvent.VK_I); group.add(m_dateAndTimeFormat); submenu.add(m_dateAndTimeFormat); m_defaultTimeFormat = new JRadioButtonMenuItem(); m_defaultTimeFormat.setAction(new icTimeOfDay()); m_defaultTimeFormat.setMnemonic(KeyEvent.VK_E); m_defaultTimeFormat.setSelected(true); group.add(m_defaultTimeFormat); submenu.add(m_defaultTimeFormat); m_sincePreviousFormat = new JRadioButtonMenuItem(); m_sincePreviousFormat.setAction(new icSincePrevious()); m_sincePreviousFormat.setMnemonic(KeyEvent.VK_P); group.add(m_sincePreviousFormat); submenu.add(m_sincePreviousFormat); m_sinceBeginningFormat = new JRadioButtonMenuItem(); m_sinceBeginningFormat.setAction(new icSinceBeginning()); m_sinceBeginningFormat.setMnemonic(KeyEvent.VK_B); group.add(m_sinceBeginningFormat); submenu.add(m_sinceBeginningFormat); m_sinceKeyIndexFormat = new JRadioButtonMenuItem(); m_sinceKeyIndexFormat.setAction(new icSinceKeyIndex()); m_sinceKeyIndexFormat.setMnemonic(KeyEvent.VK_K); group.add(m_sinceKeyIndexFormat); submenu.add(m_sinceKeyIndexFormat); menu.add(submenu); // Build the Help menu. menu = new JMenu("Help"); menu.setMnemonic(KeyEvent.VK_H); menuBar.add(menu); // Add the items to the File menu. menuItem = new JMenuItem(); menuItem.setAction(new icAboutAction()); menu.add(menuItem); }
From source file:util.ui.UiUtilities.java
/** * Registers the escape key as close key for a component. * * @param component//from w ww.jav a 2 s. c o m * The component to close on pressing escape key. */ public static void registerForClosing(final WindowClosingIf component) { Action a = new AbstractAction() { private static final long serialVersionUID = 1L; public void actionPerformed(ActionEvent e) { component.close(); } }; if (OperatingSystem.isMacOs()) { // Add MacOS Apple+W for Closing of Dialogs KeyStroke stroke = KeyStroke.getKeyStroke(KeyEvent.VK_W, InputEvent.META_DOWN_MASK); component.getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(stroke, "CLOSE_ON_APPLE_W"); component.getRootPane().getActionMap().put("CLOSE_ON_APPLE_W", a); stroke = KeyStroke.getKeyStroke(KeyEvent.VK_Q, InputEvent.META_DOWN_MASK); component.getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(stroke, "CLOSE_COMPLETE_ON_APPLE"); component.getRootPane().getActionMap().put("CLOSE_COMPLETE_ON_APPLE", new AbstractAction() { public void actionPerformed(ActionEvent e) { MainFrame.getInstance().quit(); } }); } KeyStroke stroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0); component.getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(stroke, "CLOSE_ON_ESCAPE"); component.getRootPane().getActionMap().put("CLOSE_ON_ESCAPE", a); }
From source file:oct.analysis.application.OCTAnalysisUI.java
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor.// ww w . j a v a 2 s .c o m */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { bindingGroup = new org.jdesktop.beansbinding.BindingGroup(); lrpButtonGroup = new javax.swing.ButtonGroup(); analysisToolBarBtnGroup = new javax.swing.ButtonGroup(); toolsToolBarBtnGroup = new javax.swing.ButtonGroup(); lrpSelectionWidthBean = new oct.analysis.application.dat.LRPSelectionWidthBean(); resizeOCTSelectionMouseMonitor = new oct.analysis.application.comp.ResizeOCTSelectionMouseMonitor(); octAnalysisPanel = new oct.analysis.application.OCTImagePanel(); filterPanel = new javax.swing.JPanel(); filtersToolbar = new javax.swing.JToolBar(); jPanel1 = new javax.swing.JPanel(); lrpSmoothingPanel = new javax.swing.JPanel(); lrpSmoothingSlider = new javax.swing.JSlider(); octSmoothingPanel = new javax.swing.JPanel(); octSmoothingSlider = new javax.swing.JSlider(); sharpRadiusPanel = new javax.swing.JPanel(); octSharpRadiusSlider = new javax.swing.JSlider(); octSharpWeightPanel = new javax.swing.JPanel(); octSharpWeightSlider = new javax.swing.JSlider(); analysisToolsToolBar = new javax.swing.JToolBar(); foveaSelectButton = new javax.swing.JToggleButton(); singleSelectButton = new javax.swing.JToggleButton(); screenSelectButton = new javax.swing.JToggleButton(); jLabel1 = new javax.swing.JLabel(); lrpWidthTextField = new javax.swing.JFormattedTextField(); displayPanel = new javax.swing.JPanel(); positionPanel = new javax.swing.JPanel(); mousePositionLabel = new oct.analysis.application.comp.MousePositionListeningLabel(); filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); jPanel2 = new javax.swing.JPanel(); mouseDistanceToFoveaLabel = new oct.analysis.application.comp.MouseDistanceToFoveaListeningLabel(); filler4 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); dispControlPanel = new javax.swing.JPanel(); dispSelectionsCheckBox = new javax.swing.JCheckBox(); filler2 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); dispSegmentationCheckBox = new javax.swing.JCheckBox(); filler3 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); scaleBarCheckBox = new javax.swing.JCheckBox(); filler5 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); imageLabel = new javax.swing.JLabel(); logModeOCTButton = new javax.swing.JRadioButton(); linearOCTModeButton = new javax.swing.JRadioButton(); appMenuBar = new javax.swing.JMenuBar(); fileMenu = new javax.swing.JMenu(); newAnalysisMenuItem = new javax.swing.JMenuItem(); openAnalysisMenuItem = new javax.swing.JMenuItem(); saveAnalysisMenuItem = new javax.swing.JMenuItem(); exportAnalysisResultsMenuItem = new javax.swing.JMenuItem(); Exit = new javax.swing.JMenuItem(); analysisMenu = new javax.swing.JMenu(); equidistantAutoMenuItem = new javax.swing.JMenuItem(); equidistantInteractiveMenuItem = new javax.swing.JMenuItem(); autoEzMenuItem = new javax.swing.JMenuItem(); interactiveEzMenuItem = new javax.swing.JMenuItem(); singleLRPAnalysisMenuItem = new javax.swing.JMenuItem(); autoMirrorMenuItem = new javax.swing.JMenuItem(); interactiveMirrorAnalysisMenuItem = new javax.swing.JMenuItem(); autoFoveaFindMenuItem = new javax.swing.JMenuItem(); interactiveFindFoveaMenuItem = new javax.swing.JMenuItem(); toolsMenu = new javax.swing.JMenu(); foveaSelectMenuItem = new javax.swing.JCheckBoxMenuItem(); singleSelectMenuItem = new javax.swing.JCheckBoxMenuItem(); lrpMenuItem = new javax.swing.JMenuItem(); toolbarsMenu = new javax.swing.JMenu(); filtersTBMenuItem = new javax.swing.JCheckBoxMenuItem(); org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, lrpWidthTextField, org.jdesktop.beansbinding.ELProperty.create("${value}"), lrpSelectionWidthBean, org.jdesktop.beansbinding.BeanProperty.create("lrpSelectionWidth")); bindingGroup.addBinding(binding); lrpSelectionWidthBean.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { lrpSelectionWidthBeanPropertyChange(evt); } }); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("OCT Reflectivity Analytics"); setIconImage(new ImageIcon(getClass().getResource("/oct/rsc/icon/logo.png")).getImage()); setLocationByPlatform(true); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosed(java.awt.event.WindowEvent evt) { formWindowClosed(evt); } }); octAnalysisPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder()); octAnalysisPanel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { octAnalysisPanelMouseClicked(evt); } }); octAnalysisPanel.addKeyListener(new java.awt.event.KeyAdapter() { public void keyPressed(java.awt.event.KeyEvent evt) { octAnalysisPanelKeyPressed(evt); } public void keyTyped(java.awt.event.KeyEvent evt) { octAnalysisPanelKeyTyped(evt); } }); javax.swing.GroupLayout octAnalysisPanelLayout = new javax.swing.GroupLayout(octAnalysisPanel); octAnalysisPanel.setLayout(octAnalysisPanelLayout); octAnalysisPanelLayout.setHorizontalGroup(octAnalysisPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); octAnalysisPanelLayout.setVerticalGroup(octAnalysisPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); filterPanel.setLayout(new java.awt.BorderLayout()); filtersToolbar.setBorder(javax.swing.BorderFactory.createEtchedBorder()); filtersToolbar.setOrientation(javax.swing.SwingConstants.VERTICAL); filtersToolbar.setRollover(true); filtersToolbar.setName("OCT Filters Toolbar"); // NOI18N lrpSmoothingPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("LRP Smoothing Factor")); lrpSmoothingSlider.setMajorTickSpacing(5); lrpSmoothingSlider.setMaximum(51); lrpSmoothingSlider.setMinimum(1); lrpSmoothingSlider.setMinorTickSpacing(1); lrpSmoothingSlider.setPaintLabels(true); lrpSmoothingSlider.setPaintTicks(true); lrpSmoothingSlider.setSnapToTicks(true); lrpSmoothingSlider .setToolTipText("Adjust the smoothing applied to LRPs (values of 0 and 1 have the same effect)"); lrpSmoothingSlider.setValue(5); lrpSmoothingSlider.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { lrpSmoothingSliderStateChanged(evt); } }); javax.swing.GroupLayout lrpSmoothingPanelLayout = new javax.swing.GroupLayout(lrpSmoothingPanel); lrpSmoothingPanel.setLayout(lrpSmoothingPanelLayout); lrpSmoothingPanelLayout.setHorizontalGroup( lrpSmoothingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent( lrpSmoothingSlider, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); lrpSmoothingPanelLayout.setVerticalGroup( lrpSmoothingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent( lrpSmoothingSlider, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); octSmoothingPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("OCT Smoothing Factor")); octSmoothingSlider.setMajorTickSpacing(5); octSmoothingSlider.setMaximum(50); octSmoothingSlider.setMinorTickSpacing(1); octSmoothingSlider.setPaintLabels(true); octSmoothingSlider.setPaintTicks(true); octSmoothingSlider.setSnapToTicks(true); octSmoothingSlider .setToolTipText("Adjust the smoothing of the OCT image (performed using a 3x3 Gausian blur)"); octSmoothingSlider.setValue(0); octSmoothingSlider.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { octSmoothingSliderStateChanged(evt); } }); javax.swing.GroupLayout octSmoothingPanelLayout = new javax.swing.GroupLayout(octSmoothingPanel); octSmoothingPanel.setLayout(octSmoothingPanelLayout); octSmoothingPanelLayout.setHorizontalGroup( octSmoothingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent( octSmoothingSlider, javax.swing.GroupLayout.DEFAULT_SIZE, 353, Short.MAX_VALUE)); octSmoothingPanelLayout.setVerticalGroup( octSmoothingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent( octSmoothingSlider, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)); sharpRadiusPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("OCT Sharpen Radius")); octSharpRadiusSlider.setMajorTickSpacing(20); octSharpRadiusSlider.setMaximum(200); octSharpRadiusSlider.setMinorTickSpacing(5); octSharpRadiusSlider.setPaintLabels(true); octSharpRadiusSlider.setPaintTicks(true); octSharpRadiusSlider.setSnapToTicks(true); octSharpRadiusSlider.setToolTipText( "Adjust the number of pixels (as a radius) used to sharpen OCT at each given point"); octSharpRadiusSlider.setValue(0); octSharpRadiusSlider.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { octSharpRadiusSliderStateChanged(evt); } }); javax.swing.GroupLayout sharpRadiusPanelLayout = new javax.swing.GroupLayout(sharpRadiusPanel); sharpRadiusPanel.setLayout(sharpRadiusPanelLayout); sharpRadiusPanelLayout.setHorizontalGroup( sharpRadiusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent( octSharpRadiusSlider, javax.swing.GroupLayout.DEFAULT_SIZE, 353, Short.MAX_VALUE)); sharpRadiusPanelLayout.setVerticalGroup( sharpRadiusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent( octSharpRadiusSlider, javax.swing.GroupLayout.DEFAULT_SIZE, 84, Short.MAX_VALUE)); octSharpWeightPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("OCT Sharpen Weight Factor")); octSharpWeightSlider.setMajorTickSpacing(10); octSharpWeightSlider.setMinorTickSpacing(2); octSharpWeightSlider.setPaintLabels(true); octSharpWeightSlider.setPaintTicks(true); octSharpWeightSlider.setToolTipText("Adjust the weighting factor given to the sharpened pixel information"); octSharpWeightSlider.setValue(0); octSharpWeightSlider.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { octSharpWeightSliderStateChanged(evt); } }); javax.swing.GroupLayout octSharpWeightPanelLayout = new javax.swing.GroupLayout(octSharpWeightPanel); octSharpWeightPanel.setLayout(octSharpWeightPanelLayout); octSharpWeightPanelLayout.setHorizontalGroup( octSharpWeightPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(octSharpWeightSlider, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); octSharpWeightPanelLayout.setVerticalGroup(octSharpWeightPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(octSharpWeightSlider, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(octSmoothingPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lrpSmoothingPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(sharpRadiusPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(octSharpWeightPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))); jPanel1Layout .setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(sharpRadiusPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lrpSmoothingPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(6, 6, 6) .addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(octSharpWeightPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(octSmoothingPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(0, 0, Short.MAX_VALUE))); filtersToolbar.add(jPanel1); filterPanel.add(filtersToolbar, java.awt.BorderLayout.CENTER); filtersToolbar.addAncestorListener(new ToolbarFloatListener(filtersToolbar, this)); analysisToolsToolBar.setBorder(javax.swing.BorderFactory.createEtchedBorder()); analysisToolsToolBar.setRollover(true); foveaSelectButton.setAction(foveaSelectMenuItem.getAction()); toolsToolBarBtnGroup.add(foveaSelectButton); foveaSelectButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/oct/rsc/icon/FVselect.png"))); // NOI18N foveaSelectButton.setToolTipText("Fovea Selection Selector Tool"); foveaSelectButton.setEnabled(false); foveaSelectButton.setFocusable(false); foveaSelectButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); foveaSelectButton.setSelectedIcon( new javax.swing.ImageIcon(getClass().getResource("/oct/rsc/icon/FVselectSelected.png"))); // NOI18N foveaSelectButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); foveaSelectButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { foveaSelectButtonActionPerformed(evt); } }); analysisToolsToolBar.add(foveaSelectButton); singleSelectButton.setAction(singleSelectMenuItem.getAction()); toolsToolBarBtnGroup.add(singleSelectButton); singleSelectButton .setIcon(new javax.swing.ImageIcon(getClass().getResource("/oct/rsc/icon/SingleSelectIcon.png"))); // NOI18N singleSelectButton.setToolTipText("Selection Selector Tool"); singleSelectButton.setEnabled(false); singleSelectButton.setFocusable(false); singleSelectButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); singleSelectButton.setSelectedIcon( new javax.swing.ImageIcon(getClass().getResource("/oct/rsc/icon/SingleSelectSelectedIcon.png"))); // NOI18N singleSelectButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); singleSelectButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { singleSelectButtonActionPerformed(evt); } }); analysisToolsToolBar.add(singleSelectButton); toolsToolBarBtnGroup.add(screenSelectButton); screenSelectButton.setIcon( new javax.swing.ImageIcon(getClass().getResource("/oct/rsc/icon/mouse-pointer-th_19x25.png"))); // NOI18N screenSelectButton.setToolTipText("Selection Pointer Tool"); screenSelectButton.setEnabled(false); screenSelectButton.setFocusable(false); screenSelectButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); screenSelectButton.setName(""); // NOI18N screenSelectButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); screenSelectButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { screenSelectButtonActionPerformed(evt); } }); analysisToolsToolBar.add(screenSelectButton); jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel1.setLabelFor(lrpWidthTextField); jLabel1.setText("LRP Selection Width:"); jLabel1.setToolTipText("Width (in pixels) of the LRP selections on the OCT"); jLabel1.setFocusable(false); jLabel1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jLabel1.setMaximumSize(new java.awt.Dimension(105, 14)); analysisToolsToolBar.add(jLabel1); lrpWidthTextField.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory( new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0")))); lrpWidthTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER); lrpWidthTextField.setText("5"); lrpWidthTextField.setToolTipText("Set the width of the LRP selections (in pixels)"); lrpWidthTextField.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR)); lrpWidthTextField.setMaximumSize(new java.awt.Dimension(35, 25)); lrpWidthTextField.setMinimumSize(new java.awt.Dimension(35, 25)); lrpWidthTextField.setPreferredSize(new java.awt.Dimension(35, 25)); analysisToolsToolBar.add(lrpWidthTextField); displayPanel.setLayout(new javax.swing.BoxLayout(displayPanel, javax.swing.BoxLayout.LINE_AXIS)); positionPanel.setBorder(javax.swing.BorderFactory .createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Position")); positionPanel.setPreferredSize(new java.awt.Dimension(80, 47)); mousePositionLabel.setText("Mouse Position"); javax.swing.GroupLayout positionPanelLayout = new javax.swing.GroupLayout(positionPanel); positionPanel.setLayout(positionPanelLayout); positionPanelLayout.setHorizontalGroup( positionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent( mousePositionLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 83, Short.MAX_VALUE)); positionPanelLayout.setVerticalGroup( positionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent( mousePositionLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 24, Short.MAX_VALUE)); displayPanel.add(positionPanel); displayPanel.add(filler1); jPanel2.setBorder(javax.swing.BorderFactory .createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "To Fovea")); jPanel2.setPreferredSize(new java.awt.Dimension(60, 47)); mouseDistanceToFoveaLabel.setText("Distance"); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout .setHorizontalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(mouseDistanceToFoveaLabel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 63, Short.MAX_VALUE)); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent( mouseDistanceToFoveaLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 24, Short.MAX_VALUE)); displayPanel.add(jPanel2); displayPanel.add(filler4); dispControlPanel.setBorder(javax.swing.BorderFactory .createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Display Control")); dispControlPanel.setLayout(new javax.swing.BoxLayout(dispControlPanel, javax.swing.BoxLayout.LINE_AXIS)); dispSelectionsCheckBox.setSelected(true); dispSelectionsCheckBox.setText("LRP Selections"); dispSelectionsCheckBox.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { dispSelectionsCheckBoxStateChanged(evt); } }); dispControlPanel.add(dispSelectionsCheckBox); dispControlPanel.add(filler2); dispSegmentationCheckBox.setText("Segmentation"); dispSegmentationCheckBox.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { dispSegmentationCheckBoxStateChanged(evt); } }); dispSegmentationCheckBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { dispSegmentationCheckBoxActionPerformed(evt); } }); dispControlPanel.add(dispSegmentationCheckBox); dispControlPanel.add(filler3); scaleBarCheckBox.setText("Scale Bars"); scaleBarCheckBox.setToolTipText("Show or hide scale bars on the image"); scaleBarCheckBox.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { scaleBarCheckBoxStateChanged(evt); } }); scaleBarCheckBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { scaleBarCheckBoxActionPerformed(evt); } }); dispControlPanel.add(scaleBarCheckBox); dispControlPanel.add(filler5); imageLabel.setText("Image:"); dispControlPanel.add(imageLabel); lrpButtonGroup.add(logModeOCTButton); logModeOCTButton.setSelected(true); logModeOCTButton.setText("Logrithmic OCT"); logModeOCTButton.setToolTipText("Display the OCT image as a Logrithmic Image"); logModeOCTButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { logModeOCTButtonActionPerformed(evt); } }); dispControlPanel.add(logModeOCTButton); lrpButtonGroup.add(linearOCTModeButton); linearOCTModeButton.setText("Linear OCT"); linearOCTModeButton.setToolTipText("Display the OCT image as a Linear Image"); linearOCTModeButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { linearOCTModeButtonActionPerformed(evt); } }); dispControlPanel.add(linearOCTModeButton); displayPanel.add(dispControlPanel); fileMenu.setText("File"); newAnalysisMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N, java.awt.event.InputEvent.CTRL_MASK)); newAnalysisMenuItem.setText("New Analysis"); newAnalysisMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { newAnalysisMenuItemActionPerformed(evt); } }); fileMenu.add(newAnalysisMenuItem); openAnalysisMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.CTRL_MASK)); openAnalysisMenuItem.setText("Open Analysis"); openAnalysisMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { openAnalysisMenuItemActionPerformed(evt); } }); fileMenu.add(openAnalysisMenuItem); saveAnalysisMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK)); saveAnalysisMenuItem.setText("Save Analysis"); saveAnalysisMenuItem.setEnabled(false); saveAnalysisMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { saveAnalysisMenuItemActionPerformed(evt); } }); fileMenu.add(saveAnalysisMenuItem); exportAnalysisResultsMenuItem.setAccelerator(javax.swing.KeyStroke .getKeyStroke(java.awt.event.KeyEvent.VK_E, java.awt.event.InputEvent.CTRL_MASK)); exportAnalysisResultsMenuItem.setText("Export Analysis Results"); exportAnalysisResultsMenuItem.setEnabled(false); exportAnalysisResultsMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { exportAnalysisResultsMenuItemActionPerformed(evt); } }); fileMenu.add(exportAnalysisResultsMenuItem); Exit.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Q, java.awt.event.InputEvent.CTRL_MASK)); Exit.setText("Quit"); Exit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ExitActionPerformed(evt); } }); fileMenu.add(Exit); appMenuBar.add(fileMenu); analysisMenu.setText("Analysis"); analysisMenu.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { analysisMenuActionPerformed(evt); } }); equidistantAutoMenuItem.setText("Equidistant (automatic)"); equidistantAutoMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { equidistantAutoMenuItemActionPerformed(evt); } }); analysisMenu.add(equidistantAutoMenuItem); equidistantInteractiveMenuItem.setText("Equidistant (interactive)"); equidistantInteractiveMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { equidistantInteractiveMenuItemActionPerformed(evt); } }); analysisMenu.add(equidistantInteractiveMenuItem); autoEzMenuItem.setText("EZ (automatic)"); autoEzMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { autoEzMenuItemActionPerformed(evt); } }); analysisMenu.add(autoEzMenuItem); interactiveEzMenuItem.setText("EZ (interactive)"); interactiveEzMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { interactiveEzMenuItemActionPerformed(evt); } }); analysisMenu.add(interactiveEzMenuItem); singleLRPAnalysisMenuItem.setText("Single"); singleLRPAnalysisMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { singleLRPAnalysisMenuItemActionPerformed(evt); } }); analysisMenu.add(singleLRPAnalysisMenuItem); autoMirrorMenuItem.setText("Mirror (automatic)"); autoMirrorMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { autoMirrorMenuItemActionPerformed(evt); } }); analysisMenu.add(autoMirrorMenuItem); interactiveMirrorAnalysisMenuItem.setText("Mirror (interactive)"); interactiveMirrorAnalysisMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { interactiveMirrorAnalysisMenuItemActionPerformed(evt); } }); analysisMenu.add(interactiveMirrorAnalysisMenuItem); autoFoveaFindMenuItem.setText("Find Fovea (automatic)"); autoFoveaFindMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { autoFoveaFindMenuItemActionPerformed(evt); } }); analysisMenu.add(autoFoveaFindMenuItem); interactiveFindFoveaMenuItem.setText("Find Fovea (interactive)"); interactiveFindFoveaMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { interactiveFindFoveaMenuItemActionPerformed(evt); } }); analysisMenu.add(interactiveFindFoveaMenuItem); appMenuBar.add(analysisMenu); toolsMenu.setText("Tools"); toolsMenu.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { toolsMenuActionPerformed(evt); } }); foveaSelectMenuItem.setText("Select Fovea"); foveaSelectMenuItem.setEnabled(false); foveaSelectMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { foveaSelectMenuItemActionPerformed(evt); } }); toolsMenu.add(foveaSelectMenuItem); singleSelectMenuItem.setText("Select Single"); singleSelectMenuItem.setEnabled(false); singleSelectMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { singleSelectMenuItemActionPerformed(evt); } }); toolsMenu.add(singleSelectMenuItem); lrpMenuItem.setText("Generate LRPs"); lrpMenuItem.setEnabled(false); lrpMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { lrpMenuItemActionPerformed(evt); } }); toolsMenu.add(lrpMenuItem); appMenuBar.add(toolsMenu); toolbarsMenu.setText("Toolbars"); filtersTBMenuItem.setSelected(true); filtersTBMenuItem.setText("Filters Toolbar"); filtersTBMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { filtersTBMenuItemActionPerformed(evt); } }); toolbarsMenu.add(filtersTBMenuItem); appMenuBar.add(toolbarsMenu); setJMenuBar(appMenuBar); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(octAnalysisPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(displayPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 736, Short.MAX_VALUE)) .addComponent(filterPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(analysisToolsToolBar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(analysisToolsToolBar, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(octAnalysisPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(displayPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(filterPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))); analysisToolsToolBar.setFloatable(false); bindingGroup.bind(); pack(); }
From source file:haven.GameUI.java
public boolean globtype(char key, KeyEvent ev) { if (key == ':') { entercmd();/*from ww w. jav a 2s . com*/ return (true); } else if (key == ' ') { toggleui(); return (true); } else if (key == 3) { if (chat.visible && !chat.hasfocus) { setfocus(chat); } else { if (chat.sz.y == 0) { chat.resize(chat.savedw, chat.savedh); setfocus(chat); } else { chat.resize(0, 0); } } Utils.setprefb("chatvis", chat.sz.y != 0); } else if (key == 16) { /* if((polity != null) && polity.show(!polity.visible)) { polity.raise(); fitwdg(polity); setfocus(polity); } */ return (true); } else if ((key == 27) && (map != null) && !map.hasfocus) { setfocus(map); return (true); } else if (key != 0) { boolean alt = ev.isAltDown(); boolean ctrl = ev.isControlDown(); boolean shift = ev.isShiftDown(); int keycode = ev.getKeyCode(); if (alt && keycode >= KeyEvent.VK_0 && keycode <= KeyEvent.VK_9) { beltwdg.setCurrentBelt(Utils.floormod(keycode - KeyEvent.VK_0 - 1, 10)); return true; } else if (alt && keycode == KeyEvent.VK_S) { studywnd.show(!studywnd.visible); if (studywnd.visible) studywnd.raise(); return true; } else if (alt && keycode == KeyEvent.VK_M) { if (mmapwnd != null) { mmapwnd.togglefold(); return true; } } else if (alt && keycode == KeyEvent.VK_C) { craftwnd.show(!craftwnd.visible); if (craftwnd.visible) craftwnd.raise(); return true; } else if (alt && keycode == KeyEvent.VK_B) { buildwnd.toggle(); if (buildwnd.visible) buildwnd.raise(); return true; } else if (alt && keycode == KeyEvent.VK_N) { Config.nightvision.set(!Config.nightvision.get()); } else if (alt && keycode == KeyEvent.VK_G) { if (map != null) map.gridOverlay.setVisible(!map.gridOverlay.isVisible()); return true; } else if (alt && keycode == KeyEvent.VK_R) { if (mmap != null) mmap.toggleCustomIcons(); return true; } else if (alt && keycode == KeyEvent.VK_D) { if (map != null) map.toggleGobRadius(); return true; } else if (alt && keycode == KeyEvent.VK_Q) { Config.showQuality.set(!Config.showQuality.get()); return true; } else if (alt && keycode == KeyEvent.VK_K) { deckwnd.show(!deckwnd.visible); deckwnd.c = new Coord(sz.sub(deckwnd.sz).div(2)); if (deckwnd.visible) deckwnd.raise(); return true; } else if (alt && keycode == KeyEvent.VK_F) { if (map != null) { map.toggleFriendlyFire(); msg("Friendly fire prevention is now turned " + (map.isPreventFriendlyFireEnabled() ? "on" : "off")); } return true; } else if (alt && keycode == KeyEvent.VK_I) { Config.showGobInfo.set(!Config.showGobInfo.get()); return true; } else if (alt && keycode == KeyEvent.VK_W) { Config.screenshotMode = !Config.screenshotMode; return true; } else if (alt && keycode == KeyEvent.VK_T) { Config.disableTileTransitions.set(!Config.disableTileTransitions.get()); ui.sess.glob.map.rebuild(); return true; } else if (keycode == KeyEvent.VK_Q && ev.getModifiers() == 0) { /* // get all forageables from config List<String> names = new ArrayList<String>(); for (CustomIconGroup group : ui.sess.glob.icons.config.groups) { if ("Forageables".equals(group.name)) { for (CustomIconMatch match : group.matches) if (match.show) names.add(match.value); break; } } tasks.add(new Forager(11 * Config.autopickRadius.get(), 1, names.toArray(new String[names.size()]))); */ ContextTaskFinder.checkForageables(tasks, ui); return true; } else if (keycode == KeyEvent.VK_E && ev.getModifiers() == 0) { ContextTaskFinder.findHandTask(tasks, ui); return true; } else if (keycode == KeyEvent.VK_F && ev.getModifiers() == 0) { ContextTaskFinder.findBuilding(tasks, ui); return true; } else if (keycode >= KeyEvent.VK_NUMPAD1 && keycode <= KeyEvent.VK_NUMPAD4) { tasks.add(new MileStoneTask(Utils.floormod(keycode - KeyEvent.VK_NUMPAD0 - 1, 10))); return true; } else if (keycode == KeyEvent.VK_W && ev.getModifiers() == 0) { tasks.add(new Drunkard()); return true; } else if (shift && keycode == KeyEvent.VK_I) { Config.hideKinInfoForNonPlayers.set(!Config.hideKinInfoForNonPlayers.get()); return true; } else if (ctrl && keycode == KeyEvent.VK_H) { Config.hideModeEnabled.set(!Config.hideModeEnabled.get()); return true; } else if (alt && keycode == KeyEvent.VK_P) { Config.showGobPaths.set(!Config.showGobPaths.get()); return true; } else if (shift && keycode == KeyEvent.VK_W) { if (Config.showQualityMode.get() == 1) { Config.showQualityMode.set(2); } else { Config.showQualityMode.set(1); } return true; } else if (keycode == KeyEvent.VK_TAB && Config.agroclosest.get()) { if (map != null) map.aggroclosest(); return true; } else if (ctrl && keycode == KeyEvent.VK_F) { Config.displayFPS.set(!Config.displayFPS.get()); return true; } else if (keycode == KeyEvent.VK_Z && ev.getModifiers() == 0) { tasks.killAllTasks(); return true; } else if (keycode == 192 && ev.getModifiers() == 0) { getparent(GameUI.class).menu.wdgmsg("act", "travel", "hearth"); return true; } else if (shift && keycode == KeyEvent.VK_S) { HavenPanel.screenshot = true; return true; } } return (super.globtype(key, ev)); }
From source file:edu.harvard.mcz.imagecapture.MainFrame.java
/** * This method initializes jMenu1 /*from w ww. ja v a2 s.c o m*/ * * @return javax.swing.JMenu */ private JMenu getJMenuQualityControl() { if (jMenuQualityControl == null) { jMenuQualityControl = new JMenu(); jMenuQualityControl.setText("QualityControl"); jMenuQualityControl.setMnemonic(KeyEvent.VK_Q); jMenuQualityControl.add(getJMenuItemValidateImageNoDB()); jMenuQualityControl.add(getJMenuItemQCBarcodes()); jMenuQualityControl.add(getJMenuItemReconcileFiles()); } return jMenuQualityControl; }
From source file:com.farouk.projectapp.FirstGUI.java
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor./*from ww w .j av a 2 s. c om*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jTabbedPane1 = new javax.swing.JTabbedPane(); jPanel5 = new javax.swing.JPanel(); jPanel6 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); DefaultTableModel a = new DefaultTableModel(); jTable2 = new javax.swing.JTable() { public boolean isCellEditable(int d, int c) { return false; } @Override public Component prepareRenderer(TableCellRenderer renderer, int row, int col) { Component comp = super.prepareRenderer(renderer, row, col); String value = getModel().getValueAt(row, 0).toString(); int a = SQLConnect.ifReported(userID, value); if (a == 1) { comp.setBackground(Color.red); } else { comp.setBackground(Color.white); comp.setForeground(Color.black); } return comp; } }; jButton5 = new javax.swing.JButton(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jSeparator2 = new javax.swing.JSeparator(); jButton10 = new javax.swing.JButton(); jLabel10 = new javax.swing.JLabel(); jPanel15 = new javax.swing.JPanel(); jPanel16 = new javax.swing.JPanel(); jTextField6 = new javax.swing.JTextField(); jTextField7 = new javax.swing.JTextField(); jLabel14 = new javax.swing.JLabel(); jButton13 = new javax.swing.JButton(); jButton14 = new javax.swing.JButton(); jButton7 = new javax.swing.JButton(); jButton3 = new javax.swing.JButton(); jPanel10 = new javax.swing.JPanel(); jScrollPane2 = new javax.swing.JScrollPane(); jEditorPane1 = new javax.swing.JEditorPane(); jButton15 = new javax.swing.JButton(); jButton19 = new javax.swing.JButton(); jTextField4 = new javax.swing.JTextField(); jPanel1 = new javax.swing.JPanel(); jPanel2 = new javax.swing.JPanel(); jTextField1 = new javax.swing.JTextField(); jPanel3 = new javax.swing.JPanel(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); jPanel4 = new javax.swing.JPanel(); jScrollPane5 = new javax.swing.JScrollPane(); jTable3 = new javax.swing.JTable() { public boolean isCellEditable(int d, int c) { return false; } }; jButton6 = new javax.swing.JButton(); jLabel2 = new javax.swing.JLabel(); jSeparator1 = new javax.swing.JSeparator(); jPanel8 = new javax.swing.JPanel(); jScrollPane3 = new javax.swing.JScrollPane(); DefaultListModel modelCompaniesName = new DefaultListModel(); try { for (String p : SQLConnect.getAllCompaniesNames()) { modelCompaniesName.addElement(p); } } catch (Exception e) { e.printStackTrace(); } jList1 = new javax.swing.JList(); jLabel3 = new javax.swing.JLabel(); jButton4 = new javax.swing.JButton(); jButton9 = new javax.swing.JButton(); jLabel9 = new javax.swing.JLabel(); jLabel8 = new javax.swing.JLabel(); jButton8 = new javax.swing.JButton(); jPanel7 = new javax.swing.JPanel(); jTextField2 = new javax.swing.JTextField(); jPasswordField1 = new javax.swing.JPasswordField(); jButton11 = new javax.swing.JButton(); jButton12 = new javax.swing.JButton(); jPanel9 = new javax.swing.JPanel(); jLabel11 = new javax.swing.JLabel(); jButton17 = new javax.swing.JButton(); jLabel12 = new javax.swing.JLabel(); jButton18 = new javax.swing.JButton(); jTextField3 = new javax.swing.JTextField(); jLabel15 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); jMenuBar1 = new javax.swing.JMenuBar(); jMenu1 = new javax.swing.JMenu(); jMenuItem1 = new javax.swing.JMenuItem(); jMenu2 = new javax.swing.JMenu(); jMenuItem2 = new javax.swing.JMenuItem(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jTabbedPane1.setToolTipText(""); jTabbedPane1.setMinimumSize(new java.awt.Dimension(150, 200)); jTabbedPane1.setPreferredSize(new java.awt.Dimension(200, 200)); jScrollPane1.setViewportView(jTable2); jTable2.setModel(a); try { UpdatejTable2(); } catch (Exception e) { e.printStackTrace(); } jTable2.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jTable2MouseClicked(evt); } }); jTable2.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { jTable2KeyReleased(evt); } }); jScrollPane1.setViewportView(jTable2); jButton5.setText("Refresh My Portfolio"); jButton5.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton5ActionPerformed(evt); } }); jLabel4.setText(" Last Refreshed : "); jButton10.setText("Refresh Company"); jButton10.setVisible(false); jButton10.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton10ActionPerformed(evt); } }); jLabel10.setText("Total is : " + String.valueOf(total.doubleValue()) + ""); jTextField6.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextField6ActionPerformed(evt); } }); jTextField6.setVisible(false); jTextField7.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextField7ActionPerformed(evt); } }); jLabel14.setText("N of Actions"); javax.swing.GroupLayout jPanel16Layout = new javax.swing.GroupLayout(jPanel16); jPanel16.setLayout(jPanel16Layout); jPanel16Layout.setHorizontalGroup(jPanel16Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel16Layout.createSequentialGroup() .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel16Layout.createSequentialGroup() .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(34, 34, 34).addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jLabel14)) .addGap(0, 3, Short.MAX_VALUE))); jPanel16Layout.setVerticalGroup(jPanel16Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel16Layout.createSequentialGroup() .addComponent(jLabel14) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(13, 13, 13))); jButton13.setText("Buy"); jButton13.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton13ActionPerformed(evt); } }); jButton14.setText("Sell"); jButton14.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton14ActionPerformed(evt); } }); javax.swing.GroupLayout jPanel15Layout = new javax.swing.GroupLayout(jPanel15); jPanel15.setLayout(jPanel15Layout); jPanel15Layout .setHorizontalGroup( jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel15Layout.createSequentialGroup().addComponent(jButton13) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButton14).addGap(166, 166, 166)) .addGroup(jPanel15Layout.createSequentialGroup() .addComponent(jPanel16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jPanel15Layout .setVerticalGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel15Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel16, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel15Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jButton14).addComponent(jButton13)))); jButton7.setText("Get News !"); jButton7.setVisible(false); jButton7.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton7ActionPerformed(evt); } }); jButton3.setText("Report"); jButton3.setVisible(false); jButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton3ActionPerformed(evt); } }); jPanel10.setVisible(false); jScrollPane2.setViewportView(jEditorPane1); javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10); jPanel10.setLayout(jPanel10Layout); jPanel10Layout.setHorizontalGroup( jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup( jPanel10Layout.createSequentialGroup().addGap(39, 39, 39).addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 423, Short.MAX_VALUE))); jPanel10Layout.setVerticalGroup(jPanel10Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(jPanel10Layout .createSequentialGroup().addContainerGap().addComponent(jScrollPane2).addContainerGap())); jButton15.setText("Automate"); jButton15.setVisible(false); jButton15.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton15ActionPerformed(evt); } }); jButton19.setText("Alert"); jButton19.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton19ActionPerformed(evt); } }); jTextField4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextField4ActionPerformed(evt); } }); javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6); jPanel6.setLayout(jPanel6Layout); jPanel6Layout.setHorizontalGroup(jPanel6Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel6Layout.createSequentialGroup().addContainerGap().addGroup(jPanel6Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jScrollPane1) .addGroup(jPanel6Layout.createSequentialGroup().addGroup(jPanel6Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel15, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jPanel6Layout.createSequentialGroup().addGroup(jPanel6Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jButton19, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButton15, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButton7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel6Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jButton3).addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGroup(jPanel6Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel6Layout.createSequentialGroup() .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel6Layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup() .addGroup(jPanel6Layout.createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel10) .addComponent(jButton10)) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel6Layout.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jButton5) .addComponent(jLabel4))) .addComponent(jLabel5, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 157, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(jPanel6Layout.createSequentialGroup().addGap(70, 70, 70) .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 419, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE))))) .addContainerGap())); jPanel6Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] { jButton3, jTextField4 }); jPanel6Layout.setVerticalGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel6Layout.createSequentialGroup().addContainerGap() .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 249, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel6Layout.createSequentialGroup().addComponent(jButton7) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel6Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton15).addComponent(jButton3)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel6Layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jButton19) .addGroup(jPanel6Layout.createSequentialGroup().addGap(1, 1, 1) .addComponent(jTextField4))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(9, 9, 9)) .addGroup(jPanel6Layout.createSequentialGroup() .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel6Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel6Layout.createSequentialGroup() .addGroup(jPanel6Layout .createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton5).addComponent(jButton10)) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel6Layout .createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel4).addComponent(jLabel10)) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE))) .addContainerGap())))); javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5); jPanel5.setLayout(jPanel5Layout); jPanel5Layout.setHorizontalGroup(jPanel5Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel5Layout.createSequentialGroup().addContainerGap().addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap())); jPanel5Layout.setVerticalGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel5Layout.createSequentialGroup().addContainerGap().addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap())); jTabbedPane1.addTab(" My Portfolio ", jPanel5); jTextField1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); jTextField1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextField1ActionPerformed(evt); } }); jButton1.setText("Search"); jButton1.setAlignmentY(0.3F); jButton1.setAutoscrolls(true); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jButton2.setText("Clear"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup().addGap(2, 2, 2) .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18).addComponent(jButton2) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButton2)) .addContainerGap())); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup(jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup().addContainerGap() .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 24, Short.MAX_VALUE) .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(51, 51, 51))); jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jTextField1).addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap())); jLabel1.setText("Name of Company to look for : "); jTable3.setModel(a); jScrollPane5.setViewportView(jTable3); jScrollPane5.setVisible(false); jButton6.setText("Refresh Company"); jButton6.setVisible(false); jButton6.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton6ActionPerformed(evt); } }); jLabel2.setText(null); jLabel2.setVisible(false); javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4); jPanel4.setLayout(jPanel4Layout); jPanel4Layout.setHorizontalGroup(jPanel4Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup().addContainerGap().addGroup(jPanel4Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jScrollPane5) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE) .addGroup(jPanel4Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel2).addComponent(jButton6)))) .addContainerGap())); jPanel4Layout.setVerticalGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup().addGap(5, 5, 5).addComponent(jButton6) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(19, 19, 19))); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(jPanel1Layout.createSequentialGroup().addGap(82, 82, 82) .addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel1).addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 598, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(0, 236, Short.MAX_VALUE))) .addContainerGap())); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addGap(36, 36, 36).addComponent(jLabel1) .addGap(18, 18, 18) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(210, Short.MAX_VALUE))); jTabbedPane1.addTab(" Search ", jPanel1); jList1.setModel(modelCompaniesName); jList1.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jList1MouseClicked(evt); } }); jScrollPane3.setViewportView(jList1); jLabel3.setText(" List of Companies (NASDAQ)"); javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8); jPanel8.setLayout(jPanel8Layout); jPanel8Layout .setHorizontalGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) .addGroup(jPanel8Layout.createSequentialGroup().addComponent(jLabel3).addGap(0, 50, Short.MAX_VALUE))); jPanel8Layout.setVerticalGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup().addGap(5, 5, 5).addComponent(jLabel3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent( jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 613, Short.MAX_VALUE))); jButton4.setText("Refresh All"); jButton4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton4ActionPerformed(evt); } }); jButton9.setVisible(false); jButton9.setText("Quit"); jButton9.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton9ActionPerformed(evt); } }); jLabel9.setText("All prices are in ."); jLabel8.setVisible(false); jButton8.setText("Stop"); jButton8.setVisible(false); jTextField2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextField2ActionPerformed(evt); } }); jPasswordField1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jPasswordField1ActionPerformed(evt); } }); jButton11.setText("Log in"); jButton11.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton11ActionPerformed(evt); } }); jButton12.setText("Create account"); jButton12.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton12ActionPerformed(evt); } }); javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7); jPanel7.setLayout(jPanel7Layout); jPanel7Layout .setHorizontalGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel7Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel7Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jButton11, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton12, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap())); jPanel7Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] { jPasswordField1, jTextField2 }); jPanel7Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] { jButton11, jButton12 }); jPanel7Layout.setVerticalGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel7Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton11)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButton12).addContainerGap())); jPanel7Layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] { jPasswordField1, jTextField2 }); jLabel11.setFont(new java.awt.Font("Tahoma", 0, 17)); // NOI18N jButton17.setText("Log out"); jButton17.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton17ActionPerformed(evt); } }); jButton18.setText("Change Limit"); jButton18.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton18ActionPerformed(evt); } }); jTextField3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextField3ActionPerformed(evt); } }); jPanel9.setVisible(false); javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9); jPanel9.setLayout(jPanel9Layout); jPanel9Layout.setHorizontalGroup(jPanel9Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel9Layout.createSequentialGroup() .addContainerGap(18, Short.MAX_VALUE) .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jPanel9Layout.createSequentialGroup() .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jButton18)) .addGroup(jPanel9Layout.createSequentialGroup() .addGroup(jPanel9Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel9Layout.createSequentialGroup().addComponent(jLabel11) .addGap(30, 30, 30)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel9Layout.createSequentialGroup().addComponent(jLabel12) .addGap(18, 18, 18))) .addComponent(jButton17))) .addGap(36, 36, 36))); jPanel9Layout.setVerticalGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel9Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel9Layout.createSequentialGroup().addComponent(jLabel11) .addGap(18, 18, 18).addComponent(jLabel12)) .addComponent(jButton17)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup( jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jButton18).addGroup(jPanel9Layout.createSequentialGroup() .addGap(1, 1, 1).addComponent(jTextField3))) .addContainerGap())); jLabel6.setVisible(false); jMenu1.setText("File"); jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Q, java.awt.event.InputEvent.CTRL_MASK)); jMenuItem1.setText("Quit"); jMenuItem1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem1ActionPerformed(evt); } }); jMenu1.add(jMenuItem1); jMenuBar1.add(jMenu1); jMenu2.setText("Help"); jMenuItem2.setText("About"); jMenuItem2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem2ActionPerformed(evt); } }); jMenu2.add(jMenuItem2); jMenuBar1.add(jMenu2); setJMenuBar(jMenuBar1); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createSequentialGroup().addComponent(jButton4) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton8))) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE) .addComponent(jLabel6) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel8).addGap(85, 85, 85).addComponent(jLabel7) .addGap(77, 77, 77).addComponent(jButton9)) .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 931, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup().addComponent(jLabel9) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(53, 53, 53).addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(18, 18, 18)) .addGroup(layout.createSequentialGroup().addComponent(jLabel15) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton9).addComponent(jButton4).addComponent(jLabel8) .addComponent(jButton8).addComponent(jLabel6).addComponent(jLabel7)) .addContainerGap()) .addGroup(layout.createSequentialGroup().addGap(16, 16, 16).addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(68, 68, 68) .addComponent(jLabel9)) .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 515, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel15) .addGap(0, 0, Short.MAX_VALUE))); jTabbedPane1.getAccessibleContext().setAccessibleName(""); pack(); }