List of usage examples for javax.swing JSplitPane LEFT
String LEFT
To view the source code for javax.swing JSplitPane LEFT.
Click Source Link
Component
to the left of the other Component
. From source file:Main.java
public static Component getChild(Component parent, String name) { parent = getContainer(parent);//from ww w . ja va 2s . c o m if (parent instanceof JSplitPane) { JSplitPane split = (JSplitPane) parent; if (JSplitPane.TOP.equals(name)) { return split.getTopComponent(); } else if (JSplitPane.LEFT.equals(name)) { return split.getLeftComponent(); } else if (JSplitPane.RIGHT.equals(name)) { return split.getRightComponent(); } else if (JSplitPane.BOTTOM.equals(name)) { return split.getBottomComponent(); } } Container cont = (Container) parent; for (int i = 0; i < cont.getComponentCount(); i++) { Component comp = cont.getComponent(i); if (name.equals(comp.getName())) { return comp; } } if (name.endsWith(VIEW_SUFFIX)) { String subName = name.substring(0, name.length() - VIEW_SUFFIX.length()); if (subName.isEmpty()) { return parent; } return getContainer(getChild(parent, subName)); } throw new IllegalArgumentException("No component named " + name); }
From source file:eu.cassandra.platform.gui.GUI.java
public GUI() { //redirectSystemStreams(); a = new ListenInstallationComboBox(); installationCombo.setPreferredSize(new Dimension(300, 20)); startButton.addActionListener(new ListenStartButton()); exitButton.addActionListener(new ListenExitButton()); projectFileField.addMouseListener(new ListenProjectFileField()); logTextAreaScrollPane.setPreferredSize(new Dimension(400, 500)); projectFileField.setPreferredSize(new Dimension(600, 20)); // projectFileField.setText(new File(Params.SIM_PROPS).getAbsolutePath()); projectFileField.setText(""); projectFileField.setEditable(false); f.setJMenuBar(menuBar);/*from w w w . j a v a 2s . c o m*/ menuFile.add(menuItemQuit); menuHelp.add(menuItemAbout); menuBar.add(menuFile); menuBar.add(menuHelp); statsTextArea.setFont(new Font("Tahoma", Font.BOLD, 12)); TimeSeries series = new TimeSeries(""); dataset = new TimeSeriesCollection(series); JFreeChart chart = createChart("Consumption", dataset); ChartPanel chartPanel = new ChartPanel(chart); graphScrollPane = new JScrollPane(chartPanel); buttonPanel.add(projectFileField); buttonPanel.add(startButton); buttonPanel.add(holdButton); buttonPanel.add(installationCombo); buttonPanel.add(exitButton); statsTextArea.setText("Statistics:\n"); logTextArea.setText("Logs:\n"); JSplitPane textAreaSplitPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT); textAreaSplitPanel.setDividerLocation((int) (Toolkit.getDefaultToolkit().getScreenSize().getHeight() / 2)); textAreaSplitPanel.add(statsTextAreaScrollPane, JSplitPane.TOP); textAreaSplitPanel.add(logTextAreaScrollPane, JSplitPane.BOTTOM); JSplitPane mainSplitPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); mainSplitPanel.add(graphScrollPane, JSplitPane.LEFT); mainSplitPanel.add(textAreaSplitPanel, JSplitPane.RIGHT); mainSplitPanel.setDividerLocation((int) (Toolkit.getDefaultToolkit().getScreenSize().getWidth() / 1.5)); f.getContentPane().setLayout(new BorderLayout()); f.getContentPane().add(mainSplitPanel, BorderLayout.CENTER); f.getContentPane().add(buttonScrollPane, BorderLayout.SOUTH); f.addWindowListener(new ListenCloseWdw()); menuItemQuit.addActionListener(new ListenMenuQuit()); }
From source file:org.ash.history.MainPreview.java
/** * Load calendar and add to JSplitPane/*from ww w . j ava2 s . co m*/ * * @param envDir */ private void loadCalendarPreview(String envDir) { try { // Create new instance of CalendarH CalendarH calendarH = new CalendarH(envDir, this); // Close preview instance of ASHDatabaseH if (this.ashDBPrevPeriod != null) this.ashDBPrevPeriod.close(); this.ashDBPrevPeriod = calendarH.getDatabaseHistory(); splitCalendarPreview = new JSplitPane(); splitCalendarPreview.setOrientation(JSplitPane.HORIZONTAL_SPLIT); splitCalendarPreview.add(calendarH, JSplitPane.LEFT); splitCalendarPreview.add(new JPanel(), JSplitPane.RIGHT); splitCalendarPreview.setDividerLocation(splitCalendarPreviewDivLocation); splitCalendarPreview.setOneTouchExpandable(true); this.main.removeAll(); splitMainPane = new JSplitPane(); splitMainPane.setOrientation(JSplitPane.VERTICAL_SPLIT); splitMainPane.add(splitCalendarPreview, JSplitPane.TOP); splitMainPane.add(new JPanel(), JSplitPane.BOTTOM); splitMainPane.setDividerLocation(splitMainPaneDivLocation); splitMainPane.setOneTouchExpandable(true); this.main.add(splitMainPane); this.validate(); } catch (Exception e) { e.printStackTrace(); } }
From source file:com.digitexx.ancestry.gui.FrmUpperLowerData.java
private void initGUI() { try {/* w w w. j av a2 s .c o m*/ this.setTitle("Uppercase & Lowercase data"); setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); AnchorLayout thisLayout = new AnchorLayout(); getContentPane().setLayout(thisLayout); { panelMain = new JPanel(); BorderLayout panelMainLayout = new BorderLayout(); panelMain.setLayout(panelMainLayout); getContentPane().add(panelMain, new AnchorConstraint(0, 1000, 944, 0, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL)); panelMain.setBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED)); panelMain.setPreferredSize(new java.awt.Dimension(775, 488)); { splitPaneMain = new JSplitPane(); panelMain.add(splitPaneMain, BorderLayout.CENTER); splitPaneMain.setOrientation(JSplitPane.VERTICAL_SPLIT); splitPaneMain.setDividerLocation(200); { panelColumnLog = new JPanel(); BorderLayout panelLogLayout = new BorderLayout(); panelColumnLog.setLayout(panelLogLayout); splitPaneMain.add(panelColumnLog, JSplitPane.RIGHT); panelColumnLog.setPreferredSize(new java.awt.Dimension(417, 482)); { splitPaneColumnAndLog = new JSplitPane(); panelColumnLog.add(splitPaneColumnAndLog, BorderLayout.CENTER); splitPaneColumnAndLog.setDividerLocation(200); { panelLog = new JPanel(); BorderLayout panelLogLayout1 = new BorderLayout(); panelLog.setLayout(panelLogLayout1); splitPaneColumnAndLog.add(panelLog, JSplitPane.RIGHT); { scrollPaneLog = new JScrollPane(); panelLog.add(scrollPaneLog, BorderLayout.CENTER); { textPaneLog = new JTextPane(); scrollPaneLog.setViewportView(textPaneLog); } } } { panelColumn = new JPanel(); BorderLayout panelColumnLayout = new BorderLayout(); panelColumn.setLayout(panelColumnLayout); splitPaneColumnAndLog.add(panelColumn, JSplitPane.LEFT); { scrollPaneColumn = new JScrollPane(); panelColumn.add(scrollPaneColumn, BorderLayout.CENTER); { tableField = new JTable() { @Override public boolean isCellEditable(int row, int column) { if (getColumnName(column).equals("Check")) { return true; } else { return false; } } @Override public Class<?> getColumnClass(int column) { if (getColumnName(column).equals("Check")) { return Boolean.class; } else { return super.getColumnClass(column); } } }; scrollPaneColumn.setViewportView(tableField); } } } } } { panelPath = new JPanel(); BorderLayout panelPathLayout = new BorderLayout(); panelPath.setLayout(panelPathLayout); splitPaneMain.add(panelPath, JSplitPane.LEFT); panelPath.setPreferredSize(new java.awt.Dimension(769, 316)); { scrollPanePath = new JScrollPane(); panelPath.add(scrollPanePath, BorderLayout.CENTER); { jListPath = new JList(); scrollPanePath.setViewportView(jListPath); jListPath.setFont(new java.awt.Font("Arial", 0, 14)); } } } } } { panelFooter = new JPanel(); AnchorLayout panelFooterLayout = new AnchorLayout(); getContentPane().add(panelFooter, new AnchorConstraint(944, 1000, 1000, 0, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL)); panelFooter.setBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED)); panelFooter.setLayout(panelFooterLayout); panelFooter.setPreferredSize(new java.awt.Dimension(775, 29)); { buttonRun = new JButton(); panelFooter.add(buttonRun, new AnchorConstraint(86, 998, 948, 890, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL)); buttonRun.setText("Run"); buttonRun.setFont(new java.awt.Font("Arial", 1, 16)); buttonRun.setPreferredSize(new java.awt.Dimension(83, 25)); buttonRun.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { buttonRunActionPerformed(evt); } }); } { checkboxRework = new JCheckBox(); panelFooter.add(checkboxRework, new AnchorConstraint(86, 155, 948, 3, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL)); checkboxRework.setText("Rework"); checkboxRework.setFont(new java.awt.Font("Arial", 1, 16)); checkboxRework.setForeground(new java.awt.Color(255, 0, 0)); checkboxRework.setPreferredSize(new java.awt.Dimension(118, 25)); checkboxRework.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { checkboxReworkActionPerformed(evt); } }); } } pack(); this.setSize(783, 551); AppUtility.centerFrame(this); this.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent evt) { exit(); } }); ; } catch (Exception e) { e.printStackTrace(); } }
From source file:jboost.visualization.HistogramFrame.java
private void initGUI() { post("Initializing GUI..."); try {//from w w w . j av a 2s .com setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); { jMenuBar1 = new JMenuBar(); setJMenuBar(jMenuBar1); jMenuBar1.add(getJMenu1()); jMenuBar1.add(getJMenu2()); } { jSplitPane2 = new JSplitPane(); jSplitPane2.setBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED)); jSplitPane2.setDividerLocation(850); jSplitPane2.setFocusCycleRoot(true); jSplitPane2.add(getJSplitPane1(), JSplitPane.LEFT); jSplitPane2.add(getJPanel3(), JSplitPane.RIGHT); } this.add(jSplitPane2); pack(); this.setSize(1000, 500); } catch (Exception e) { e.printStackTrace(); } }
From source file:jboost.visualization.HistogramFrame.java
private JSplitPane getJSplitPane1() { if (jSplitPane1 == null) { jSplitPane1 = new JSplitPane(); jSplitPane1.setPreferredSize(new Dimension(546, 400)); jSplitPane1.setDividerLocation(400); jSplitPane1.setDoubleBuffered(true); jSplitPane1.setLastDividerLocation(100); {// w w w. j av a2 s . co m jPanel1 = new JPanel(); jSplitPane1.add(jPanel1, JSplitPane.RIGHT); jPanel1.setPreferredSize(new Dimension(10, 406)); BoxLayout jPanel1Layout = new BoxLayout(jPanel1, javax.swing.BoxLayout.Y_AXIS); jPanel1.setLayout(jPanel1Layout); { histogramDataset = new XYIntervalSeriesCollection(); fluctDataset = new XYIntervalSeriesCollection(); weightDataset = new XYSeriesCollection(); potentialDataset = new XYSeriesCollection(); updateHistogramDatasets(); histogramChart = createHistogramChart(); histogramPanel = new ChartPanel(histogramChart); jPanel1.add(histogramPanel); histogramPanel.setPopupMenu(null); histogramPanel.setPreferredSize(new Dimension(433, 374)); } } { jPanel2 = new JPanel(); jSplitPane1.add(jPanel2, JSplitPane.LEFT); jPanel2.setPreferredSize(new Dimension(10, 393)); BoxLayout jPanel2Layout = new BoxLayout(jPanel2, javax.swing.BoxLayout.Y_AXIS); jPanel2.setLayout(jPanel2Layout); jPanel2.setOpaque(false); rocDataset = new XYSeriesCollection(); XYSeries rocSeries = rawData.generateRoC(negLabel, posLabel); rocDataset.addSeries(rocSeries); rocChart = createRocChart(rocDataset); rocPanel = new ChartPanel(rocChart); jPanel2.add(rocPanel); rocPanel.setPopupMenu(null); rocPanel.setPreferredSize(new Dimension(10, 406)); } { jSlider1 = new JSlider(); jPanel1.add(jSlider1); jSlider1.setLayout(null); jSlider1.setPreferredSize(new Dimension(10, 16)); jSlider1.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent evt) { updateUpperMarker(); } }); } { jSlider2 = new JSlider(); jPanel1.add(jSlider2); jSlider2.setLayout(null); jSlider2.setPreferredSize(new Dimension(10, 16)); jSlider2.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent evt) { updateLowerMarker(); } }); } } return jSplitPane1; }
From source file:com.zigabyte.stock.stratplot.StrategyPlotter.java
private void initLayout() { Container content = this.getContentPane(); JComponent controls = Box.createVerticalBox(); {//from w ww.j a va 2s . c o m JPanel filePanel = new JPanel(new BorderLayout()); { filePanel.setBorder(BorderFactory.createTitledBorder("Stock Market Trading Data")); JPanel dataButtons = new JPanel(new GridLayout(2, 1)); { dataButtons.add(this.loadFileButton); dataButtons.add(this.viewDataButton); } filePanel.add(dataButtons, BorderLayout.EAST); JPanel fileControls = new JPanel(new FlowLayout()); { fileControls.add(new JLabel("Stock data File:")); fileControls.add(this.fileField); fileControls.add(this.fileBrowseButton); fileControls.add(new JLabel(" Stock data format:")); fileControls.add(this.fileFormatCombo); } filePanel.add(fileControls, BorderLayout.CENTER); } controls.add(filePanel); JComponent simPanel = new JPanel(new BorderLayout()); { simPanel.setBorder(BorderFactory.createTitledBorder("Simulation Run")); simPanel.add(this.runButton, BorderLayout.EAST); JComponent simControlsPanel = Box.createVerticalBox(); { JPanel accountControls = new JPanel(new FlowLayout()); { accountControls.add(new JLabel("Initial Cash:")); accountControls.add(this.initialCashField); accountControls.add(new JLabel(" Per Trade Fee:")); accountControls.add(this.perTradeFeeField); accountControls.add(new JLabel(" Per Share Trade Commission:")); accountControls.add(this.perShareTradeCommissionField); accountControls.add(new JLabel(" Compare:")); accountControls.add(this.compareIndexSymbolField); } simControlsPanel.add(accountControls); JPanel runControls = new JPanel(new FlowLayout()); { runControls.add(this.strategyField); runControls.add(new JLabel("Start Date:")); runControls.add(this.startDateField); runControls.add(new JLabel(" End Date:")); runControls.add(this.endDateField); runControls.add(new JLabel(" Strategy:")); runControls.add(this.strategyField); runControls.add(this.editButton); runControls.add(this.compileButton); } simControlsPanel.add(runControls); } simPanel.add(simControlsPanel, BorderLayout.CENTER); } controls.add(simPanel); } content.add(controls, BorderLayout.NORTH); JSplitPane vSplit = this.vSplit; { vSplit.setResizeWeight(0.5); vSplit.add(this.chartPanel, JSplitPane.TOP); JSplitPane hSplit = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); { hSplit.setResizeWeight(0.5); // enough for no hscrollbar in 1024 width JSplitPane reportSplit = new JSplitPane(JSplitPane.VERTICAL_SPLIT); { reportSplit.setResizeWeight(0.5); JScrollPane reportScroll = new JScrollPane(this.reportArea); { reportScroll.setBorder(BorderFactory.createTitledBorder("Report")); } reportSplit.add(reportScroll, JSplitPane.TOP); JScrollPane monthScroll = new JScrollPane(this.monthlyLogArea); { monthScroll.setBorder(BorderFactory.createTitledBorder("Monthly Log")); } reportSplit.add(monthScroll, JSplitPane.BOTTOM); } hSplit.add(reportSplit, JSplitPane.LEFT); JScrollPane tradeScroll = new JScrollPane(this.tradeLogArea); { tradeScroll.setBorder(BorderFactory.createTitledBorder("Trade Log")); } hSplit.add(tradeScroll, JSplitPane.RIGHT); } vSplit.add(hSplit, JSplitPane.BOTTOM); } content.add(vSplit, BorderLayout.CENTER); }
From source file:de.tbuchloh.kiskis.gui.MainView.java
private void createTree(final JPopupMenu treeContext) { final JPanel panel = new JPanel(new BorderLayout()); _tree = new TreeView(treeContext); _tree.addTreeSelectionListener(this); final TreeDragAndDropListener dsl = new TreeDragAndDropListener(); dsl.setTree(_tree);//from ww w .ja v a2s. c o m _searchBox = new SearchBox(_tree); panel.add(new JScrollPane(_tree)); panel.add(_searchBox, BorderLayout.NORTH); _main.add(panel, JSplitPane.LEFT); }
From source file:com.mirth.connect.client.ui.Frame.java
/** * Called to set up this main window frame. *///from w w w . j a v a 2s . com public void setupFrame(Client mirthClient) throws ClientException { LoginPanel login = LoginPanel.getInstance(); // Initialize the send message dialog editMessageDialog = new EditMessageDialog(); this.mirthClient = mirthClient; login.setStatus("Loading extensions..."); try { loadExtensionMetaData(); } catch (ClientException e) { alertError(this, "Unable to load extensions."); throw e; } // Re-initialize the controller every time the frame is setup AuthorizationControllerFactory.getAuthorizationController().initialize(); channelPanel = new ChannelPanel(); channelPanel.retrieveGroups(); channelPanel.retrieveDependencies(); codeTemplatePanel = new CodeTemplatePanel(this); initializeExtensions(); channelPanel.initPanelPlugins(); // Load the data type/display name maps now that the extensions have been loaded. dataTypeToDisplayName = new LinkedHashMap<String, String>(); displayNameToDataType = new LinkedHashMap<String, String>(); for (Entry<String, DataTypeClientPlugin> entry : LoadedExtensions.getInstance().getDataTypePlugins() .entrySet()) { dataTypeToDisplayName.put(entry.getKey(), entry.getValue().getDisplayName()); displayNameToDataType.put(entry.getValue().getDisplayName(), entry.getKey()); } setInitialVisibleTasks(); login.setStatus("Loading preferences..."); userPreferences = Preferences.userNodeForPackage(Mirth.class); userPreferences.put("defaultServer", PlatformUI.SERVER_URL); login.setStatus("Loading GUI components..."); splitPane.setDividerSize(0); splitPane.setBorder(BorderFactory.createEmptyBorder()); contentPanel = (JPanel) getContentPane(); contentPanel.setLayout(new BorderLayout()); contentPanel.setBorder(BorderFactory.createEmptyBorder()); taskPane.setBorder(BorderFactory.createEmptyBorder()); statusBar = new StatusBar(); statusBar.setBorder(BorderFactory.createEmptyBorder()); contentPane.setBorder(BorderFactory.createEmptyBorder()); buildContentPanel(rightContainer, contentPane, false); // Set task pane container background painter MattePainter taskPanePainter = new MattePainter(new GradientPaint(0f, 0f, UIConstants.JX_CONTAINER_BACKGROUND_COLOR, 0f, 1f, UIConstants.JX_CONTAINER_BACKGROUND_COLOR)); taskPanePainter.setPaintStretched(true); taskPaneContainer.setBackgroundPainter(taskPanePainter); // Set main content container title painter MattePainter contentTitlePainter = new MattePainter(new GradientPaint(0f, 0f, UIConstants.JX_CONTAINER_BACKGROUND_COLOR, 0f, 1f, UIConstants.JX_CONTAINER_BACKGROUND_COLOR)); contentTitlePainter.setPaintStretched(true); rightContainer.setTitlePainter(contentTitlePainter); splitPane.add(rightContainer, JSplitPane.RIGHT); splitPane.add(taskPane, JSplitPane.LEFT); taskPane.setMinimumSize(new Dimension(UIConstants.TASK_PANE_WIDTH, 0)); splitPane.setDividerLocation(UIConstants.TASK_PANE_WIDTH); contentPanel.add(statusBar, BorderLayout.SOUTH); contentPanel.add(splitPane, java.awt.BorderLayout.CENTER); try { PlatformUI.SERVER_ID = mirthClient.getServerId(); PlatformUI.SERVER_VERSION = mirthClient.getVersion(); PlatformUI.SERVER_TIMEZONE = mirthClient.getServerTimezone(); PlatformUI.SERVER_TIME = mirthClient.getServerTime(); setTitle(getTitle() + " - (" + PlatformUI.SERVER_VERSION + ")"); PlatformUI.BUILD_DATE = mirthClient.getBuildDate(); // Initialize ObjectXMLSerializer once we know the server version try { ObjectXMLSerializer.getInstance().init(PlatformUI.SERVER_VERSION); } catch (Exception e) { } } catch (ClientException e) { alertError(this, "Could not get server information."); } // Display the server timezone information statusBar.setTimezoneText(PlatformUI.SERVER_TIMEZONE); statusBar.setServerTime(PlatformUI.SERVER_TIME); setCurrentTaskPaneContainer(taskPaneContainer); login.setStatus("Loading dashboard..."); doShowDashboard(); login.setStatus("Loading channel editor..."); channelEditPanel = new ChannelSetup(); login.setStatus("Loading alert editor..."); if (alertEditPanel == null) { alertEditPanel = new DefaultAlertEditPanel(); } login.setStatus("Loading message browser..."); messageBrowser = new MessageBrowser(); // Refresh code templates after extensions have been loaded codeTemplatePanel.doRefreshCodeTemplates(false); // Refresh resources if (settingsPane == null) { settingsPane = new SettingsPane(); } SettingsPanelResources resourcesPanel = (SettingsPanelResources) settingsPane .getSettingsPanel(SettingsPanelResources.TAB_NAME); if (resourcesPanel != null) { resourcesPanel.doRefresh(); } // DEBUGGING THE UIDefaults: // UIDefaults uiDefaults = UIManager.getDefaults(); Enumeration enum1 = // uiDefaults.keys(); while (enum1.hasMoreElements()) { Object key = // enum1.nextElement(); Object val = uiDefaults.get(key); //// if(key.toString().indexOf("ComboBox") != -1) // System.out.println("UIManager.put(\"" + key.toString() + "\",\"" + // (null != val ? val.toString() : "(null)") + "\");"); } }
From source file:com.peterbochs.sourceleveldebugger.SourceLevelDebugger3.java
private void initGUI() { try {/*from w w w.j a va 2 s.c om*/ this.setPreferredSize(new java.awt.Dimension(975, 563)); { jMainSplitPane = new JSplitPane(); this.add(getJErrorLabel(), "errorLabel"); this.add(jMainSplitPane, "MAIN"); jMainSplitPane.setDividerLocation(200); { jPanel4 = new JPanel(); jMainSplitPane.add(jPanel4, JSplitPane.RIGHT); BorderLayout jPanel4Layout = new BorderLayout(); jPanel4.setLayout(jPanel4Layout); { jSplitPane3 = new JSplitPane(); jPanel4.add(jSplitPane3, BorderLayout.CENTER); jSplitPane3.setOrientation(JSplitPane.VERTICAL_SPLIT); jSplitPane3.setDividerLocation(500); { jPanel6 = new JPanel(); jSplitPane3.add(jPanel6, JSplitPane.TOP); jSplitPane3.add(getJInfoTabbedPane(), JSplitPane.BOTTOM); BorderLayout jPanel6Layout = new BorderLayout(); jPanel6.setLayout(jPanel6Layout); { jMainTabbedPane = new JMaximizableTabbedPane(); jPanel6.add(jMainTabbedPane, BorderLayout.CENTER); { jASMPanel = new JPanel(); jMainTabbedPane.addTab(MyLanguage.getString("ASM/C"), null, jASMPanel, null); jMainTabbedPane.addTab("Dwarf", null, getJDwarfPanel(), null); jMainTabbedPane.addTab("Code base", null, getCodeBasePanel(), null); jMainTabbedPane.addTab("Call Graph", null, getCallGraphPanel(), null); BorderLayout jASMPanelLayout = new BorderLayout(); jASMPanel.setLayout(jASMPanelLayout); { instructionTableScrollPane = new JScrollPane(); instructionTableScrollPane.getVerticalScrollBar() .addAdjustmentListener(new AdjustmentListener() { boolean isRunning; public void adjustmentValueChanged(AdjustmentEvent evt) { /* JScrollBar vbar = (JScrollBar) evt.getSource(); if (evt.getValueIsAdjusting()) { return; } if ((vbar.getValue() + vbar.getVisibleAmount()) == vbar.getMaximum()) { if (!isRunning) { try { isRunning = true; final CardLayout cl = (CardLayout) (peterBochsDebugger.jMainPanel.getLayout()); cl.show(peterBochsDebugger.jMainPanel, "Running Label"); // new Thread("update instruction thread") { // public void run() { // long address = Long.parseLong(instructionTable.getValueAt(instructionTable.getRowCount() - 1, 1).toString() // .substring(2), 16); // peterBochsDebugger.updateInstruction(address, true); // peterBochsDebugger.updateBreakpointTableColor(); //// cl.show(peterBochsDebugger.jMainPanel, peterBochsDebugger.currentPanel); // // isRunning = false; // } // }.start(); } catch (Exception ex) { } } }*/ } }); jASMPanel.add(instructionTableScrollPane, BorderLayout.CENTER); { instructionTable = new JTable(); instructionTableScrollPane.setViewportView(instructionTable); instructionTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); instructionTable .setModel(PeterBochsDebugger.instructionTable.getModel()); instructionTable.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); instructionTable.getTableHeader().setReorderingAllowed(false); instructionTable.getColumnModel().getColumn(0).setMaxWidth(20); instructionTable.getColumnModel().getColumn(1).setPreferredWidth(40); instructionTable.getColumnModel().getColumn(2).setPreferredWidth(200); instructionTable.getColumnModel().getColumn(3).setPreferredWidth(40); instructionTable.setShowGrid(false); instructionTable.setDefaultRenderer(String.class, new InstructionTableCellRenderer()); instructionTable.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent evt) { instructionTableMouseClicked(evt); } }); } } { jInstructionControlPanel = new JPanel(); jASMPanel.add(jInstructionControlPanel, BorderLayout.NORTH); { jInstructionComboBox = new JComboBox(); jInstructionControlPanel.add(jInstructionComboBox); jInstructionComboBox.setEditable(true); jInstructionComboBox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { jInstructionComboBoxActionPerformed(evt); } }); } { disassembleButton = new JButton(); jInstructionControlPanel.add(disassembleButton); disassembleButton.setText(MyLanguage.getString("Disassemble")); disassembleButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { disassembleButtonActionPerformed(evt); } }); } { disassembleCSEIPButton = new JButton(); jInstructionControlPanel.add(disassembleCSEIPButton); disassembleCSEIPButton .setText(MyLanguage.getString("Disassemble") + " cs:eip"); disassembleCSEIPButton.setEnabled(true); disassembleCSEIPButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { disassembleCSEIPButtonActionPerformed(evt); } }); } { jInstructionUpTenButton = new JButton(); jInstructionControlPanel.add(jInstructionUpTenButton); jInstructionUpTenButton .setIcon(new ImageIcon(getClass().getClassLoader().getResource( "com/peterbochs/icons/famfam_icons/arrow_up10.png"))); jInstructionUpTenButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { jInstructionUpTenButtonActionPerformed(evt); } }); } { jInstructionUpButton = new JButton(); jInstructionControlPanel.add(jInstructionUpButton); jInstructionUpButton .setIcon(new ImageIcon(getClass().getClassLoader().getResource( "com/peterbochs/icons/famfam_icons/arrow_up1.png"))); jInstructionUpButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { jInstructionUpButtonActionPerformed(evt); } }); } { jInstructionDownButton = new JButton(); jInstructionControlPanel.add(jInstructionDownButton); jInstructionDownButton .setIcon(new ImageIcon(getClass().getClassLoader().getResource( "com/peterbochs/icons/famfam_icons/arrow_down.png"))); jInstructionDownButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { jInstructionDownButtonActionPerformed(evt); } }); } { jDiskButton = new JButton(); jInstructionControlPanel.add(jDiskButton); jDiskButton.setIcon(new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/disk.png"))); jDiskButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { jButton3ActionPerformed(evt); } }); } { jExcelButton = new JButton(); jInstructionControlPanel.add(jExcelButton); jInstructionControlPanel.add(getJSearchTextField()); jExcelButton.setIcon(new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/excel.gif"))); { btnSearch = new JButton("Search"); jInstructionControlPanel.add(btnSearch); btnSearch.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { btnSearchActionPerformed(evt); } }); } { onOffButton = new OnOffButton(); onOffButton.setSelected(true); onOffButton.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { InstructionTableModel model = (InstructionTableModel) PeterBochsDebugger.instructionTable .getModel(); if (e.getStateChange() == ItemEvent.SELECTED) { model.showAsmLevel = true; } else { model.showAsmLevel = false; } model.fireTableDataChanged(); } }); onOffButton.setPreferredSize(new Dimension(53, 18)); jInstructionControlPanel.add(onOffButton); } jExcelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { jButton12ActionPerformed(evt); } }); } } } } } } } { jPanel1 = new JPanel(); jMainSplitPane.add(jPanel1, JSplitPane.LEFT); BorderLayout jPanel1Layout = new BorderLayout(); jPanel1.setLayout(jPanel1Layout); { jTabbedPane1 = new JMaximizableTabbedPane(); jPanel1.add(jTabbedPane1, BorderLayout.CENTER); jTabbedPane1.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent evt) { jTabbedPane1StateChanged(evt); } }); { jPanel3 = new JPanel(); BorderLayout jPanel3Layout = new BorderLayout(); jPanel3.setLayout(jPanel3Layout); jTabbedPane1.addTab("Symbol", null, getSymbolTablePanel(), null); jTabbedPane1.addTab(MyLanguage.getString("Project"), null, jPanel3, null); { jScrollPane1 = new JScrollPane(); jPanel3.add(jScrollPane1, BorderLayout.CENTER); jPanel3.add(getJProjectToolBar(), BorderLayout.NORTH); { projectTree = new JTree(); jScrollPane1.setViewportView(projectTree); projectTree.setModel(projectFilterTreeModel); projectTree.setShowsRootHandles(true); projectTree.setCellRenderer(new ProjectTreeRenderer()); projectTree.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent evt) { projectTreeMouseClicked(evt); } }); } } } } } } } catch (Exception e) { e.printStackTrace(); } }