edu.stanford.smi.protege.ui.CheckBoxRenderer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of protege Show documentation
Show all versions of protege Show documentation
Core code for the Protege ontology editor. Serves as the basis for the Protege-Frames and Protege-OWL editors.
package edu.stanford.smi.protege.ui;
import java.awt.*;
import javax.swing.*;
import javax.swing.table.*;
/**
* Renderer to display a check box to acquire a boolean value.
*
* @author Ray Fergerson
*/
public class CheckBoxRenderer extends JCheckBox implements TableCellRenderer {
private static final long serialVersionUID = -4049122419048829462L;
public CheckBoxRenderer() {
setHorizontalAlignment(CENTER);
setOpaque(false);
}
public Component getTableCellRendererComponent(
JTable table,
Object value,
boolean isSelected,
boolean b,
int row,
int col) {
setSelected(Boolean.TRUE.equals(value));
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy