List of usage examples for javax.swing.event HyperlinkListener HyperlinkListener
HyperlinkListener
From source file:HyperlinkTest.java
public static void main(String args[]) { JFrame frame = new JFrame(); Container contentPane = frame.getContentPane(); final JEditorPane ep = new JEditorPane(); try {/*from w ww.j a va 2s . c o m*/ ep.setPage("http://www.java2s.com"); } catch (IOException e) { System.err.println("Bad URL: " + e); System.exit(-1); } HyperlinkListener listener = new HyperlinkListener() { public void hyperlinkUpdate(HyperlinkEvent e) { if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { try { ep.setPage(e.getURL()); } catch (IOException ioe) { System.err.println("Error loading: " + ioe); } } } }; ep.addHyperlinkListener(listener); ep.setEditable(false); JScrollPane pane = new JScrollPane(ep); contentPane.add(pane, BorderLayout.CENTER); frame.setSize(640, 480); frame.show(); }
From source file:FileTableHTML.java
public static void main(String[] args) throws IOException { // Get the name of the directory to display String dirname = (args.length > 0) ? args[0] : System.getProperty("user.home"); // Create something to display it in. final JEditorPane editor = new JEditorPane(); editor.setEditable(false); // we're browsing not editing editor.setContentType("text/html"); // must specify HTML text editor.setText(makeHTMLTable(dirname)); // specify the text to display // Set up the JEditorPane to handle clicks on hyperlinks editor.addHyperlinkListener(new HyperlinkListener() { public void hyperlinkUpdate(HyperlinkEvent e) { // Handle clicks; ignore mouseovers and other link-related events if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { // Get the HREF of the link and display it. editor.setText(makeHTMLTable(e.getDescription())); }// w ww . ja v a2s . c om } }); // Put the JEditorPane in a scrolling window and display it. JFrame frame = new JFrame("FileTableHTML"); frame.getContentPane().add(new JScrollPane(editor)); frame.setSize(650, 500); frame.setVisible(true); }
From source file:com.igormaznitsa.zxpoly.ui.AboutDialog.java
public AboutDialog(final java.awt.Frame parent) { super(parent, true); initComponents();// ww w .j a va 2 s.c o m this.editorPane.addHyperlinkListener(new HyperlinkListener() { @Override public void hyperlinkUpdate(final HyperlinkEvent e) { if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { try { Desktop.getDesktop().browse(e.getURL().toURI()); } catch (Exception ex) { } } else if (e.getEventType() == HyperlinkEvent.EventType.ENTERED) { editorPane.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); } else if (e.getEventType() == HyperlinkEvent.EventType.EXITED) { editorPane.setCursor(Cursor.getDefaultCursor()); } } }); this.editorPane.setContentType("text/html"); try { final String htmlText = IOUtils.toString(openAboutResource("index.html"), "UTF-8"); this.editorPane.setText(htmlText); } catch (Exception ex) { ex.printStackTrace(); } setLocationRelativeTo(parent); }
From source file:net.sf.jabref.help.HelpContent.java
public HelpContent(JabRefPreferences prefs_) { super();/* w w w. ja va 2 s . c o m*/ pane = new JScrollPane(this, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); pane.setDoubleBuffered(true); prefs = prefs_; history = new Stack<URL>(); forw = new Stack<URL>(); setEditorKitForContentType("text/html", new MyEditorKit()); setContentType("text/html"); setText(""); setEditable(false); // Handles Anchors final HyperlinkListener hyperLinkListener = new HyperlinkListener() { public void hyperlinkUpdate(final HyperlinkEvent e) { if (e.getDescription().startsWith("#")) { scrollToReference(e.getDescription().substring(1)); } } }; addHyperlinkListener(hyperLinkListener); }
From source file:net.sf.jabref.gui.help.HelpContent.java
public HelpContent(JabRefPreferences prefs_) { super();//from ww w .j a v a2 s. co m pane = new JScrollPane(this, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); pane.setDoubleBuffered(true); prefs = prefs_; history = new Stack<>(); forw = new Stack<>(); setEditorKitForContentType("text/html", new MyEditorKit()); setContentType("text/html"); setText(""); setEditable(false); addHyperlinkListener(new HyperlinkListener() { private boolean lastStatusUpdateWasALink = false; @Override public void hyperlinkUpdate(HyperlinkEvent e) { String link = e.getDescription(); if (e.getEventType() == HyperlinkEvent.EventType.ENTERED) { // show the link in the status bar - similar to Firefox behavior JabRef.jrf.setStatus(link); lastStatusUpdateWasALink = true; } else { if (lastStatusUpdateWasALink) { // remove the link from the status bar JabRef.jrf.setStatus(""); lastStatusUpdateWasALink = false; } } } }); }
From source file:net.sf.jabref.HelpContent.java
public HelpContent(JabRefPreferences prefs_) { super();//from w w w .j ava 2 s . c o m pane = new JScrollPane(this, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); pane.setDoubleBuffered(true); prefs = prefs_; history = new Stack<URL>(); forw = new Stack<URL>(); setEditorKitForContentType("text/html", new MyEditorKit()); setContentType("text/html"); setText(""); setEditable(false); // Handles Anchors final HyperlinkListener hyperLinkListener = new HyperlinkListener() { public void hyperlinkUpdate(final HyperlinkEvent e) { if (e.getDescription().startsWith("#")) { scrollToReference(e.getDescription().substring(1)); } } }; addHyperlinkListener(hyperLinkListener); }
From source file:EditorPaneTest.java
public EditorPaneFrame() { setTitle("EditorPaneTest"); setSize(DEFAULT_WIDTH, DEFAULT_HEIGHT); final Stack<String> urlStack = new Stack<String>(); final JEditorPane editorPane = new JEditorPane(); final JTextField url = new JTextField(30); // set up hyperlink listener editorPane.setEditable(false);//ww w.ja va2 s . c o m editorPane.addHyperlinkListener(new HyperlinkListener() { public void hyperlinkUpdate(HyperlinkEvent event) { if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { try { // remember URL for back button urlStack.push(event.getURL().toString()); // show URL in text field url.setText(event.getURL().toString()); editorPane.setPage(event.getURL()); } catch (IOException e) { editorPane.setText("Exception: " + e); } } } }); // set up checkbox for toggling edit mode final JCheckBox editable = new JCheckBox(); editable.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent event) { editorPane.setEditable(editable.isSelected()); } }); // set up load button for loading URL ActionListener listener = new ActionListener() { public void actionPerformed(ActionEvent event) { try { // remember URL for back button urlStack.push(url.getText()); editorPane.setPage(url.getText()); } catch (IOException e) { editorPane.setText("Exception: " + e); } } }; JButton loadButton = new JButton("Load"); loadButton.addActionListener(listener); url.addActionListener(listener); // set up back button and button action JButton backButton = new JButton("Back"); backButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent event) { if (urlStack.size() <= 1) return; try { // get URL from back button urlStack.pop(); // show URL in text field String urlString = urlStack.peek(); url.setText(urlString); editorPane.setPage(urlString); } catch (IOException e) { editorPane.setText("Exception: " + e); } } }); add(new JScrollPane(editorPane), BorderLayout.CENTER); // put all control components in a panel JPanel panel = new JPanel(); panel.add(new JLabel("URL")); panel.add(url); panel.add(loadButton); panel.add(backButton); panel.add(new JLabel("Editable")); panel.add(editable); add(panel, BorderLayout.SOUTH); }
From source file:com.android.tools.swing.ui.NavigationComponent.java
public NavigationComponent() { setEditable(false);/*from w ww . j av a 2 s. c o m*/ setContentType(ContentType.TEXT_HTML.getMimeType()); putClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES, Boolean.TRUE); // Disable links decoration. ((HTMLDocument) getDocument()).getStyleSheet().addRule("a { text-decoration:none; }"); addHyperlinkListener(new HyperlinkListener() { @Override public void hyperlinkUpdate(HyperlinkEvent e) { if (e.getEventType() != HyperlinkEvent.EventType.ACTIVATED) { return; } int idx = Integer.parseInt(e.getDescription()); final T item = myItemStack.get(idx); for (final ItemListener<T> listener : myItemListeners) { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { listener.itemSelected(item); } }); } } }); }
From source file:eu.delving.sip.frames.OutputFrame.java
public OutputFrame(final SipModel sipModel) { super(Which.OUTPUT, sipModel, "Output"); htmlPanel = new HtmlPanel("Link Checks").addHyperlinkListener(new HyperlinkListener() { @Override/* w ww.ja v a2 s . co m*/ public void hyperlinkUpdate(HyperlinkEvent e) { if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) SwingHelper.launchURL(e.getURL().toString()); } }); sipModel.getRecordCompileModel().setEnabled(false); sipModel.getRecordCompileModel().addListener(new MappingCompileModel.Listener() { @Override public void stateChanged(CompileState state) { } @Override public void codeCompiled(MappingCompileModel.Type type, String code) { } @Override public void mappingComplete(MappingResult mappingResult) { try { LinkCheckExtractor extractor = new LinkCheckExtractor( mappingResult.getRecDefTree().getRecDef().fieldMarkers, new XPathContext(mappingResult.getRecDefTree().getRecDef().namespaces)); final List<String> checkLines = extractor.getChecks(mappingResult); DataSet dataSet = sipModel.getDataSetModel().getDataSet(); String prefix = sipModel.getMappingModel().getPrefix(); final LinkChecker linkChecker = new LinkChecker(httpClient); ResultLinkChecks checks = new ResultLinkChecks(dataSet, prefix, linkChecker); Work.DataSetPrefixWork work = checks.checkLinks(mappingResult.getLocalId(), checkLines, sipModel.getFeedback(), new Swing() { @Override public void run() { StringBuilder out = new StringBuilder(); ResultLinkChecks.validLinesToHTML(checkLines, linkChecker, out); htmlPanel.setHtml(out.toString()); } }); if (work != null) { sipModel.exec(work); } } catch (XPathExpressionException e) { sipModel.getFeedback().alert("XPath problem", e); } } }); }
From source file:de.ist.clonto.Ontogui.java
private void initComponents() { AnalysisjPanel = new javax.swing.JPanel(); loadOntologyButton = new javax.swing.JButton(); loadQueryButton = new javax.swing.JButton(); ontologyNameField = new javax.swing.JTextField(); smellNameField = new javax.swing.JTextField(); metricsCombobox = new javax.swing.JComboBox<>(); backupOntologyButton = new javax.swing.JButton(); runQueryButton = new javax.swing.JButton(); runMetricsButton = new javax.swing.JButton(); badSmellComboBox = new javax.swing.JComboBox<>(); runSmellAnalysisButton = new javax.swing.JButton(); TransformationjPanel = new javax.swing.JPanel(); ContextjScrollPane = new javax.swing.JScrollPane(); contextArea = new javax.swing.JTextArea(); descriptionjScrollPane = new javax.swing.JScrollPane(); descriptionArea = new javax.swing.JTextArea(); displayRefactoringButton = new javax.swing.JButton(); runRefactoringButton = new javax.swing.JButton(); refactorCombobox = new javax.swing.JComboBox<>(); pruningCombobox = new javax.swing.JComboBox<>(); displayPruningButton = new javax.swing.JButton(); runPruningButton = new javax.swing.JButton(); checkbox1 = new java.awt.Checkbox(); jScrollPane1 = new javax.swing.JScrollPane(); queryResultArea = new javax.swing.JEditorPane(); queryResultArea.addHyperlinkListener(new HyperlinkListener() { @Override//from w w w . j av a2s . c o m public void hyperlinkUpdate(HyperlinkEvent e) { System.out.print(e.getURL()); } }); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setExtendedState(JFrame.MAXIMIZED_BOTH); AnalysisjPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Analysis")); loadOntologyButton.setText("load ontology"); loadOntologyButton.setToolTipText("Load an existing tdb dataset"); loadOntologyButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { loadOntology(evt); } }); loadQueryButton.setText("load query"); loadQueryButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { loadQuery(evt); } }); ontologyNameField.setEditable(false); ontologyNameField.setText("<ontology name>"); smellNameField.setEditable(false); smellNameField.setText("<query name>"); metricsCombobox.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "type:Depth", "type:CategoryInOut", "type:ComputerLanguagesDistanceMeasures", "type:NOC", "type:subdomainratio", "graph:CategoriesPerEntityMaxAvg", "graph:EntitiesPerCategoryMaxAvg", "graph:graphMetrics" })); metricsCombobox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { metricsComboboxActionPerformed(evt); } }); backupOntologyButton.setText("backup"); backupOntologyButton.setToolTipText( "Create a backup of the selected tdb dataset." + "Selected folder will be cleaned first."); backupOntologyButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { backupOntologyButtonActionPerformed(evt); } }); runQueryButton.setText("run query"); runQueryButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { runQueryButtonActionPerformed(evt); } }); runMetricsButton.setText("run metric"); runMetricsButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { runMetricsButtonActionPerformed(evt); } }); badSmellComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Distant Type", "Eponymous Type", "Semantically Distant Type", "Semantically Distant Entity", "Multi Topic", "Off Topic", "Double Reachable Type", "Double Reachable Entity", "Cycle", "Lazy Type Metric based", "Lazy Type Instance Containment", "Missing Type", "Redundant Subtype", "Redundant Instance" })); badSmellComboBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { badSmellComboBoxActionPerformed(evt); } }); runSmellAnalysisButton.setText("run smell"); runSmellAnalysisButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { runSmellAnalysisButtonActionPerformed(evt); } }); javax.swing.GroupLayout AnalysisjPanelLayout = new javax.swing.GroupLayout(AnalysisjPanel); AnalysisjPanel.setLayout(AnalysisjPanelLayout); AnalysisjPanelLayout.setHorizontalGroup(AnalysisjPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(AnalysisjPanelLayout.createSequentialGroup().addGap(20, 20, 20) .addGroup(AnalysisjPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(AnalysisjPanelLayout.createSequentialGroup().addGroup(AnalysisjPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(ontologyNameField, javax.swing.GroupLayout.DEFAULT_SIZE, 137, Short.MAX_VALUE) .addComponent(smellNameField)) .addGroup(AnalysisjPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(AnalysisjPanelLayout.createSequentialGroup() .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(loadOntologyButton) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(backupOntologyButton, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, AnalysisjPanelLayout.createSequentialGroup() .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(loadQueryButton, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(121, 121, 121)))) .addGroup(AnalysisjPanelLayout.createSequentialGroup() .addGroup(AnalysisjPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(metricsCombobox, 0, 1, Short.MAX_VALUE) .addComponent(badSmellComboBox, 0, 240, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(AnalysisjPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(runMetricsButton, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(runQueryButton, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(runSmellAnalysisButton, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGap(0, 0, Short.MAX_VALUE))); AnalysisjPanelLayout.setVerticalGroup( AnalysisjPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(AnalysisjPanelLayout.createSequentialGroup().addContainerGap() .addGroup(AnalysisjPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(ontologyNameField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(backupOntologyButton).addComponent(loadOntologyButton)) .addGap(3, 3, 3) .addGroup(AnalysisjPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(smellNameField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(loadQueryButton).addComponent(runQueryButton)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(AnalysisjPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(metricsCombobox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(runMetricsButton)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(AnalysisjPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(badSmellComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(runSmellAnalysisButton)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); TransformationjPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Transformation")); contextArea.setEditable(false); contextArea.setColumns(20); contextArea.setRows(5); contextArea.setText("<Context:>"); ContextjScrollPane.setViewportView(contextArea); descriptionArea.setEditable(false); descriptionArea.setColumns(20); descriptionArea.setRows(5); descriptionArea.setText("<Transformations:>"); descriptionjScrollPane.setViewportView(descriptionArea); displayRefactoringButton.setText("Display Refactoring"); displayRefactoringButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { displayTransformationInfo(false); } }); runRefactoringButton.setText("Execute Refactoring"); runRefactoringButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { runRefactoringButtonActionPerformed(evt); } }); refactorCombobox.setModel(new javax.swing.DefaultComboBoxModel<>( new String[] { "Rename Element", "Change Topic", "Move Entity", "Move Type", "Add Missing Subtype", "Add Missing Instance", "Unite Information", "Extract Entity", "Extract Subtype", "Remove Redundant Instances", "Remove Redundant Subtypes" })); refactorCombobox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { refactorComboboxActionPerformed(evt); } }); pruningCombobox.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Abandon Type (selective)", "Abandon Entity", "Abandon Type (no rescue)", "Abandon Information", "Remove Instance", "Remove Subtype", "Abandon Type (rescue all)", "Cleanup Unreachable All", "Cleanup Unreachable Type", "Cleanup Unreachable Ent", "Lift Cycle", "Custom" })); pruningCombobox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { pruningComboboxActionPerformed(evt); } }); displayPruningButton.setText("Display Pruning"); displayPruningButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { displayTransformationInfo(true); } }); runPruningButton.setText("Execute Pruning"); runPruningButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { runPruningButtonActionPerformed(evt); } }); javax.swing.GroupLayout TransformationjPanelLayout = new javax.swing.GroupLayout(TransformationjPanel); TransformationjPanel.setLayout(TransformationjPanelLayout); TransformationjPanelLayout.setHorizontalGroup(TransformationjPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(TransformationjPanelLayout.createSequentialGroup().addContainerGap() .addGroup(TransformationjPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(TransformationjPanelLayout.createSequentialGroup() .addGroup(TransformationjPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(pruningCombobox, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(refactorCombobox, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(TransformationjPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(displayPruningButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(displayRefactoringButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(TransformationjPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(runRefactoringButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(runPruningButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(0, 0, Short.MAX_VALUE)) .addGroup(TransformationjPanelLayout.createSequentialGroup() .addComponent(ContextjScrollPane) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(descriptionjScrollPane))) .addContainerGap())); TransformationjPanelLayout.setVerticalGroup(TransformationjPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(TransformationjPanelLayout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(TransformationjPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(descriptionjScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(TransformationjPanelLayout.createSequentialGroup() .addComponent(ContextjScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(TransformationjPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(refactorCombobox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(displayRefactoringButton) .addComponent(runRefactoringButton)))) .addGap(2, 2, 2) .addGroup(TransformationjPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(pruningCombobox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(displayPruningButton).addComponent(runPruningButton)))); checkbox1.setLabel("prettyprint"); queryResultArea.setEditable(false); jScrollPane1.setViewportView(queryResultArea); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(AnalysisjPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createSequentialGroup().addGap(27, 27, 27).addComponent(checkbox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(TransformationjPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(3, 3, 3)) .addGroup(layout.createSequentialGroup().addContainerGap().addComponent(jScrollPane1) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(AnalysisjPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(checkbox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(TransformationjPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane1).addContainerGap())); pack(); }