/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
/**
* Displays the results of an ObjectHistogram run in a JTable, with a
* button to display all objects of that type
*/
}
}
});
setLayout(new BorderLayout());
}
}
protected void addComponents() {
searchTF = new JTextField();
// Pressing Enter on the text field will search
}
}
}
public ObjectHistogramColummModel() {
// Should actually get the line metrics for
int PREF_WIDTH = 80;
int MAX_WIDTH = 100;
int HUGE_WIDTH = 140;
// Size
column.setResizable(false);
// Count
column.setResizable(false);
// Description
}
}
/**
* A table model which encapsulates the ObjectHistogram
*/
// Set the rows
setComparator(new ObjectHistogramComparator(this));
}
public int getColumnCount() {
return columnNames.length;
}
public int getRowCount() {
}
return columnNames[col];
}
return columnClasses[col];
}
}
switch (col) {
case 0:
case 1:
case 2:
return el.getDescription();
default:
}
}
}
super(model);
}
/**
* Returns the value for the comparing object for the
* column.
*
* @param obj Object that was passed for Comparator
* @param column the column to retrieve
*/
}
}
}
//
// ActionListener implementation and actions support
//
findObject();
}
}
protected void registerActions() {
}
action.addActionListener(this);
}
public interface Listener {
}
}
}
}
}
//--------------------------------------------------------------------------------
// Internals only below this point
//
/**
* Find and select the row that contains the text in the find field starting
* from the current selected row.
*
* Uses a linear search from the current row. Could be optimized withing the
* model and internal representation.
*/
private void findObject() {
return;
}
row = 0;
} else {
// Start at the row after the selected row.
row++;
}
table.setRowSelectionInterval(i, i);
return;
}
}
// Wrap the table to search in the top rows.
for (int i = 0; i < row; i++) {
table.setRowSelectionInterval(i, i);
return;
}
}
}
private void fireShowObjectsOfType() {
int i = table.getSelectedRow();
if (i < 0) {
return;
}
}
}
}
}