All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.protege.editor.owl.ui.framelist.ExplainButton Maven / Gradle / Ivy

Go to download

OWL ontology editing infrastructure used by the Protege desktop application.

The newest version!
package org.protege.editor.owl.ui.framelist;

import org.protege.editor.core.ui.list.MListButton;

import java.awt.*;
import java.awt.event.ActionListener;


/**
 * Author: Matthew Horridge
* The University Of Manchester
* Bio-Health Informatics Group
* Date: 01-Mar-2007

*/ public class ExplainButton extends MListButton { public ExplainButton(ActionListener actionListener) { super("Explain inference", new Color(100, 40, 140), actionListener); } public void paintButtonContent(Graphics2D g) { int stringWidth = g.getFontMetrics().getStringBounds("?", g).getBounds().width; int w = getBounds().width; int h = getBounds().height; g.drawString("?", getBounds().x + w / 2 - stringWidth / 2, getBounds().y + g.getFontMetrics().getAscent() / 2 + h / 2); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy