![JAR search and dependency download from the Maven repository](/logo.png)
org.coode.owlviz.command.ZoomOutCommand Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of owlviz Show documentation
Show all versions of owlviz Show documentation
A plug-in for the Protege Desktop ontology editor that provides a graphical representation of the class
hierarchies in an OWL ontology.
The newest version!
package org.coode.owlviz.command;
import org.coode.owlviz.ui.OWLVizViewI;
import org.coode.owlviz.util.graph.ui.GraphComponent;
import org.protege.editor.core.ui.util.Icons;
import org.protege.editor.core.ui.view.DisposableAction;
import javax.swing.*;
import java.awt.event.ActionEvent;
import java.util.Iterator;
/**
* User: matthewhorridge
* The Univeristy Of Manchester
* Medical Informatics Group
* Date: Feb 19, 2004
*
* [email protected]
* www.cs.man.ac.uk/~horridgm
*/
public class ZoomOutCommand extends DisposableAction {
/**
*
*/
private static final long serialVersionUID = -1561016730692070510L;
private OWLVizViewI view;
public ZoomOutCommand(OWLVizViewI view) {
super("Zoom Out", Icons.getIcon("zoom.out.png"));
this.putValue(AbstractAction.SHORT_DESCRIPTION, "Zoom Out");
this.view = view;
}
public void dispose() {
}
/**
* Invoked when an action occurs.
*/
public void actionPerformed(ActionEvent e) {
for (Iterator it = view.getAllGraphComponents().iterator(); it.hasNext(); ) {
GraphComponent graphComponent = (GraphComponent) it.next();
int zoomLevel = graphComponent.getGraphView().getZoomLevel();
zoomLevel -= 10;
graphComponent.getGraphView().setZoomLevel(zoomLevel);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy