test.DnDTest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Quaqua Show documentation
Show all versions of Quaqua Show documentation
A Mavenisation of the Quaqua Mac OSX Swing Look and Feel (Java library)
Quaqua Look and Feel (C) 2003-2010, Werner Randelshofer.
Mavenisation by Matt Gumbley, DevZendo.org - for problems with
Mavenisation, see Matt; for issues with Quaqua, see the Quaqua home page.
For full license details, see http://randelshofer.ch/quaqua/license.html
The newest version!
/*
* @(#)DnDTest.java
*
* Copyright (c) 2004-2010 Werner Randelshofer, Immensee, Switzerland.
* All rights reserved.
*
* The copyright of this software is owned by Werner Randelshofer.
* You may not use, copy or modify this software, except in
* accordance with the license agreement you entered into with
* Werner Randelshofer. For details see accompanying license terms.
*/
package test;
import javax.swing.tree.TreeSelectionModel;
/**
* DnDTest.
*
* @author Werner Randelshofer
* @version $Id: DnDTest.java 363 2010-11-21 17:41:04Z wrandelshofer $
*/
public class DnDTest extends javax.swing.JPanel {
/**
* Creates new form DnDTest
*/
public DnDTest() {
initComponents();
browser1.setSelectionMode(TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION);
}
/** 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.
*/
// //GEN-BEGIN:initComponents
private void initComponents() {
java.awt.GridBagConstraints gridBagConstraints;
scrollPane5 = new javax.swing.JScrollPane();
browser1 = new ch.randelshofer.quaqua.JBrowser();
jScrollPane1 = new javax.swing.JScrollPane();
jTable1 = new javax.swing.JTable();
jScrollPane2 = new javax.swing.JScrollPane();
jTree1 = new javax.swing.JTree();
jScrollPane3 = new javax.swing.JScrollPane();
jList1 = new javax.swing.JList();
jScrollPane4 = new javax.swing.JScrollPane();
jTextPane1 = new javax.swing.JTextPane();
setLayout(new java.awt.GridBagLayout());
browser1.setDragEnabled(true);
scrollPane5.setViewportView(browser1);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.weighty = 1.0;
add(scrollPane5, gridBagConstraints);
jTable1.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{"Nelly Furtado", "Loose", null, null},
{"Avril Lavigne", "Under My Skin", null, null},
{"Jem", "Finally Woken", null, null},
{"Kim Wilde", "Never Say Never", null, null}
},
new String [] {
"Title 1", "Title 2", "Title 3", "Title 4"
}
));
jTable1.setDragEnabled(true);
jScrollPane1.setViewportView(jTable1);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.weighty = 1.0;
add(jScrollPane1, gridBagConstraints);
jTree1.setDragEnabled(true);
jTree1.setEditable(true);
jScrollPane2.setViewportView(jTree1);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.weighty = 1.0;
add(jScrollPane2, gridBagConstraints);
jList1.setModel(new javax.swing.AbstractListModel() {
String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
public int getSize() { return strings.length; }
public Object getElementAt(int i) { return strings[i]; }
});
jList1.setDragEnabled(true);
jScrollPane3.setViewportView(jList1);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridy = 2;
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.weighty = 1.0;
add(jScrollPane3, gridBagConstraints);
jScrollPane4.setViewportView(jTextPane1);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridy = 2;
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.weighty = 1.0;
add(jScrollPane4, gridBagConstraints);
}// //GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables
private ch.randelshofer.quaqua.JBrowser browser1;
private javax.swing.JList jList1;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JScrollPane jScrollPane2;
private javax.swing.JScrollPane jScrollPane3;
private javax.swing.JScrollPane jScrollPane4;
private javax.swing.JTable jTable1;
private javax.swing.JTextPane jTextPane1;
private javax.swing.JTree jTree1;
private javax.swing.JScrollPane scrollPane5;
// End of variables declaration//GEN-END:variables
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy