Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
JDK 17 jdk.jconsole.jmod - JConsole Tool
JDK 17 jdk.jconsole.jmod is the JMOD file for JDK 17 JConsole tool,
which can be invoked by the "jconsole" command.
JDK 17 JConsole tool compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\jdk.jconsole.jmod.
JDK 17 JConsole tool compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 JConsole tool source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\jdk.jconsole.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ sun/tools/jconsole/inspector/XTable.java
/*
* Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package sun.tools.jconsole.inspector;
import java.awt.Color;
import java.awt.Component;
import java.awt.Font;
import javax.swing.JTable;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableCellRenderer;
@SuppressWarnings("serial") // JDK implementation class
public abstract class XTable extends JTable {
static final int NAME_COLUMN = 0;
static final int VALUE_COLUMN = 1;
private Color defaultColor, editableColor, errorColor;
private Font normalFont, boldFont;
public XTable () {
super();
@SuppressWarnings("serial")
final TableSorter sorter = new TableSorter();
setModel(sorter);
sorter.addMouseListenerToHeaderInTable(this);
setRowSelectionAllowed(false);
setColumnSelectionAllowed(false);
setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN);
}
Color getDefaultColor() {
return defaultColor;
}
Color getEditableColor() {
return editableColor;
}
/**
* Called by TableSorter if a mouse event requests to sort the rows.
* @param column the column against which the rows are sorted
*/
void sortRequested(int column) {
// This is a hook for subclasses
}
/**
* This returns the select index as the table was at initialization
*/
public int getSelectedIndex() {
return convertRowToIndex(getSelectedRow());
}
/*
* Converts the row into index (before sorting)
*/
public int convertRowToIndex(int row) {
if (row == -1) return row;
if (getModel() instanceof TableSorter) {
return ((TableSorter) getModel()).getIndexOfRow(row);
} else {
return row;
}
}
public void emptyTable() {
DefaultTableModel model = (DefaultTableModel)getModel();
while (model.getRowCount()>0)
model.removeRow(0);
}
public abstract boolean isTableEditable();
public abstract boolean isColumnEditable(int column);
public abstract boolean isReadable(int row);
public abstract boolean isWritable(int row);
public abstract boolean isCellError(int row, int col);
public abstract boolean isAttributeViewable(int row, int col);
public abstract void setTableValue(Object value,int row);
public abstract Object getValue(int row);
public abstract String getClassName(int row);
public abstract String getValueName(int row);
public boolean isReadWrite(int row) {
return (isReadable(row) && isWritable(row));
}
//JTable re-implementation
//attribute can be editable even if unavailable
@Override
public boolean isCellEditable(int row, int col) {
return ((isTableEditable() && isColumnEditable(col)
&& isWritable(row)
&& Utils.isEditableType(getClassName(row))));
}
//attribute can be droppable even if unavailable
public boolean isCellDroppable(int row, int col) {
return (isTableEditable() && isColumnEditable(col)
&& isWritable(row));
}
//returns null, means no tool tip
public String getToolTip(int row, int column) {
return null;
}
/**
* This method sets read write rows to be blue, and other rows to be their
* default rendered colour.
*/
@Override
public TableCellRenderer getCellRenderer(int row, int column) {
DefaultTableCellRenderer tcr =
(DefaultTableCellRenderer) super.getCellRenderer(row,column);
tcr.setToolTipText(getToolTip(row,column));
if (defaultColor == null) {
defaultColor = tcr.getForeground();
editableColor = Color.blue;
errorColor = Color.red;
// this sometimes happens for some reason
if (defaultColor == null) {
return tcr;
}
}
if (column != VALUE_COLUMN) {
tcr.setForeground(defaultColor);
return tcr;
}
if (isCellError(row,column)) {
tcr.setForeground(errorColor);
} else if (isCellEditable(row, column)) {
tcr.setForeground(editableColor);
} else {
tcr.setForeground(defaultColor);
}
return tcr;
}
@Override
public Component prepareRenderer(TableCellRenderer renderer,
int row, int column) {
Component comp = super.prepareRenderer(renderer, row, column);
if (normalFont == null) {
normalFont = comp.getFont();
boldFont = normalFont.deriveFont(Font.BOLD);
}
if (column == VALUE_COLUMN && isAttributeViewable(row, VALUE_COLUMN)) {
comp.setFont(boldFont);
} else {
comp.setFont(normalFont);
}
return comp;
}
}
⏎ sun/tools/jconsole/inspector/XTable.java
Or download all of them as a single archive file:
File name: jdk.jconsole-17.0.5-src.zip File size: 169450 bytes Release date: 2022-09-13 Download
⇒ JDK 17 jdk.jdeps.jmod - JDeps Tool
2023-04-17, ≈24🔥, 0💬
Popular Posts:
What Is ojdbc5.jar for Oracle 11g R1? ojdbc5.jar for Oracle 11g R1 is the JAR files of ojdbc.jar, JD...
JDK 11 java.naming.jmod is the JMOD file for JDK 11 Naming module. JDK 11 Naming module compiled cla...
JDK 17 jdk.incubator.foreign.jm odis the JMOD file for JDK 17 HTTP Server module. JDK 17 Incubator F...
JBrowser Source Code Files are provided in the source package file. You can download JBrowser source...
JDK 11 java.xml.jmod is the JMOD file for JDK 11 XML (eXtensible Markup Language) module. JDK 11 XML...