Digital Image Processing (using Java)
Digital Image Processing (using Java)
Digital Image Processing (using Java)
- No tags were found...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
menuBar.add(menu);setJMenuBar(menuBar);addWindowListener(new WindowMonitor());}// Creates a single HistogramView object to display a// greyscale histogram and adds it to the GUIpublic void createSingleView() {view = new HistogramView[1];view[0] = new HistogramView(histogram, infoPane);mainPane.add(view[0], BorderLayout.CENTER);}// Creates three HistogramView objects for the red, green// and blue bands of a colour histogram, places these in a// tabbed pane and adds the tabbed pane to the GUIpublic void createMultipleViews() {view = new HistogramView[3];Color[] bandColor = { Color.red, Color.green, Color.blue };String[] tabLabel = { "Red", "Green", "Blue" };JTabbedPane views = new JTabbedPane(JTabbedPane.BOTTOM);for (int i = 0; i < 3; ++i) {view[i] = new HistogramView(histogram, i, infoPane);view[i].setColor(bandColor[i]);views.add(tabLabel[i], view[i]);}mainPane.add(views, BorderLayout.CENTER);}// Creates a menu to support image input, histogram output// and termination of the applicationpublic void createFileMenu() {menu = new JMenu("File");menu.setMnemonic('F');String[] itemName = { "Load image", "Save histogram", "Exit" };- 29 -